Understand API documentation


Hi, i’m new in cakephp and will want understand how to read documentation.

for example to understand connect method

first step was understand Route::connect()
i have find the doc at

string $route
A string describing the template of the route

array $defaults optional []

An array describing the default route parameters. These parameters will be used by default and can supply routing >parameters that are not dynamic. See above.

$route ok

array $defaults optional [], ok is it a array, but the possibile combinations?? i can now write this array [“hello”=>“cake”] to do someting.

where i find the keys for array?


yeah API docs is kind of specific cause you need to code dive to get some of quirks about it, so about your question when you click header - connect() public static
it will redirect you to https://api.cakephp.org/3.4/source-class-Cake.Routing.Router.html#187-210 there you can see that that the function is bridge to https://api.cakephp.org/3.4/class-Cake.Routing.RouteBuilder.html#_connect and there you have all options