F
F
Fastto2012-04-05 21:38:05
PHP
Fastto, 2012-04-05 21:38:05

How to organize autocomplete when using __get, __set?

IDE - phpStorm won
a lot for organizing autocomplete using phpdoc, but it's impossible to manage with getter-setters.
Does anyone have a recipe?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2012-04-05
@Fastto

Yes. Through phpdoc. More or less like this:

<?
/**
 * @property int $price
 * @property int $min_s
 * @property int $max_s
 *
 * @property string $link
 *
 * @property Item[] $item
 * @property Photo[] $photos
 * @property Scheme[] $schemes
 */
class Example extends EActiveRecord{
/*class body*/
}

M
Mikhail Osher, 2012-04-06
@miraage

Methods can be added in the same way

<?php
/**
 * Some class
 *
 * @method static returntype methodname() comment
 * @method returntype methodname() comment
 */
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question