public function getMetadata($type)
    {
        // Handle special cases here: name and path to file.
        if ($type == self::METADATA_NAME) {
            return $this->name;
        }
        if ($type == self::METADATA_FILE) {
            return $this->file;
        }

        if (!array_key_exists($type, $this->metadata)) {
            throw new \Erebot\InvalidValueException(
                'Invalid metadata type "' . $type . '"'
            );
        }
        return $this->metadata[$type];
    }
public function getMetadata($type)
    {
        // Handle special cases here: name and path to file.
        if ($type == self::METADATA_NAME) {
            return $this->name;
        }
        if ($type == self::METADATA_FILE) {
            return $this->file;
        }

        if (!array_key_exists($type, $this->metadata)) {
            throw new \Erebot\InvalidValueException(
                'Invalid metadata type "' . $type . '"'
            );
        }
        return $this->metadata[$type];
    }
public function getMetadata ( $ type ) { // Handle special cases here: name and path to file. if ( $ type == self :: METADATA_NAME ) { return $ this -> name ; } if ( $ type == self :: METADATA_FILE ) { return $ this -> file ; } if ( ! array_key_exists ( $ type , $ this -> metadata ) ) { throw new \ Erebot \ InvalidValueException ( 'Invalid metadata type "' . $ type . '"' ) ; } return $ this -> metadata [ $ type ] ; }
Returns metadata associated with the list.

\param string $type
Type of metadata to return. See the constants
named METADATA_* from this class for valid types.

\retval mixed
The requested metadata. This is a string for types
that accept a single value (or \b null if the list does
not provide any value) or an array for multi-valued
types (an empty array may be returned in case the
list does not provide any value).

\throw Erebot::InvalidValueException
The given metadata type is invalid.
Returns metadata associated with the list .