Documentation on creating your own Components is piss-poor.
How does one read model data inside a Component?
Trying to do something as simple as trying to get $this->request->params[‘pass’][0] is making me want to kill myself. Considering Components are supposed to plug into Controllers, I’m surprised it’s as difficult as it is.
why are you not using the available information there is?
for instance you could look directly in the code. its open source and easy to browse via github:
https://github.com/cakephp/cakephp/blob/2.3/lib/Cake/Controller/Component/PaginatorComponent.php#L226
there you would find out a lot more you could ever get from any API or documention.
for instance, that using
and then
anywhere in your code you can access just about anything from the current controller.
just as if you were inside this controller.
so also:
or just
PS: there are over 6 other components to learn from, besides all those test cases to it, as well.