public static function asArray($collection, $safe = false, $eager = false) {
		$elements = array();

		foreach($collection as $key => $element)
			$elements[] = $element->asArray($safe, $eager);

		return $elements;
	}
public static function asArray($collection, $safe = false, $eager = false) {
		$elements = array();

		foreach($collection as $key => $element)
			$elements[] = $element->asArray($safe, $eager);

		return $elements;
	}
public static function asArray ( $ collection , $ safe = false , $ eager = false ) { $ elements = array ( ) ; foreach ( $ collection as $ key => $ element ) $ elements [ ] = $ element -> asArray ( $ safe , $ eager ) ; return $ elements ; }
Retrieve all the Collections's data in an array

Models should implement this method themselves and provide the required
data. Models can omit this, it just means you can't use it.

@param ArrayCollection $collection The collection to operate upon
@param bool $safe Should we return only data we consider "publicly exposable"?
@param bool $eager Should we eager load child data?
@return array
Retrieve all the Collections s data in an array