Source for file interceptor.php
Documentation is available at interceptor.php
* A global interceptor runs all calls not matched by a more specific rule
* This example creates a not logged in error
function intercept($className,$methodName,$params) {
// if you were using php5 you could throw an exception instead of using trigger_error
* A class level interceptor for the test class
* This examples sets the first parameter to the method name
function test($methodName,$params) {
$params[0 ] = 'Intercepted: '. $methodName. ' - Original: '. $params[0 ];
* A method level interceptor for the test::test1 method
* This examples sets the first parameter to boink
$params[0 ] = 'Intercepted: boink - Original: '. $params[0 ];
Documentation generated on Mon, 11 Mar 2019 15:19:37 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|