public function load()
    {
        // Initial state, is always empty array
        $data = array();

        // Alter $data in case it exists and its valid
        if ($this->storageAdapter->has($this->key)) {
            $target = $this->serializer->unserialize($this->storageAdapter->get($this->key));

            // If $target is null, then data either is damaged or doesn't exist, otherwise it's okay
            if ($target !== null) {
                $data = $target;
            }
        }

        return $data;
    }
public function load()
    {
        // Initial state, is always empty array
        $data = array();

        // Alter $data in case it exists and its valid
        if ($this->storageAdapter->has($this->key)) {
            $target = $this->serializer->unserialize($this->storageAdapter->get($this->key));

            // If $target is null, then data either is damaged or doesn't exist, otherwise it's okay
            if ($target !== null) {
                $data = $target;
            }
        }

        return $data;
    }
public function load ( ) { // Initial state, is always empty array $ data = array ( ) ; // Alter $data in case it exists and its valid if ( $ this -> storageAdapter -> has ( $ this -> key ) ) { $ target = $ this -> serializer -> unserialize ( $ this -> storageAdapter -> get ( $ this -> key ) ) ; // If $target is null, then data either is damaged or doesn't exist, otherwise it's okay if ( $ target !== null ) { $ data = $ target ; } } return $ data ; }
Loads data from a storage

@return array Returns loaded data
Loads data from a storage