protected function _actionPost(AnCommandContext $context)
    {
        $context->append(array(
            'data' => AnRequest::get('post', 'raw', array()),
        ));

        //backward compatiblity
        if ($context->data['action']) {
            $context->data['_action'] = $context->data['action'];
        }

        $action = 'post';

        if ($context->data['_action']) {
            $action = $context->data['_action'];
            if (in_array($action, array('browse', 'read', 'display'))) {
                throw new LibBaseControllerExceptionMethodNotAllowed('Action: '.$action.' not allowed');
            }
        }

        if ($context->request->getFormat() == 'json' || $context->request->isAjax()) {
            $this->registerCallback('after.post', array($this, 'forward'));
        } else {
            $context->response->setRedirect(AnRequest::get('server.HTTP_REFERER', 'url'));
        }

        return $this->getController()->execute($action, $context);
    }
protected function _actionPost(AnCommandContext $context)
    {
        $context->append(array(
            'data' => AnRequest::get('post', 'raw', array()),
        ));

        //backward compatiblity
        if ($context->data['action']) {
            $context->data['_action'] = $context->data['action'];
        }

        $action = 'post';

        if ($context->data['_action']) {
            $action = $context->data['_action'];
            if (in_array($action, array('browse', 'read', 'display'))) {
                throw new LibBaseControllerExceptionMethodNotAllowed('Action: '.$action.' not allowed');
            }
        }

        if ($context->request->getFormat() == 'json' || $context->request->isAjax()) {
            $this->registerCallback('after.post', array($this, 'forward'));
        } else {
            $context->response->setRedirect(AnRequest::get('server.HTTP_REFERER', 'url'));
        }

        return $this->getController()->execute($action, $context);
    }
protected function _actionPost ( AnCommandContext $ context ) { $ context -> append ( array ( 'data' => AnRequest :: get ( 'post' , 'raw' , array ( ) ) , ) ) ; //backward compatiblity if ( $ context -> data [ 'action' ] ) { $ context -> data [ '_action' ] = $ context -> data [ 'action' ] ; } $ action = 'post' ; if ( $ context -> data [ '_action' ] ) { $ action = $ context -> data [ '_action' ] ; if ( in_array ( $ action , array ( 'browse' , 'read' , 'display' ) ) ) { throw new LibBaseControllerExceptionMethodNotAllowed ( 'Action: ' . $ action . ' not allowed' ) ; } } if ( $ context -> request -> getFormat ( ) == 'json' || $ context -> request -> isAjax ( ) ) { $ this -> registerCallback ( 'after.post' , array ( $ this , 'forward' ) ) ; } else { $ context -> response -> setRedirect ( AnRequest :: get ( 'server.HTTP_REFERER' , 'url' ) ) ; } return $ this -> getController ( ) -> execute ( $ action , $ context ) ; }
Post action.

@param AnCommandContext $context
Post action .