Methods

Constructor

__construct(array $map) 

If provided, will pass $map to setMap().

Parameters

$map

nullarray

Retrieve the metadata for a given class

get(object | string $class) : \PhlyRestfully\Metadata

Parameters

$class

objectstring

Object or classname for which to retrieve metadata

Returns

Does the map contain metadata for the given class?

has(object | string $class) : bool

Parameters

$class

objectstring

Object or class name to test

Returns

bool

Set the metadata map

setMap(array $map) : \PhlyRestfully\MetadataMap

Accepts an array of class => metadata definitions. Each definition may be an instance of Metadata, or an array of options used to define a Metadata instance.

fluent This method is part of a fluent interface and will return the same instance

Parameters

$map

array

Returns