コード例 #1
0
 public function testFirstAndLast()
 {
     $this->_coll->add('one');
     $this->_coll->add('two');
     $this->assertEquals($this->_coll->first(), 'one');
     $this->assertEquals($this->_coll->last(), 'two');
 }
コード例 #2
0
 /** {@inheritdoc} */
 public function last()
 {
     $this->initialize();
     return $this->coll->last();
 }
コード例 #3
0
 public function getRebalancerAction()
 {
     return $this->rebalancerActions->last();
 }
コード例 #4
0
ファイル: MenuItem.php プロジェクト: superdesk/web-publisher
 /**
  * {@inheritdoc}
  */
 public function getLastChild()
 {
     return $this->children->last();
 }
コード例 #5
0
ファイル: CategoriesValidator.php プロジェクト: antrampa/crm
 /**
  * @param Collection $orderedByIndex
  * @return bool
  */
 protected function isIncreasing(Collection $orderedByIndex)
 {
     return is_null($orderedByIndex->first()->getMinValue()) && is_null($orderedByIndex->last()->getMaxValue());
 }
コード例 #6
0
 /**
  * Sets the internal iterator to the last element in the collection and returns this element.
  *
  * @return mixed
  */
 function last()
 {
     $this->initialize();
     $last = $this->collection->last();
     return $last->getTerm();
 }
コード例 #7
0
 /**
  * {@inheritdoc}
  */
 public function last()
 {
     return $this->inner->last();
 }
コード例 #8
0
ファイル: Table.php プロジェクト: Blackhawkso/pos
 /**
  * getLastOrder
  *
  * @return \POS\Model\Entity\OrderInterface|null
  */
 public function getLastOrder()
 {
     return $this->orders->last();
 }
コード例 #9
0
 /**
  * {@inheritDoc}
  */
 public function last()
 {
     return $this->collection->last();
 }
コード例 #10
0
ファイル: BaseTest.php プロジェクト: malarzm/collections
 /**
  * @dataProvider provideCollection
  */
 public function testLast(Collection $coll, array $elements)
 {
     $this->assertSame(end($elements), $coll->last());
 }
コード例 #11
0
ファイル: Bundle.php プロジェクト: KnpLabs/KnpBundles
 public function getLatestScoreDetails()
 {
     return $this->scores->last();
 }