// require_once PHPTAL_DIR.'PHPTAL/Php/Attribute.php'; // METAL Specification 1.0 // // argument ::= Name // // Example: // // // // //
Links
// A Link //
// // PHPTAL: (access to slots may be renamed) // // // // // // slots->links)): ? > // slots->links ? > // // //
Links
// A Link //
// // /** * @package phptal.php.attribute.metal * @author Laurent Bedubourg */ class PHPTAL_Php_Attribute_METAL_DefineSlot extends PHPTAL_Php_Attribute { public function start() { $cond = sprintf('$ctx->hasSlot("%s")', $this->expression); $this->tag->generator->doIf($cond); $code = sprintf('getSlot("%s") ?>', $this->expression); $this->tag->generator->pushHtml($code); $this->tag->generator->doElse(); } public function end() { $this->tag->generator->doEnd(); } } ?>