Art4\JsonApiClient\Attributes::get PHP Method

get() public method

Get a value by the key of this object
public get ( string $key ) : mixed
$key string The key of the value
return mixed The value
    public function get($key)
    {
        try {
            return $this->container->get($key);
        } catch (AccessException $e) {
            throw new AccessException('"' . $key . '" doesn\'t exist in this object.');
        }
    }

Usage Example

 public function get($key)
 {
     return $this->attributes->get($key);
 }