klingzell92 /
Comment
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Configuration file for DI container. |
||
| 4 | */ |
||
| 5 | return [ |
||
| 6 | |||
| 7 | // Services to add to the container. |
||
| 8 | "services" => [ |
||
| 9 | "request" => [ |
||
| 10 | "shared" => true, |
||
| 11 | "callback" => function () { |
||
| 12 | $request = new \Anax\Request\Request(); |
||
| 13 | $request->init(); |
||
| 14 | return $request; |
||
| 15 | } |
||
| 16 | ], |
||
| 17 | "response" => [ |
||
| 18 | "shared" => true, |
||
| 19 | //"callback" => "\Anax\Response\Response", |
||
| 20 | "callback" => function () { |
||
| 21 | $obj = new \Anax\Response\ResponseUtility(); |
||
| 22 | $obj->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 23 | return $obj; |
||
| 24 | } |
||
| 25 | ], |
||
| 26 | "url" => [ |
||
| 27 | "shared" => true, |
||
| 28 | "callback" => function () { |
||
| 29 | $url = new \Anax\Url\Url(); |
||
| 30 | $request = $this->get("request"); |
||
|
0 ignored issues
–
show
|
|||
| 31 | $url->setSiteUrl($request->getSiteUrl()); |
||
| 32 | $url->setBaseUrl($request->getBaseUrl()); |
||
| 33 | $url->setStaticSiteUrl($request->getSiteUrl()); |
||
| 34 | $url->setStaticBaseUrl($request->getBaseUrl()); |
||
| 35 | $url->setScriptName($request->getScriptName()); |
||
| 36 | $url->configure("url.php"); |
||
| 37 | $url->setDefaultsFromConfiguration(); |
||
| 38 | return $url; |
||
| 39 | } |
||
| 40 | ], |
||
| 41 | "router" => [ |
||
| 42 | "shared" => true, |
||
| 43 | "callback" => function () { |
||
| 44 | $router = new \Anax\Route\Router(); |
||
| 45 | $router->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 46 | $router->configure("route2.php"); |
||
| 47 | return $router; |
||
| 48 | } |
||
| 49 | ], |
||
| 50 | "view" => [ |
||
| 51 | "shared" => true, |
||
| 52 | "callback" => function () { |
||
| 53 | $view = new \Anax\View\ViewCollection(); |
||
| 54 | $view->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 55 | $view->configure("view.php"); |
||
| 56 | return $view; |
||
| 57 | } |
||
| 58 | ], |
||
| 59 | "viewRenderFile" => [ |
||
| 60 | "shared" => true, |
||
| 61 | "callback" => function () { |
||
| 62 | $viewRender = new \Anax\View\ViewRenderFile2(); |
||
| 63 | $viewRender->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 64 | return $viewRender; |
||
| 65 | } |
||
| 66 | ], |
||
| 67 | "session" => [ |
||
| 68 | "shared" => true, |
||
| 69 | "callback" => function () { |
||
| 70 | $session = new \Anax\Session\SessionConfigurable(); |
||
| 71 | $session->configure("session.php"); |
||
| 72 | $session->start(); |
||
| 73 | return $session; |
||
| 74 | } |
||
| 75 | ], |
||
| 76 | "textfilter" => [ |
||
| 77 | "shared" => true, |
||
| 78 | "callback" => "\Anax\TextFilter\TextFilter", |
||
| 79 | ], |
||
| 80 | "rem" => [ |
||
| 81 | "shared" => true, |
||
| 82 | "callback" => function () { |
||
| 83 | $rem = new \Anax\RemServer\RemServer(); |
||
| 84 | $rem->configure("remserver.php"); |
||
| 85 | $rem->injectSession($this->get("session")); |
||
|
0 ignored issues
–
show
|
|||
| 86 | return $rem; |
||
| 87 | } |
||
| 88 | ], |
||
| 89 | "remController" => [ |
||
| 90 | "shared" => false, |
||
| 91 | "callback" => function () { |
||
| 92 | $rem = new \Anax\RemServer\RemServerController(); |
||
| 93 | $rem->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 94 | return $rem; |
||
| 95 | } |
||
| 96 | ], |
||
| 97 | "navbar" => [ |
||
| 98 | "shared" => false, |
||
| 99 | "callback" => function () { |
||
| 100 | $navbar = new \Anax\Navbar\Navbar(); |
||
| 101 | $navbar->configure("navbar.php"); |
||
| 102 | $navbar->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 103 | return $navbar; |
||
| 104 | } |
||
| 105 | ], |
||
| 106 | "errorController" => [ |
||
| 107 | "shared" => true, |
||
| 108 | "callback" => function () { |
||
| 109 | $obj = new \Anax\Page\ErrorController(); |
||
| 110 | $obj->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 111 | return $obj; |
||
| 112 | } |
||
| 113 | ], |
||
| 114 | "debugController" => [ |
||
| 115 | "shared" => true, |
||
| 116 | "callback" => function () { |
||
| 117 | $obj = new \Anax\Page\DebugController(); |
||
| 118 | $obj->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 119 | return $obj; |
||
| 120 | } |
||
| 121 | ], |
||
| 122 | "flatFileContentController" => [ |
||
| 123 | "shared" => true, |
||
| 124 | "callback" => function () { |
||
| 125 | $obj = new \Anax\Page\FlatFileContentController(); |
||
| 126 | $obj->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 127 | return $obj; |
||
| 128 | } |
||
| 129 | ], |
||
| 130 | "pageRender" => [ |
||
| 131 | "shared" => true, |
||
| 132 | "callback" => function () { |
||
| 133 | $obj = new \Anax\Page\PageRender(); |
||
| 134 | $obj->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 135 | return $obj; |
||
| 136 | } |
||
| 137 | ], |
||
| 138 | "bookController" => [ |
||
| 139 | "shared" => true, |
||
| 140 | "callback" => function () { |
||
| 141 | $obj = new \Anax\Book\BookController(); |
||
| 142 | $obj->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 143 | return $obj; |
||
| 144 | } |
||
| 145 | ], |
||
| 146 | "db" => [ |
||
| 147 | "shared" => true, |
||
| 148 | "callback" => function () { |
||
| 149 | $obj = new \Anax\Database\DatabaseQueryBuilder(); |
||
| 150 | $obj->configure("testdatabase.php"); |
||
| 151 | return $obj; |
||
| 152 | } |
||
| 153 | ], |
||
| 154 | "commentController" => [ |
||
| 155 | "shared" => false, |
||
| 156 | "callback" => function () { |
||
| 157 | $commentController = new \Anax\Comment\CommentController(); |
||
| 158 | $commentController->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 159 | return $commentController; |
||
| 160 | } |
||
| 161 | ], |
||
| 162 | "userController" => [ |
||
| 163 | "shared" => true, |
||
| 164 | "callback" => function () { |
||
| 165 | $obj = new \Anax\User\UserController(); |
||
| 166 | $obj->setDI($this); |
||
|
0 ignored issues
–
show
|
|||
| 167 | return $obj; |
||
| 168 | } |
||
| 169 | ], |
||
| 170 | ], |
||
| 171 | ]; |
||
| 172 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.