예제 #1
0
 /**
  * Merge with another collection
  *
  * @param Collection $otherCollection
  * @return $this
  */
 public function merge(Collection $otherCollection)
 {
     return $this->fillFromArray($otherCollection->toArray(), 'set');
 }
예제 #2
0
 /**
  * RTFN
  *
  * @return Collection|TestableObject[]
  */
 protected function getCollectionForMerge()
 {
     $collection = new Collection();
     for ($i = 7; $i <= 12; $i++) {
         $object = $this->getTestableObject();
         $object->setId($i);
         $collection->add($object);
     }
     return $collection;
 }
예제 #3
0
 /**
  * Handle collection error (throw Exception by default)
  *
  * @param string $message
  * @throws Exception
  */
 public function handleError($message)
 {
     parent::handleError($message);
 }