Наследование: implements Iterator, implements Countable, implements ArrayAccess
Пример #1
0
 public function testMergeIsNotUnique()
 {
     $collection2 = new \Spot\Entity\Collection();
     $this->collection->add(new Entity_Post(array('foo' => 'bar')));
     $collection2->add(new Entity_Post(array('foo' => 'bar')));
     $collection2->add(new Entity_Post());
     $collection2->merge($this->collection, false);
     $this->assertEquals(3, count($collection2));
 }
Пример #2
0
 /**
  * Set identity values from given collection
  *
  * @param \Spot\Entity\Collection
  */
 public function identityValuesFromCollection(Collection $collection)
 {
     $this->identityValue($collection->resultsIdentities());
 }
Пример #3
0
 /**
  * Set identity values from given collection
  *
  * @param \Spot\Entity\Collection
  */
 public function identityValuesFromCollection(Collection $collection)
 {
     $this->identityValue($collection->toArray($this->localKey()));
 }