canax /
htmlform
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Services to create in the di container. |
||
| 4 | */ |
||
| 5 | return [ |
||
| 6 | "services" => [ |
||
| 7 | "request" => [ |
||
| 8 | "shared" => true, |
||
| 9 | "callback" => function () { |
||
| 10 | $request = new \Anax\Request\Request(); |
||
| 11 | $request->init(); |
||
| 12 | return $request; |
||
| 13 | } |
||
| 14 | ], |
||
| 15 | "response" => [ |
||
| 16 | "shared" => true, |
||
| 17 | "callback" => function () { |
||
| 18 | $obj = new \Anax\Response\ResponseUtility(); |
||
| 19 | $obj->setDI($this); |
||
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
Loading history...
|
|||
| 20 | return $obj; |
||
| 21 | } |
||
| 22 | ], |
||
| 23 | "url" => [ |
||
| 24 | "shared" => true, |
||
| 25 | "callback" => function () { |
||
| 26 | $url = new \Anax\Url\Url(); |
||
| 27 | $request = $this->get("request"); |
||
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
|
|||
| 28 | $url->setSiteUrl($request->getSiteUrl()); |
||
| 29 | $url->setBaseUrl($request->getBaseUrl()); |
||
| 30 | $url->setStaticSiteUrl($request->getSiteUrl()); |
||
| 31 | $url->setStaticBaseUrl($request->getBaseUrl()); |
||
| 32 | $url->setScriptName($request->getScriptName()); |
||
| 33 | //$url->configure("url.php"); |
||
| 34 | //$url->setDefaultsFromConfiguration(); |
||
| 35 | return $url; |
||
| 36 | } |
||
| 37 | ], |
||
| 38 | "session" => [ |
||
| 39 | "shared" => true, |
||
| 40 | "active" => true, |
||
| 41 | "callback" => function () { |
||
| 42 | $session = new \Anax\Session\Session(); |
||
| 43 | $session->name("anax/htmlform"); |
||
| 44 | $session->start(); |
||
| 45 | return $session; |
||
| 46 | } |
||
| 47 | ], |
||
| 48 | ], |
||
| 49 | ]; |
||
| 50 |