Load
Function: load
Visibility: public static
Parameter: load($class,$directory,$params)
Description:
Loads and initiate specific class. If class have already been loaded before, it will not load again, but return the same instance from the memory. Uses singelton design and static workflow to insure fast delivery and low memory consumption. Loading classes will be made from under labYard folder.
Parameters:
(required) - string - $class - The class name.
(optional) - string - $directory - The directory in which the class exists, if empty, "functions" directory will be used.
(optional) - array - $params - Parameters to pass to the class - Only if it's the first time class initiated.
Return:
object - The class itself.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
We want to initiate the class "trans" to get the translation going.
How to call (example):
Possible outcome (example):
Output: