當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。