You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.
<?php//Generate a URL appending the URI to the base URIecho$url->get('products/edit/1');
//Generate a URL for a predefined routeecho$url->get(array(
'for' => 'blog-post',
'title' => 'some-cool-stuff',
'year' => '2012',
));
//generates e.g. /show/products?id=1&name=Carrotsecho$url->get('/show/products', array('id' => 1, 'name' => 'Carrots'));
The text was updated successfully, but these errors were encountered:
Conradaek
changed the title
More clear explanation of Phalcon\Mvc\Url::get()
Suggestion of more clear explanation of Phalcon\Mvc\Url::get()
Aug 17, 2014
Looks as though the reference code you are referring to is located in the API section of the docs. This area is auto-generated by doc-block comments in the C code. For example, your link above points to code examples generated from here.
On that note though... If you look closely at the doc-block, on line 276 and read through it, you will notice that the third param is not there. Searching the whole document does not reveal a third param for $local. Which by the way, refers to weather it is a local path or not, so that answers one of your concerns.
@xboston, have you seen this before? Doc-Blocks not matching with the generated API reference? Would love your input, because this is beyond my field of experience.
Current version of example code at http://docs.phalconphp.com/en/latest/api/Phalcon_Mvc_Url.html is not enough.
I suggest to change it for:
Added 3rd example is taken from http://forum.phalconphp.com/discussion/627/phalcon-mvc-url-get-append-query-params-examples
Also the code provided by me should be modified in order to explain the last parameter of
get()
method. I mean 3rd argument which is$locale
.I asked a question on Phosphorum here http://forum.phalconphp.com/discussion/3153/what-s-last-argument-in-phalcon-mvc-url-get-for- and I will update the proposed code when sb will answer me.
The text was updated successfully, but these errors were encountered: