$return = call_user_func_array(array($realClass, $method), $args); return isset($return) ? $return : $this; } else { throw new Exception("Method '{$method}' doesnt exist"); } } } } /** * Shortcut to pQuery::pq($arg1, $context) * Chainable. * * @see pQuery::pq() * @return pQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> * @package pQuery */ function pq($arg1, $context = null) { $args = func_get_args(); return call_user_func_array(array('pQuery', 'pq'), $args); } // add plugins dir and Zend framework to include path set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/pQuery/' . PATH_SEPARATOR . dirname(__FILE__) . '/pQuery/plugins/'); // why ? no __call nor __get for statics in php... // XXX __callStatic will be available in PHP 5.3 pQuery::$plugins = new pQueryPlugins(); // include bootstrap file (personal library config) if (file_exists(dirname(__FILE__) . '/pQuery/bootstrap.php')) { require_once dirname(__FILE__) . '/pQuery/bootstrap.php'; }