I am looking for a comment on a document that will define the scope / context of the current php template. (similar to @var)
Example View class:
<?php class ExampleView { protected $pageTitle; public function __construct($title) { $this->pageTitle = $title; } public function render() { require_once 'template.php'; } }
-
<?php // template.php /** @var $this ExampleView */ echo $this->pageTitle;
PHPStorm gives a validation error because access to $ pageTitle is protected.
Is there a hint of creating an area? Sort of:
<?php // template.php /** @scope ExampleView */ // <---???? /** @var $this ExampleView */ echo $this->pageTitle;
source share