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 198860 - Allow private/protected methods for $this variable
Summary: Allow private/protected methods for $this variable
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-24 15:53 UTC by RiaD
Modified: 2011-05-24 15:53 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 RiaD 2011-05-24 15:53:49 UTC
I use something like this:

index.php
<?php
include 'view.php';
$view=new View;
$view->render('index.tpl');


view.php
<?php
class View{
    private function myFunc(){
        //doSmth;
    }
    public function render($file){
        include 'templates'.$file;
    }
}

templates/index.tpl
<?php /* @var $this Viewer */?> //MakenetBeans known that I use $this as instanse of Viewer class
//some html
<?php $this->[Code Completion]?>
//some other html


I want see here private methods because I use $this 
$this can't be used as usual variable so if I use it, I can use private methods too.