current() public méthode

{@inheritDoc}
public current ( )
 /**
  * {@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;
 }
 /**
  * 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());
 }
 public function current()
 {
     if (null === $this->entries) {
         $this->__load___();
     }
     return $this->entries->current();
 }
 /**
  * {@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;
 }
 /**
  * @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());
 }
 /**
  * @return Operation|false
  */
 public function getCurrentOperation()
 {
     return $this->operations->current();
 }
 /** {@inheritDoc} */
 public function current()
 {
     $this->initialize();
     return $this->collection->current();
 }
 /**
  * Gets the element of the collection at the current iterator position.
  *
  * @return mixed
  */
 public function current()
 {
     return $this->collection->current();
 }
Exemple #9
0
 /**
  * @return UserEntity|null
  */
 public function current()
 {
     return parent::current();
 }
Exemple #10
0
 /**
  * @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();
 }
 function current()
 {
     return $this->fields->current();
 }
 /**
  * @return Phase|false
  */
 public function getCurrentPhase()
 {
     return $this->phases->current();
 }