Skip to content

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()

Custom parameters

Alternatively, you can set custom parameters:

$boundModels->setCustomParamSource(
    [
        "param1" => "abc",
        "param2" => "def",
        "param3" => "ghi",
    ]
);
Clone this wiki locally