src/Controller/TypeController.php
protected function __before(ServerRequestInterface $request, array $arguments)
    {
        $type_id_variable = $this->getTypeIdVariable();

        if (array_key_exists($type_id_variable, $arguments)) {
            $this->active_object = empty($arguments[$type_id_variable]) ? null : $this->pool->getById($this->getTypeClassName(), $arguments[$type_id_variable]);

            if (empty($this->active_object)) {
                return new NotFoundStatusResponse();
            }
        }

        return null;
    }
protected function __before(ServerRequestInterface $request, array $arguments)
    {
        $type_id_variable = $this->getTypeIdVariable();

        if (array_key_exists($type_id_variable, $arguments)) {
            $this->active_object = empty($arguments[$type_id_variable]) ? null : $this->pool->getById($this->getTypeClassName(), $arguments[$type_id_variable]);

            if (empty($this->active_object)) {
                return new NotFoundStatusResponse();
            }
        }

        return null;
    }
protected function __before ( ServerRequestInterface $ request , array $ arguments ) { $ type_id_variable = $ this -> getTypeIdVariable ( ) ; if ( array_key_exists ( $ type_id_variable , $ arguments ) ) { $ this -> active_object = empty ( $ arguments [ $ type_id_variable ] ) ? null : $ this -> pool -> getById ( $ this -> getTypeClassName ( ) , $ arguments [ $ type_id_variable ] ) ; if ( empty ( $ this -> active_object ) ) { return new NotFoundStatusResponse ( ) ; } } return null ; }
Run before every action.

@param  ServerRequestInterface $request
@param  array                  $arguments
@return void|StatusResponse
Run before every action .