TITAN Library for PHP5  5.6.0
Web Software Development Kit for PHP5
loadable Class Reference

Titan Loadable Callback Handler Class. More...

Inheritance diagram for loadable:
di_loadable_service_container loadable_module loadable_plugin iterator csv pdo fields cache options session mssql mysql

Public Member Functions

 __construct ($class= '', $method= '',...$params)
 
 file ($file)
 
 constructor ($class,...$params)
 
 method ($class, $method,...$params)
 
 func ($function,...$params)
 
 arguments ($type, $value)
 
 values ($name, $value= '')
 
factory_force (...$params)
 
factory (...$params)
 
execute (...$params)
 

Protected Member Functions

process_arguments ($type, array $arguments=[])
 

Detailed Description

Titan Loadable Callback Handler Class.

Class: \tl\core\loadable

Author
James E. Bush work@.nosp@m.bush.nosp@m..cc
Version
5.6.0

Constructor & Destructor Documentation

__construct (   $class = '',
  $method = '',
  $params 
)

Constructor

Parameters
mixed$class(optional) The name os a class to construct (default) none
string$method(optional) The method to use (default) '' = Use the constructor
mixed$params,...(optional) Arguments to pass to the constructor (default) use preset arguments or no arguments

Member Function Documentation

file (   $file)

Set the filename

Parameters
string$fileThe name of the file to load
constructor (   $class,
  $params 
)

Define a loadable class

Parameters
string$classThe class name
mixed$params,...(optional) The constructor parameters (may contain variables in the form "[[variable]]")
Returns
$this
method (   $class,
  $method,
  $params 
)

Define a method to use in the current loadable class object

Parameters
string$classThe class name
string$methodThe method to use
mixed$params,...(optional) The method parameters (may contain variables in the form "[[variable]]")
func (   $function,
  $params 
)

Define a loadable function

Parameters
string$functionThe function to use
mixed$params,...(optional) The method parameters (may contain variables in the form "[[variable]]")
arguments (   $type,
  $value 
)

Add an argument or argument variable to the arguments list

Parameters
string$typeOne of 'constructor' or 'method'
mixed$valueThe argument or argument variable to add (may be an array)
Returns
loadable
values (   $name,
  $value = '' 
)

Add a parameter value to fill an argument variable to the parameters list

Parameters
mixed$nameThe parameter, or array of parameters, to add
mixed$value(optional) The parameter value (default) '' = Either delete a single value, or if $name is an array and $value is empty, process the array
& process_arguments (   $type,
array  $arguments = [] 
)
protected

Process arguments, replace argument variables with their parameters, if available, and return argument array

Parameters
string$typeOne of 'constructor' or 'method'
array$arguments(optional) An array of arguments or argument variables to pass to the loadable callback (default) []
Returns
$arguments
& factory_force (   $params)

Force create an instance of the object

Parameters
mixed$params,...(optional) The constructor parameters
& factory (   $params)

Get or create an instance of the object

Parameters
mixed$params,...(optional) The constructor parameters
& execute (   $params)

Execute the loadable method or function

Parameters
mixed$params,...The arguments to pass to the method or function

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