Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Code Completion: Private variables
Code Completion: Private variables [message #80181] Sun, 14 September 2008 18:22 Go to next message
Eclipse UserFriend
Originally posted by: nomail.nomail.it

Private variable (in the Example attr1) are shown by the code completion
even if they are out of scope.

Tested on 2.0 20080909 (I don't succed to install 20080913 because Eclipse
say is less recent).


<?php
class Class1
{
private $attr1;

public function __construct()
{
$this->attr1='hello!';
}

public function getAttrib()
{
echo $this->attr1;
}

}

$obj1=new Class1;
$obj1->getAttrib();

$obj1->attr1; //<<<<< Code compl. show private attr1.
?>
Re: Code Completion: Private variables [message #80831 is a reply to message #80181] Fri, 26 September 2008 09:36 Go to previous message
Eclipse UserFriend
Originally posted by: nomail.nomail.it

Vote for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=247930


"Rik" <nomail@nomail.it> ha scritto nel messaggio
news:gajkkn$oic$1@build.eclipse.org...
> Private variable (in the Example attr1) are shown by the code completion
> even if they are out of scope.
>
> Tested on 2.0 20080909 (I don't succed to install 20080913 because
> Eclipse say is less recent).
>
>
> <?php
> class Class1
> {
> private $attr1;
>
> public function __construct()
> {
> $this->attr1='hello!';
> }
>
> public function getAttrib()
> {
> echo $this->attr1;
> }
>
> }
>
> $obj1=new Class1;
> $obj1->getAttrib();
>
> $obj1->attr1; //<<<<< Code compl. show private attr1.
> ?>
>
Previous Topic:Code Completion: include require
Next Topic:Automatically returning to PHP perspective after debug session
Goto Forum:
  


Current Time: Fri Feb 03 05:09:55 GMT 2023

Powered by FUDForum. Page generated in 0.13431 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top