pclib  2.9.5
Lightweight PHP framework
Public Member Functions | Data Fields
Action Class Reference

It encapsulates call of the controller's action: $controller->method($params). More...

Public Member Functions

 toString ()
 Convert route to string. More...
 
 fromString ($s)
 Create new Action object from the string. More...
 
 fromArray ($get)
 Create new Action object from $_GET array. More...
 

Data Fields

 $path
 Complete path such as 'products/edit', 'admin/products/edit'.
 
 $module
 Name of the module which owns controller.
 
 $controller
 Name of the controller.
 
 $method
 Controller's method name.
 
 $params
 Array of action parameters.
 

Detailed Description

It encapsulates call of the controller's action: $controller->method($params).

It Can be mapped to URL.

Member Function Documentation

◆ fromArray()

fromArray (   $get)

Create new Action object from $_GET array.

Parameters
array$get

◆ fromString()

fromString (   $s)

Create new Action object from the string.

Parameters
string$sstring-route - example: 'orders/edit/id:1'

◆ toString()

toString ( )

Convert route to string.

Returns
string $route

The documentation for this class was generated from the following file: