-
Notifications
You must be signed in to change notification settings - Fork 1
Parameter Sources
Sid Roberts edited this page Mar 31, 2019
·
1 revision
You can decide where the parameters come from using the setParamSource()
method.
-
$boundModels->setParamSource(\Sid\Phalcon\BoundModels\Manager::DISPATCHER);
-dispatcher->getParam()
(default) -
$boundModels->setParamSource(\Sid\Phalcon\BoundModels\Manager::REQUEST_GET);
-request->getQuery()
-
$boundModels->setParamSource(\Sid\Phalcon\BoundModels\Manager::REQUEST_POST);
-request->getPost()
Alternatively, you can set custom parameters:
$boundModels->setCustomParamSource(
[
"param1" => "abc",
"param2" => "def",
"param3" => "ghi",
]
);
Licensed under the MIT License. © Sid Roberts