The Yaf_Action_Abstract class

- « Yaf_Controller_Abstract::setViewpath

- Yaf_Action_Abstract::execute »

- PHP Manual
- Yaf
- The Yaf_Action_Abstract class

# The Yaf_Action_Abstract class

(Yaf >=1.0.0)

## Introduction

A action can be defined in a separate file in Yaf(see Yaf_Controller_Abstract). that is a action method can also be a Yaf_Action_Abstract class.

Since there should be a entry point which can be called by Yaf, you must implement the abstract method Yaf_Action_Abstract::execute() in your custom action class.

## Class synopsis

class Yaf_Action_Abstract extends Yaf_Controller_Abstract {
/* Properties */
protected $_controller;
/* Methods */
abstract public execute(mixed `...$args`): mixed
public getController(): Yaf_Controller_Abstract
public getControllerName(): string
/* Inherited methods */
protected Yaf_Controller_Abstract::display(string `$tpl`, array `$parameters` = ?): bool
public Yaf_Controller_Abstract::forward(string `$action`, array `$paramters` = ?): bool
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::getResponse(): Yaf_Response_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
}

## Properties

_module

_name

_request

_response

_invoke_args

_view

_controller

## Table of Contents

- Yaf_Action_Abstract::execute — Action entry point
- Yaf_Action_Abstract::getController — Retrieve controller object
- Yaf_Action_Abstract::getControllerName — Get controller name