当前位置: 首页>>代码示例>>PHP>>正文


PHP ArrayCollection::current方法代码示例

本文整理汇总了PHP中Doctrine\Common\Collections\ArrayCollection::current方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayCollection::current方法的具体用法?PHP ArrayCollection::current怎么用?PHP ArrayCollection::current使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doctrine\Common\Collections\ArrayCollection的用法示例。


在下文中一共展示了ArrayCollection::current方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: read

 /**
  * {@inheritdoc}
  */
 public function read()
 {
     $configuration = $this->getJobConfiguration();
     if (!$this->isExecuted) {
         $this->isExecuted = true;
         $this->families = $this->getFamilies($configuration['filters']);
     }
     $result = $this->families->current();
     if (!empty($result)) {
         $this->stepExecution->incrementSummaryInfo('read');
         $this->families->next();
     } else {
         $result = null;
     }
     return $result;
 }
开发者ID:abdeldayem,项目名称:pim-community-dev,代码行数:19,代码来源:FilteredFamilyReader.php

示例2: testCurrent

 /**
  * Tests IdentityWrapper->current()
  */
 public function testCurrent()
 {
     $this->assertSame(current($this->entries), $this->identityWrapper->current());
     $this->identityWrapper->clear();
     $this->assertFalse($this->identityWrapper->current());
     $this->assertFalse($this->wrappedCollection->current());
 }
开发者ID:cross-solution,项目名称:yawik,代码行数:10,代码来源:IdentityWrapperTest.php

示例3: current

 public function current()
 {
     if (null === $this->entries) {
         $this->__load___();
     }
     return $this->entries->current();
 }
开发者ID:luisbrito,项目名称:Phraseanet,代码行数:7,代码来源:AggregateEntryCollection.php

示例4: read

 /**
  * {@inheritdoc}
  */
 public function read()
 {
     $config = $this->getJobConfiguration();
     $resolver = new OptionsResolver();
     $this->configureOptions($resolver);
     $config = $resolver->resolve($config);
     if (null === $this->referenceDatas) {
         if ($config['reference_data']) {
             $this->referenceDatas = $this->getReferenceDatas($config['reference_data'], $config['ids']);
         }
     }
     $result = $this->referenceDatas->current();
     if (!empty($result)) {
         $this->stepExecution->incrementSummaryInfo('read');
         $this->referenceDatas->next();
     } else {
         $result = null;
     }
     return $result;
 }
开发者ID:ronanguilloux,项目名称:CustomEntityBundle,代码行数:23,代码来源:ReferenceDataReader.php

示例5: testCurrent

 /**
  * @dataProvider provideDifferentElements
  */
 public function testCurrent($elements)
 {
     $collection = new ArrayCollection($elements);
     $this->assertSame(current($elements), $collection->current());
     next($elements);
     $collection->next();
     $this->assertSame(current($elements), $collection->current());
 }
开发者ID:tccLaravel,项目名称:test4,代码行数:11,代码来源:ArrayCollectionTest.php

示例6: getCurrentOperation

 /**
  * @return Operation|false
  */
 public function getCurrentOperation()
 {
     return $this->operations->current();
 }
开发者ID:evertharmeling,项目名称:brouwkuyp-control,代码行数:7,代码来源:UnitProcedure.php

示例7: current

 /** {@inheritDoc} */
 public function current()
 {
     $this->initialize();
     return $this->collection->current();
 }
开发者ID:nikophil,项目名称:cmf-tests,代码行数:6,代码来源:PersistentCollection.php

示例8: current

 /**
  * Gets the element of the collection at the current iterator position.
  *
  * @return mixed
  */
 public function current()
 {
     return $this->collection->current();
 }
开发者ID:Rybbow,项目名称:x-blog,代码行数:9,代码来源:ImmutableCollection.php

示例9: current

 /**
  * @return UserEntity|null
  */
 public function current()
 {
     return parent::current();
 }
开发者ID:delboy1978uk,项目名称:user,代码行数:7,代码来源:User.php

示例10: generateGuide

 /**
  * @return mixed|\Seh\Bundle\SehBundle\Entity\Hotel\Guide
  */
 public function generateGuide()
 {
     $today = new \DateTime("now");
     /** @var Guide $guide */
     foreach ($this->guides as $guide) {
         /** @var Periode $periode */
         foreach ($guide->getPeriodes() as $periode) {
             if ($periode->getBeginning() <= $today && $periode->getEnding() >= $today) {
                 return $guide;
             }
         }
     }
     return $this->guides->current();
 }
开发者ID:blab2015,项目名称:seh,代码行数:17,代码来源:Hotel.php

示例11: current

 function current()
 {
     return $this->fields->current();
 }
开发者ID:tomaszhanc,项目名称:form-field-bundle,代码行数:4,代码来源:FieldCollection.php

示例12: getCurrentPhase

 /**
  * @return Phase|false
  */
 public function getCurrentPhase()
 {
     return $this->phases->current();
 }
开发者ID:evertharmeling,项目名称:brouwkuyp-control,代码行数:7,代码来源:Operation.php


注:本文中的Doctrine\Common\Collections\ArrayCollection::current方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。