(Yaf >=1.0.0)
はじめに
アクションは、Yaf の個別のファイルで定義します (Yaf_Controller_Abstract を参照ください)。 アクションメソッドには Yaf_Action_Abstract クラスも使えます。
Yaf から呼び出すためのエントリポイント (PHP 5.3 以降は新たなマジックメソッド __invoke が使えます。 しかし Yaf は PHP 5.3 以降専用ではないので、そのときには 実行するマジックメソッドを別に選択します) が必要なので、抽象メソッド Yaf_Action_Abstract::execute() をアクションクラスで実装する必要があります。
クラス概要
Yaf_Action_Abstract extends Yaf_Controller_Abstract {
protected
$_controller
/* メソッド */
publicgetController ( ) : Yaf_Controller_Abstract
public getControllerName ( ) : string
/* 継承したメソッド */
final private Yaf_Controller_Abstract::__construct ( )
protected Yaf_Controller_Abstract::display
( string $tpl
[, array $parameters
] ) : bool
public Yaf_Controller_Abstract::forward
( string $action
[, array $paramters
] ) : void
public Yaf_Controller_Abstract::getInvokeArg
( string $name
) : void
public Yaf_Controller_Abstract::getInvokeArgs ( ) : void
public Yaf_Controller_Abstract::getModuleName ( ) : string
public Yaf_Controller_Abstract::getName ( ) : string
public Yaf_Controller_Abstract::getRequest ( ) : Yaf_Request_Abstract
public Yaf_Controller_Abstract::getView ( ) : Yaf_View_Interface
public Yaf_Controller_Abstract::getViewpath ( ) : string
public Yaf_Controller_Abstract::init ( ) : void
public Yaf_Controller_Abstract::initView
([ array $options
] ) : void
public Yaf_Controller_Abstract::redirect
( string $url
) : bool
protected Yaf_Controller_Abstract::render
( string $tpl
[, array $parameters
] ) : string
public Yaf_Controller_Abstract::setViewpath
( string $view_directory
) : void
}
プロパティ
_module
_name
_request
_response
_invoke_args
_view
_controller
目次
- Yaf_Action_Abstract::execute — アクションのエントリポイント
- Yaf_Action_Abstract::getController — コントローラオブジェクトを取得する
- Yaf_Action_Abstract::getControllerName — Get controller name
/* プロパティ */