public function testSimple() { $object = new \stdClass(); $callback = new fXSLCallback("test:only"); $this->assertEquals("test:only", $callback->getNamespace()); $callback->setObject($object); $this->assertEquals($object, $callback->getObject()); }
/** * Register an fXSLCallback object instance * * @param fXSLCallback $callback The instance of the fXSLCallback to register */ public function registerCallback(fXSLCallback $callback) { $this->initDone = FALSE; if (!$this->registered) { $this->registerPHPFunctions(); } if (!isset(self::$registry[$this->hash])) { self::$registry[$this->hash] = array(); } self::$registry[$this->hash][$callback->getNamespace()] = $callback; }