protected function _checkEntity($entity)
    {
        if (!$entity instanceof ArrayAccess && !is_array($entity)) {
            throw new RuntimeException(sprintf(
                'Route `%s` expects the URL option `_entity` to be an array or object implementing \ArrayAccess, but `%s` passed.',
                $this->template,
                getTypeName($entity)
            ));
        }
    }
protected function _checkEntity($entity)
    {
        if (!$entity instanceof ArrayAccess && !is_array($entity)) {
            throw new RuntimeException(sprintf(
                'Route `%s` expects the URL option `_entity` to be an array or object implementing \ArrayAccess, but `%s` passed.',
                $this->template,
                getTypeName($entity)
            ));
        }
    }
protected function _checkEntity ( $ entity ) { if ( ! $ entity instanceof ArrayAccess && ! is_array ( $ entity ) ) { throw new RuntimeException ( sprintf ( 'Route `%s` expects the URL option `_entity` to be an array or object implementing \ArrayAccess, but `%s` passed.' , $ this -> template , getTypeName ( $ entity ) ) ) ; } }
Checks that we really deal with an entity object

@throws \RuntimeException
@param \ArrayAccess|array $entity Entity value from the URL options
@return void
Checks that we really deal with an entity object