public function toArray ($attributes = FALSE, $relations = array (), $recursive = FALSE)
	{
		
		$arr	= array ();
		$it		= $this->getIterator ();
		
		while ($it->valid ())
		{
			$arr[$it->key ()] = $it->current ()->toArray ($attributes, $relations, $recursive);
			$it->next ();
		}
		
		return $arr;
		
	}
public function toArray ($attributes = FALSE, $relations = array (), $recursive = FALSE)
	{
		
		$arr	= array ();
		$it		= $this->getIterator ();
		
		while ($it->valid ())
		{
			$arr[$it->key ()] = $it->current ()->toArray ($attributes, $relations, $recursive);
			$it->next ();
		}
		
		return $arr;
		
	}
public function toArray ( $ attributes = FALSE , $ relations = array ( ) , $ recursive = FALSE ) { $ arr = array ( ) ; $ it = $ this -> getIterator ( ) ; while ( $ it -> valid ( ) ) { $ arr [ $ it -> key ( ) ] = $ it -> current ( ) -> toArray ( $ attributes , $ relations , $ recursive ) ; $ it -> next ( ) ; } return $ arr ; }
Return a multidimensional array with objects and their attributes
@param array|boolean $attributes Attributes to include, default to false i.e all attributes
@param array $relations Array of related object attributes or tranformed method attributes to return
e.g. related value - 'query_name' => array ('\Sonic\Model\User\Group', 'name')
e.g. object tranformed value - 'permission_value' => array ('$this', 'getStringValue')
e.g. static tranformed value - 'permission_value' => array ('self', '_getStringValue')
@param integer $recursive Output array recursively, so any $this->children also get output
@return object|boolean
Return a multidimensional array with objects and their attributes