src/utility/Tools.php
public static function parseObjectToArray($object) {
        $array = array();
        if (is_object($object))
            $array = get_object_vars($object);
        elseif (is_array($object)) {
            foreach ($object as $k => &$value)
                $array[$k] = self::parseObjectToArray($value);
        } else
            $array = $object;

        return $array;
    }
public static function parseObjectToArray($object) {
        $array = array();
        if (is_object($object))
            $array = get_object_vars($object);
        elseif (is_array($object)) {
            foreach ($object as $k => &$value)
                $array[$k] = self::parseObjectToArray($value);
        } else
            $array = $object;

        return $array;
    }
public static function parseObjectToArray ( $ object ) { $ array = array ( ) ; if ( is_object ( $ object ) ) $ array = get_object_vars ( $ object ) ; elseif ( is_array ( $ object ) ) { foreach ( $ object as $ k => & $ value ) $ array [ $ k ] = self :: parseObjectToArray ( $ value ) ; } else $ array = $ object ; return $ array ; }
Transforme un object en array

@access public
@static
@param string $object : un objet
@return array $array
Transforme un object en array