public static function toArray($object)
    {
        $object = AnConfig::unbox($object);

        if (is($object, 'AnObjectArray') || is($object, 'AnObjectSet')) {
            return $object->toArray();
        }

        return (array) $object;
    }
public static function toArray($object)
    {
        $object = AnConfig::unbox($object);

        if (is($object, 'AnObjectArray') || is($object, 'AnObjectSet')) {
            return $object->toArray();
        }

        return (array) $object;
    }
public static function toArray ( $ object ) { $ object = AnConfig :: unbox ( $ object ) ; if ( is ( $ object , 'AnObjectArray' ) || is ( $ object , 'AnObjectSet' ) ) { return $ object -> toArray ( ) ; } return ( array ) $ object ; }
Return the simple scalar array of the object.

@param mixed $object An object to be converted to an array

@return array
Return the simple scalar array of the object .