本文整理汇总了PHP中Doctrine\Common\Collections\ArrayCollection::offsetSet方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayCollection::offsetSet方法的具体用法?PHP ArrayCollection::offsetSet怎么用?PHP ArrayCollection::offsetSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine\Common\Collections\ArrayCollection
的用法示例。
在下文中一共展示了ArrayCollection::offsetSet方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: offsetSet
public function offsetSet($offset, $value)
{
if (null === $this->entries) {
$this->__load___();
}
return $this->entries->offsetSet($offset, $value);
}
示例2: Request
function it_returns_mass_action($handlerRegistry, DatagridInterface $grid, Acceptor $acceptor, MassActionExtension $massActionExtension, MassActionInterface $massActionInterface, QueryBuilder $queryBuilder, DatasourceInterface $datasource, ProductMassActionRepositoryInterface $massActionRepository, MassActionHandlerInterface $massActionHandler, $parametersParser)
{
$request = new Request(['inset' => 'inset', 'values' => 1, 'gridName' => 'grid', 'massAction' => $massActionInterface, 'actionName' => 'mass_edit_action']);
$parametersParser->parse($request)->willReturn(['inset' => 'inset', 'values' => 1]);
$datasource->getMassActionRepository()->willReturn($massActionRepository);
$massActionRepository->applyMassActionParameters($queryBuilder, 'inset', 1)->willReturn(null);
$massActionExtension->getMassAction('mass_edit_action', $grid)->willReturn($massActionInterface);
$acceptor->getExtensions()->willReturn([$massActionExtension]);
$alias = 'mass_action_alias';
$options = new ArrayCollection();
$options->offsetSet('handler', $alias);
$massActionInterface->getOptions()->willReturn($options);
$handlerRegistry->getHandler($alias)->willReturn($massActionHandler);
$massActionHandler->handle($grid, $massActionInterface)->willReturn($massActionHandler);
$this->dispatch($request)->shouldReturnAnInstanceOf('\\Pim\\Bundle\\DataGridBundle\\Extension\\MassAction\\Handler\\MassActionHandlerInterface');
}
示例3: offsetSet
/**
* ArrayAccess implementation of offsetSet()
*
* @param mixed $offset Offset
* @param mixed $value Value
*
* @return void
*/
public function offsetSet($offset, $value)
{
if ($this->checkElement($value, $offset)) {
parent::offsetSet($offset, $value);
}
}
示例4: offsetSet
/** {@inheritDoc} */
public function offsetSet($offset, $value)
{
$this->initialize();
$this->isDirty = true;
return $this->collection->offsetSet($offset, $value);
}
示例5: offsetSet
/**
* @param mixed $offset
* @param Column $column
*
* @return bool|void
*/
public function offsetSet($offset, $column)
{
$this->columnTypeExpected($column);
return parent::offsetSet($offset, $column);
}
示例6: offsetSet
public function offsetSet($offset, $value)
{
return $this->fields->offsetSet($offset, $value);
}
示例7: offsetSet
/**
* @param mixed $offset
* @param mixed $value
*
* @return bool|void
*/
public function offsetSet($offset, $value)
{
return parent::offsetSet($offset, $this->createDefinition($value));
}