Vendor/langcode-conv/zendframework/zend-stdlib/src/Message.php
public function getMetadata($key = null, $default = null)
    {
        if (null === $key) {
            return $this->metadata;
        }

        if (!is_scalar($key)) {
            throw new Exception\InvalidArgumentException('Non-scalar argument provided for key');
        }

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

        return $default;
    }
public function getMetadata($key = null, $default = null)
    {
        if (null === $key) {
            return $this->metadata;
        }

        if (!is_scalar($key)) {
            throw new Exception\InvalidArgumentException('Non-scalar argument provided for key');
        }

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

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

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