Some days ago a new shell script has been added to the core of CakePHP: the API shell. It can be used to display the (public) method signatures of core classes via command line.

The usage of the script is simple (even though I have to admit I understood it only after Mariano Iglesias‘ explanations *g*):

cake api [<path>] <classname>

<path> is optional, but if it is used it has to be one of the following values: “behavior”, “cache”, “controller”, “component”, “helper”, “model”, or “view”. So if you want to show the method signatures of the FormHelper, you would use this command:

cake api helper FormHelper

If no <path> is specified, the script looks in the cake/libs folder for the specified class.

Personally, I think it won’t be very useful for me, because I can request the more detailed online API documentation of a class with a simple url:

http://api.cakephp.org/1.2/class_<underscored_class_name>.html

Btw: On the @TheKeyboard blog the grumpy guy (aka Chris Hartjes) has published a short screencast to introduce another core shell script: the console.