This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 224669 - Support for scope inheritance in template files
Summary: Support for scope inheritance in template files
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3.1
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-09 19:15 UTC by Vebut
Modified: 2013-01-09 19:15 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vebut 2013-01-09 19:15:21 UTC
Example:

MainView.php
<?php
class MainView extends View
{
    protected final function _main ()
    {
        // This call buffers/queues the given template
        // file and gives it access to the MainView scope
        $this->setTemplate("template.php");
    }

    private function privateMethod ()
    {
        // Do something private
    }
}
?>

template.php
<?php /* @var $this MainView */
$this->...
?>

This obviously wont hint the privateMethod(), but since many frameworks works on this principle it would be nice to hint the scope too. E.g: /* @scope MainView */ which would provide MainView scope on $this.