PhpToolCase
Api Documentation Version 0.9.2
Helper Functions (ptc-helpers.php)

Introduction

The PhpToolCase library, provides helper functions for the components. These functions can be used as shortcuts to call components methods. Using the helpers functions is just like calling the respective methods, the only difference is that you will be able to type less making the code shorter and easear to read. All helper functions work only if in the same namespace of the library, with the exception of the PtcDebug class which is only loaded once.


Getting Started

To get started using the helper functions, you nedd to include the ptc-helpers.php file. The best way to do this, is by using the PtcHandyMan::register( ) method:

// require the autoloader
require_once( 'PtcHm.php' );
// register the autolaoder, will include ptc-helpers.php file automatically

The PtcHandyMan will include the library helpers if the file ptc-helpers.php is found in the same folder.

Note
All library helpers work only if in the same namespace of the library components, with the exception of the PtcDebug class which is only loaded once.

Helpers Reference

The following sections will exaplain all library helpers and the equivalent components that are beeing called.

PtcDebug Helpers

These are all library helpers and the equivalent library methods for the PtcDebug component:


PtcHandyMan Helpers

These are all library helpers and the equivalent library methods for the PtcHandyMan component:


PtcEvent Helpers

These are all library helpers and the equivalent library methods for the PtcEvent component: