I've added my own namespace using:
PHPTAL_Dom_Defs::getInstance()->registerNamespace(new MyNewNS());

And defined the NS class as:
/* ************************************
 *
 */ /* ***************************** */
class MyNewNS extends PHPTAL_Namespace_Builtin
{
/* ************************************
 *
 */ /* ***************************** */
    public function __construct(){
        parent::__construct('MyNewNS', 'http://ctrlogic.net/tpl/phptal/ns');
        $this->addAttribute(new PHPTAL_NamespaceAttributeSurround('att', 4));
    }
}

And defined the Attribute class as:
/* ************************************
 *
 */ /* ***************************** */
class PHPTAL_Php_Attribute_MyNewNS_att extends PHPTAL_Php_Attribute
{
/* ************************************
 *
 */ /* ***************************** */
    public function before(PHPTAL_Php_CodeWriter $codewriter)
    {
$code = <<<code
Some php code here
code;
        $codewriter->pushCode($code);
    }
/* ************************************
 *
 */ /* ***************************** */
    public function after(PHPTAL_Php_CodeWriter $codewriter)
    {
    }
}

Is there any way not having this attribute class inside the PHPTAL installed repository?

I want to have it outside the PHPTAL installed repository...

Would preloading it prevent PHPTAL from searching the class inside its own installed repository?


_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to