protected function accessPropertyByKey($key)
    {
        try {
            return $this->{'get' . ucwords($key)}();
        } catch (BadMethodCallException $e) {
            throw new \RuntimeException('The ' . $key . ' parameter must have a defined get' . ucwords($key) . ' method.');
        }
    }
protected function accessPropertyByKey($key)
    {
        try {
            return $this->{'get' . ucwords($key)}();
        } catch (BadMethodCallException $e) {
            throw new \RuntimeException('The ' . $key . ' parameter must have a defined get' . ucwords($key) . ' method.');
        }
    }
protected function accessPropertyByKey ( $ key ) { try { return $ this -> { 'get' . ucwords ( $ key ) } ( ) ; } catch ( BadMethodCallException $ e ) { throw new \ RuntimeException ( 'The ' . $ key . ' parameter must have a defined get' . ucwords ( $ key ) . ' method.' ) ; } }
This method calls the accessors for keys passed in
and returns back the value it receives from the
class instance

throws an error if a defined parameter in the
$parameterRequired|$parameterOptional does
not have a reachable get[PropertyName] accessor
defined on the class instance.

@param  string $key /$parameterRequired[(*)]|$parameterOptional[(*)]/
@return mixed
@throws \BadMethodCallException
This method calls the accessors for keys passed in and returns back the value it receives from the class instance