Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Yaf_Controller_Abstract::setViewpathYaf_Action_Abstract::execute>
^YafLast updated: Mon, 26 Oct 2026

The Yaf_Action_Abstract class

(Yaf >=1.0.0)

Introduction

An action can be defined in a separate file in Yaf (see Yaf_Controller_Abstract). That is, an 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 publicfunction execute(mixed ...$args): mixed
public function getControllerName(): ?string
/* Inherited methods */
protected function Yaf_Controller_Abstract::display(string $tpl, ?array $parameters = ?): ?bool
public function Yaf_Controller_Abstract::forward(string $action, ?array $parameters = ?): ?bool
protected function Yaf_Controller_Abstract::render(string $tpl, ?array $parameters = ?): string|bool|null
public function Yaf_Controller_Abstract::setViewpath(string $view_directory): ?bool
}

Properties

_controller

The controller instance that owns this action, retrievable with Yaf_Action_Abstract::getController().

Table of Contents


<Yaf_Controller_Abstract::setViewpathYaf_Action_Abstract::execute>
^YafLast updated: Mon, 26 Oct 2026