src/Api/Service.php
public function getMetadata($key = null)
    {
        if (!$key) {
            return $this['metadata'];
        }

        if (isset($this->definition['metadata'][$key])) {
            return $this->definition['metadata'][$key];
        }

        return null;
    }
public function getMetadata($key = null)
    {
        if (!$key) {
            return $this['metadata'];
        }

        if (isset($this->definition['metadata'][$key])) {
            return $this->definition['metadata'][$key];
        }

        return null;
    }
public function getMetadata ( $ key = null ) { if ( ! $ key ) { return $ this [ 'metadata' ] ; } if ( isset ( $ this -> definition [ 'metadata' ] [ $ key ] ) ) { return $ this -> definition [ 'metadata' ] [ $ key ] ; } return null ; }
Get all of the service metadata or a specific metadata key value.

@param string|null $key Key to retrieve or null to retrieve all metadata

@return mixed Returns the result or null if the key is not found
Get all of the service metadata or a specific metadata key value .