public function get($key, $metadata = false)
    {
        /**
         * get <key>*\r\n
         */

        // Build packet to send ...
        $data = self::COMMAND_GET . self::COMMAND_SEPARATOR   .
            $key                  . self::COMMAND_TERMINATOR;

        $result = $this->send(self::COMMAND_GET, $data);

        // Strip all overhead if no metadata requested!
        if ($metadata === false && $result !== false) {
            $result = array_column($result, 'value', 0);
            $result = $result[0];
        }

        return $result;
    }
public function get($key, $metadata = false)
    {
        /**
         * get <key>*\r\n
         */

        // Build packet to send ...
        $data = self::COMMAND_GET . self::COMMAND_SEPARATOR   .
            $key                  . self::COMMAND_TERMINATOR;

        $result = $this->send(self::COMMAND_GET, $data);

        // Strip all overhead if no metadata requested!
        if ($metadata === false && $result !== false) {
            $result = array_column($result, 'value', 0);
            $result = $result[0];
        }

        return $result;
    }
public function get ( $ key , $ metadata = false ) { /**
         * get <key>*\r\n
         */ // Build packet to send ... $ data = self :: COMMAND_GET . self :: COMMAND_SEPARATOR . $ key . self :: COMMAND_TERMINATOR ; $ result = $ this -> send ( self :: COMMAND_GET , $ data ) ; // Strip all overhead if no metadata requested! if ( $ metadata === false && $ result !== false ) { $ result = array_column ( $ result , 'value' , 0 ) ; $ result = $ result [ 0 ] ; } return $ result ; }
Returns the response for passed key.

@param string $key      The key to return response for.
@param bool   $metadata TRUE to return metadata like lifetime ... as well, FALSE to return value only

@author Benjamin Carl <opensource@clickalicious.de>
@return mixed The response for command get
@access public
Returns the response for passed key .