コード例 #1
0
ファイル: Repository.php プロジェクト: sohailaammarocs/lfc
 /**
  * {@inheritDoc}
  */
 public function attach(BaseCollection $collection, $type = 'Cartalyst\\Settings\\form')
 {
     return parent::attach($collection, $type);
 }
コード例 #2
0
ファイル: CollectionTest.php プロジェクト: cartalyst/support
 /** @test */
 public function it_can_make_an_item_on_a_collection_the_last_item()
 {
     $collection = new Collection('main');
     $collection->put('a', 'A');
     $collection->put('b', 'B');
     $collection->put('c', 'C');
     $collection->put('d', 'D');
     $this->assertEquals('D', $collection->last());
     $collection->makeLast('c');
     $this->assertEquals('C', $collection->last());
     $collection->makeLast('z');
     $this->assertEquals('C', $collection->last());
 }