Documentation: SMALL Typos |
[eluser]electBlake[/eluser]
First off just want to say the documentation is stellar. I'm using CodeIgniter because of it! Anyway, I read through everything but the class references and I found a few small things I think might be bugs. SMALL. Bug On Page: http://ellislab.com/codeigniter/user-gui...uting.html Is it bug?: - the example shows (:num) not (:any) when in the explanation it says "any" Code: $route['product/(:num)'] = "catalog/product_lookup_by_id/$1"; Quote:A URL with "product" as the first segment, and anything in the second will be remapped to the "catalog" class and the "product_lookup_by_id" method passing in the match as a variable to the function. Bug On Page: http://ellislab.com/codeigniter/user-gui...#remapping Is it bug?: the example has: $this->$method(); and in the next line $this->default_... Shouldn't it just be $this->method() (maybe it was meant to be $$method() ?) Quote:The overridden function call (typically the second segment of the URI) will be passed as a parameter the _remap() function: Code: function _remap($method)
[eluser]Pascal Kriete[/eluser]
You're right that the first one should read: Quote:...and a number in the second... The second one is correct though. $method will be replaced with 'some_method', so it will be equivalent to: Code: $this->some_method(); It's called a variable function. Welcome to CodeIgniter.
[eluser]electBlake[/eluser]
thanks! I didn't know you could do a variable method like that. I got my first site up and running today. I've used cake in the past but I've never gotten into it enough to really enjoy it. CodeIgniter was a breeze. ![]()
[eluser]sophistry[/eluser]
put documentation typos in the bug tracker (link on CI home page) and they will get fixed - there is even a separate category for them. thanks.
[eluser]palZ[/eluser]
Code: http://ellislab.com/codeigniter/user-guide/libraries/file_uploading.html almost bottom of the page( Explanation table): Code: image_heigth Code: image_height
[eluser]Unknown[/eluser]
Hello, I'm a new CI user and I just found this typo when I was reading the User Guide. I was going to open a new thread but before that I decided to search the forum, so I found this thread. So I'm totally confused. Is it really a typo or it is correct, since this thread is almost 2 years old and the text has not been changed until now? Pascal Kriete says it is an error, I tested and come to the same conclusion, since the results are not correct as expected. It took 1 hour from my time until now, so I'm going to "Report a bug" as Lab Technician suggested, so it will save some time to everybody reading this in future, I hope. Code: $route['product/(:num)'] = "catalog/product_lookup_by_id/$1"; A URL with "product" as the first segment, and anything in the second will be remapped to the "catalog" class and the "product_lookup_by_id" method passing in the match as a variable to the function. |
Welcome Guest, Not a member yet? Register Sign In |