protected static function objectToArray($object)
    {
        if (!\is_object($object)) {
            return $object;
        }

        if (\is_object($object)) {
            $object = \get_object_vars($object);
        }

        return \array_map(['static', 'objectToArray'], $object);
    }
protected static function objectToArray($object)
    {
        if (!\is_object($object)) {
            return $object;
        }

        if (\is_object($object)) {
            $object = \get_object_vars($object);
        }

        return \array_map(['static', 'objectToArray'], $object);
    }
protected static function objectToArray ( $ object ) { if ( ! \ is_object ( $ object ) ) { return $ object ; } if ( \ is_object ( $ object ) ) { $ object = \ get_object_vars ( $ object ) ; } return \ array_map ( [ 'static' , 'objectToArray' ] , $ object ) ; }
Convert a object into an array.

@param object $object

@return mixed
Convert a object into an array .