How much do you use API?

Am I the only one who have difficulties recalling all that parameter lists and orders?

What is your strategy to remember method signatures, apart from code completion?


I extensively use chm, it is pinned to my start menu. :P Still, it takes time to find signatures.

Hehe :D

Sometimes I open the framework source and navigate to necessary method or class :)

For the same scenario, I use svn trunk browser at google code. :)

Yeat another solution. :) Anybody else?

A cheat sheet would also be nice (already discussed here).

One good solution is an editor with code hinting support. In Komodo Edit just add the framework path to the code hinting libraries and you have full doc for the entire framework, right on your editor ;D . Aptana, Netbeans and other editors also have this feature.

But this wouldn’t work for custom components. What if I want to use Yii::app()->db2 besides the original one?

pestaa, for Netbeans I’m using vdoc hints to identify a class behind Yii::app()->db2:


/* @var $something CSomething */

Didnt know that. Thanks - very handy!


That is very handy indeed, although I’m quite lazy to define variable types in each scope. :)

Funny :)

What is chm??^-^

The Yii Class Reference in chm-format -

But why not use code completion, or at least the dropdowns with all the hints/suggestions?

Also, with nb and eclipse, you can drill straight into the framework/extensions source with <ctrl>-click on a class or method name (well, any class, but those too). And when there are multiple options, it shows them in a list. So it also works on your own components; I use it all the time.

<Off to investigate db2…>

I extensively use Ctrl-P in NetBeans, which shows me a very simple parameter list, if accessible.

I find <ctrl>+P to be quite buggy :frowning: So I tend to use <ctrl>+<space> after the function name. Since I have the automatic completion pop-ups switched off, I also use <ctrl>+<shift>+<space> to get the docs.

It’d be nice to see into Blah::model()-> though.

Something similar has been asked as a feature, I’m not sure however, whether this is the same or not.

As far as I know, @return phpdoc should be defined before model() and other chainable functions.

What do you mean by buggy? I haven’t had any problems with parameter lists so far.

I sometimes get the wrong values, that’s all. Probably driver error :unsure: