PhpToolCase
Api Documentation Version 0.9.2
|
Prototypes | |
ptc_log ($string, $statement=null, $category=null) | |
Writes data to the messages panel. More... | |
ptc_log_sql ($string, $statement=null, $category=null) | |
Writes data to the sql panel. More... | |
ptc_stop_timer ($reference=null, $precision=1) | |
Monitors the execution of php code, or sql queries based on a reference. More... | |
ptc_attach ($reference, $string, $statement=null) | |
Attaches data to the buffer array based on a reference. More... | |
ptc_watch ($variableName, $callback=null) | |
Watches a variable that is in a declare(ticks=n){ code block }, for changes. More... | |
ptc_start_coverage () | |
Starts the code coverage analysis utility to find executed lines. More... | |
ptc_stop_coverage () | |
Stop the code coverage analysis utility. More... | |
ptc_start_trace () | |
Starts the function calls trace utility. More... | |
ptc_stop_trace () | |
Stop the function calls trace utility. More... | |
ptc_path ($type=null) | |
Retrieves the application paths stored in the PtcHandyMan::$_appPaths array. More... | |
ptc_add_path ($paths) | |
Adds application paths to the PtcHandyMan::$_appPaths array. More... | |
ptc_dir ($type=null) | |
Retrieves the directories the autoloader uses to load classes. More... | |
ptc_add_dir ($directories) | |
Adds directories to the autoloader to load classes. More... | |
ptc_add_file ($files) | |
Adds files to the class autoloader. More... | |
ptc_get_prop ($class, $propertyName) | |
Gets protected and private properties. More... | |
ptc_listen ($event, $callback, $priority=0) | |
Adds a listener to an event. More... | |
ptc_fire ($event, $data) | |
Fires an event See PtcEvent::fire( ) More... | |
ptc_run ($function, $class=null, $args=array()) | |
Runs class methods. More... | |
Go to the source code of this file.
ptc_add_dir | ( | $directories | ) |
Adds directories to the autoloader to load classes.
array | string | $directories | the full path to the directories holding the classes |
Definition at line 117 of file ptc-helpers.php.
ptc_add_file | ( | $files | ) |
Adds files to the class autoloader.
array | $files | the full path to the class file(s) |
Definition at line 126 of file ptc-helpers.php.
ptc_add_path | ( | $paths | ) |
Adds application paths to the PtcHandyMan::$_appPaths array.
See PtcHandyMan::addAppPath( )
array | string | $paths | the application paths to add |
Definition at line 99 of file ptc-helpers.php.
ptc_attach | ( | $reference, | |
$string, | |||
$statement = null |
|||
) |
Attaches data to the buffer array based on a reference.
string | $reference | a reference to look for ("$statement") |
mixed | $string | the message to show |
string | $statement | a new statement if required |
Definition at line 53 of file ptc-helpers.php.
ptc_dir | ( | $type = null | ) |
Retrieves the directories the autoloader uses to load classes.
string | $type | the directory type |
Definition at line 108 of file ptc-helpers.php.
ptc_fire | ( | $event, | |
$data | |||
) |
Fires an event See PtcEvent::fire( )
string | $event | the event name to fire |
array | $data | an array with the data you wish to pass to the listeners |
Definition at line 160 of file ptc-helpers.php.
ptc_get_prop | ( | $class, | |
$propertyName | |||
) |
Gets protected and private properties.
See PtcHandyMan::getProperty( )
mixed | $class | the name or the initialized class object |
string | $propertyName | the name of the property |
Definition at line 136 of file ptc-helpers.php.
ptc_listen | ( | $event, | |
$callback, | |||
$priority = 0 |
|||
) |
Adds a listener to an event.
string | $event | the event name, example: "event.sub_event" |
mixed | $callback | a valid callback ( closure , function , class ) |
numeric | $priority | a numeric value, higher values will execute first |
Definition at line 150 of file ptc-helpers.php.
ptc_log | ( | $string, | |
$statement = null , |
|||
$category = null |
|||
) |
Writes data to the messages panel.
mixed | $string | the string to pass |
mixed | $statement | some statement if required |
string | $category | a category for the messages panel |
Definition at line 24 of file ptc-helpers.php.
ptc_log_sql | ( | $string, | |
$statement = null , |
|||
$category = null |
|||
) |
Writes data to the sql panel.
mixed | $string | the string to pass |
mixed | $statement | some statement if required |
string | $category | a category for the sql panel |
Definition at line 34 of file ptc-helpers.php.
ptc_path | ( | $type = null | ) |
Retrieves the application paths stored in the PtcHandyMan::$_appPaths array.
See PtcHandyMan::getAppPath( )
string | $type | the path type |
Definition at line 90 of file ptc-helpers.php.
ptc_run | ( | $function, | |
$class = null , |
|||
$args = array( ) |
|||
) |
Runs class methods.
string | $function | the function/method to run |
string | $class | the class name with it's full namespace |
array | $args | an array with arguments for the method |
Definition at line 175 of file ptc-helpers.php.
ptc_start_coverage | ( | ) |
Starts the code coverage analysis utility to find executed lines.
See PtcDebug::startCoverage( )
Definition at line 69 of file ptc-helpers.php.
ptc_start_trace | ( | ) |
Starts the function calls trace utility.
Definition at line 77 of file ptc-helpers.php.
ptc_stop_coverage | ( | ) |
Stop the code coverage analysis utility.
Definition at line 73 of file ptc-helpers.php.
ptc_stop_timer | ( | $reference = null , |
|
$precision = 1 |
|||
) |
Monitors the execution of php code, or sql queries based on a reference.
string | $reference | a reference to look for ("$statement") |
string | numeric | $precision | sec/ms |
Definition at line 43 of file ptc-helpers.php.
ptc_stop_trace | ( | ) |
Stop the function calls trace utility.
Definition at line 81 of file ptc-helpers.php.
ptc_watch | ( | $variableName, | |
$callback = null |
|||
) |
Watches a variable that is in a declare(ticks=n){ code block }, for changes.
string | $variableName | the name of the variable to watch |
string | $callback | a callback to retrieve the variable |
Definition at line 62 of file ptc-helpers.php.