PHP 8.6.0 Beta 3 is available for testing

Yaf_Controller_Abstract::getInvokeArgs

(Yaf >=1.0.0)

Yaf_Controller_Abstract::getInvokeArgsRetrieve all action invocation arguments

Açıklama

public function Yaf_Controller_Abstract::getInvokeArgs(): ?array

Returns all invocation arguments of the current action, as an array keyed by argument name. Invocation arguments are passed to the action through Yaf_Controller_Abstract::forward().

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

An array of invocation arguments, or null if none were given.

Örnekler

Örnek 1 Yaf_Controller_Abstract::getInvokeArgs() example

<?php
class ProductController extends Yaf_Controller_Abstract
{
    public function indexAction() {
        $this->forward("list", array("category" => "book", "page" => 2));
        return false; // ends the current flow
    }

    public function listAction() {
        // all invocation arguments of the current action
        var_dump($this->getInvokeArgs());
    }
}
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

array(2) {
  ["category"]=>
  string(4) "book"
  ["page"]=>
  int(2)
}

Ayrıca Bakınız

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top