public function getMetadata($key, $default = null)
    {
        if (!is_string($key)) {
            throw new \InvalidArgumentException('Non-string argument provided as a metadata key');
        }

        if (array_key_exists($key, $this->metadata)) {
            return $this->metadata[$key];
        }

        return $default;
    }
public function getMetadata($key, $default = null)
    {
        if (!is_string($key)) {
            throw new \InvalidArgumentException('Non-string argument provided as a metadata key');
        }

        if (array_key_exists($key, $this->metadata)) {
            return $this->metadata[$key];
        }

        return $default;
    }
public function getMetadata ( $ key , $ default = null ) { if ( ! is_string ( $ key ) ) { throw new \ InvalidArgumentException ( 'Non-string argument provided as a metadata key' ) ; } if ( array_key_exists ( $ key , $ this -> metadata ) ) { return $ this -> metadata [ $ key ] ; } return $ default ; }
Retrieve a single metadata as specified by key

@param  string $key
@param  null|mixed $default
@throws \InvalidArgumentException
@return mixed
Retrieve a single metadata as specified by key