Exemple #1
0
 /**
  * Generates a string representation of a collection.
  *
  * This method returns an html dump of a collection of records, containing 
  * all data.
  *
  * @param Doctrine_Collection $collection
  * @return string
  */
 public static function getCollectionAsString(Doctrine_Collection $collection)
 {
     $r[] = "<pre>";
     $r[] = get_class($collection);
     $r[] = 'data : ' . Doctrine_Core::dump($collection->getData(), false);
     //$r[] = 'snapshot : ' . Doctrine_Core::dump($collection->getSnapshot());
     $r[] = "</pre>";
     return implode("\n", $r);
 }
 /**
  * __toString alias
  *
  * @return string
  */
 public function toString()
 {
     return Doctrine_Core::dump(get_object_vars($this));
 }