本文整理汇总了PHP中Doctrine\Common\Collections\Collection::getValues方法的典型用法代码示例。如果您正苦于以下问题:PHP Collection::getValues方法的具体用法?PHP Collection::getValues怎么用?PHP Collection::getValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine\Common\Collections\Collection
的用法示例。
在下文中一共展示了Collection::getValues方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRoles
public function getRoles()
{
$roles = array();
foreach ($this->roles->getValues() as $roleObject) {
$roles[] = $roleObject->getName();
}
return $roles;
}
示例2:
function it_applies_choice_filter_on_datasource_for_collection_value(FilterDatasourceAdapterInterface $datasource, Collection $collection, $utility)
{
$collection->count()->willReturn(2);
$collection->getValues()->willReturn(['foo', 'bar']);
$utility->applyFilter($datasource, 'data_name_key', 'IN', ['foo', 'bar'])->shouldBeCalled();
$this->apply($datasource, ['value' => $collection, 'type' => AjaxChoiceFilterType::TYPE_CONTAINS]);
}
示例3: testGetValues
public function testGetValues()
{
$this->_coll[] = 'one';
$this->_coll[] = 'two';
$this->assertEquals(array('one', 'two'), $this->_coll->getValues());
}
示例4: getValues
/**
* {@inheritdoc}
*/
public function getValues()
{
$this->initialize();
return $this->coll->getValues();
}
示例5: getRoles
/**
* Get role.
*
* @return array
*/
public function getRoles()
{
return $this->roles->getValues();
}
示例6: getUsers
/**
* Get user list from group
* @return array
*/
public function getUsers()
{
return $this->users->getValues();
}
示例7: getOptions
/**
* Get options.
*
* @return array
*/
public function getOptions($ac = false)
{
return $ac ? $this->options : $this->options->getValues();
}
示例8: getConsolidatedAccountsCollection
/**
* Get consolidated accounts collection
*
* @return ConsolidatedAccountsCollection
*/
public function getConsolidatedAccountsCollection()
{
$elements = array_merge(array($this), $this->consolidatedAccounts->getValues());
return new ConsolidatedAccountsCollection($elements);
}
示例9: buildOrderFulfillmentsData
public static function buildOrderFulfillmentsData(Collection $collection)
{
return array_map(function (OrderFulfillment $fulfillment) {
return $fulfillment->buildOrderFulfillmentData();
}, $collection->getValues());
}
示例10: getApiSettings
/**
* Get API Settings.
*
* @return array
*/
public function getApiSettings()
{
return $this->apiSettings->getValues();
}
示例11: getAccounts
/**
* Get account.
*
* @return array
*/
public function getAccounts()
{
return $this->accounts->getValues();
}
示例12: getEvents
/**
*
* @param bool $ac
*
* @return Collection $events
*/
public function getEvents($ac = false)
{
return $ac ? $this->events : $this->events->getValues();
}
示例13: getValues
/**
* {@inheritdoc}
*/
public function getValues()
{
return $this->inner->getValues();
}
示例14: getValues
/**
* {@inheritDoc}
*/
public function getValues()
{
return $this->collection->getValues();
}
示例15: testGetValues
/**
* @dataProvider provideCollection
*/
public function testGetValues(Collection $coll, array $elements)
{
$this->assertSame(array_values($elements), $coll->getValues());
}