register($context); } public function register(Context $context) : void { $context->pushFunction("title", [ $this, 'handleTitle' ]); } public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments, string $token) { return ""; } public function handleTitle(? string $set = null) : ? string { if ( $set === null ) { return $this->title; } else { # Fixed a bug where template inheritance was rewriting title if ( empty($this->title) ) { $this->title = $set; } } return null; } }