Intellisense by only php comment without declaration
4 posts
• Page 1 of 1
Intellisense by only php comment without declaration
I use CakePHP 2.0 that is one of PHP frameworks.
It generates class member automatically by its library feature.
For example;
I want to suggest generated member information to PHP Tools Intellisense.
I first thought I can suggest it by comment, but Intellisense didn't recognize it without declaring variable explicitly.
I want not to declare it because it is generated by framework.
Is there a solution for it?
It generates class member automatically by its library feature.
For example;
- Code: Select all
class BananasController extends AppController{
/**
* @var Banana $Banana description (I hope this comment information were recognized by Intallisense without declaring variable, but it doesn't.)
*/
// public $Banana; // I want not to declare it because it is generated by framework.
public function index()
{
// CakePHP generate "Banana" member whose type is Banana class.
$this->Banana-> // I hope Intellisense works here.
}
}
I want to suggest generated member information to PHP Tools Intellisense.
I first thought I can suggest it by comment, but Intellisense didn't recognize it without declaring variable explicitly.
I want not to declare it because it is generated by framework.
Is there a solution for it?
- kkoba
- Posts: 25
- Joined: June 22nd, 2013, 11:13 am
Re: Intellisense by only php comment without declaration
According to PHPDoc specification, 'magic' class members can be declared by using @property and @method keywords.
See http://www.devsense.com/doc/phptools/ed ... c-comments (DOCUMENTING CLASS & CLASS MEMBERS) or http://manual.phpdoc.org/HTMLSmartyConv ... y.pkg.html for more details.
Thanks,
See http://www.devsense.com/doc/phptools/ed ... c-comments (DOCUMENTING CLASS & CLASS MEMBERS) or http://manual.phpdoc.org/HTMLSmartyConv ... y.pkg.html for more details.
Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Intellisense by only php comment without declaration
Thanks!
I fulfilled my aim by "@property" and "@method" comments!
Sorry for bothering you but I had not noticed "magic" keyword and has not been able to find any information for it.
My workspace got better by your advice. It's so great!
I fulfilled my aim by "@property" and "@method" comments!
Sorry for bothering you but I had not noticed "magic" keyword and has not been able to find any information for it.
My workspace got better by your advice. It's so great!
- kkoba
- Posts: 25
- Joined: June 22nd, 2013, 11:13 am
Re: Intellisense by only php comment without declaration
I'm glad it works.
Please let me know if there would be anything else we can do for your workspace!
Thanks,
Please let me know if there would be anything else we can do for your workspace!
Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 78 guests