private function convertSerializedToObjects($data)
    {
        $data = @unserialize($data);

        // If it is an object then
        // we can just return it...
        if (is_object($data))
        {
            return $data;
        }

        // It could be a associative array so use
        // JSON to encode it and then decode it properly...
        if (is_array($data) and $json = $this->convertToJson($data))
        {
            return $this->convertJsonToObjects($json);
        }

        return null;
    }
private function convertSerializedToObjects($data)
    {
        $data = @unserialize($data);

        // If it is an object then
        // we can just return it...
        if (is_object($data))
        {
            return $data;
        }

        // It could be a associative array so use
        // JSON to encode it and then decode it properly...
        if (is_array($data) and $json = $this->convertToJson($data))
        {
            return $this->convertJsonToObjects($json);
        }

        return null;
    }
private function convertSerializedToObjects ( $ data ) { $ data = @ unserialize ( $ data ) ; // If it is an object then // we can just return it... if ( is_object ( $ data ) ) { return $ data ; } // It could be a associative array so use // JSON to encode it and then decode it properly... if ( is_array ( $ data ) and $ json = $ this -> convertToJson ( $ data ) ) { return $ this -> convertJsonToObjects ( $ json ) ; } return null ; }
Convert a serialized response to objects

@param string $data

@return array|object||null
Convert a serialized response to objects