stupidlysimple /
php
| 1 | <!DOCTYPE HTML> |
||
| 2 | <!-- |
||
| 3 | Phantom by HTML5 UP |
||
| 4 | html5up.net | @ajlkn |
||
| 5 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) |
||
| 6 | --> |
||
| 7 | <html> |
||
| 8 | <?php |
||
| 9 | $data = ['title' => 'StupidlySimple | Controller']; |
||
| 10 | Core\Viewer::file('layouts/head', $data); ?>
|
||
| 11 | <body> |
||
| 12 | <!-- Wrapper --> |
||
| 13 | <div id="wrapper"> |
||
| 14 | |||
| 15 | <?php Viewer::file('layouts/top') ?>
|
||
|
0 ignored issues
–
show
|
|||
| 16 | |||
| 17 | <?php Viewer::file('layouts/menu') ?>
|
||
| 18 | |||
| 19 | <!-- Main --> |
||
| 20 | <div id="main"> |
||
| 21 | <div class="inner"> |
||
| 22 | <div class="contents"> |
||
| 23 | <h1>Introduction to Controller</h1> |
||
| 24 | <p>Controllers process incoming requests, handle user input and interactions, and execute appropriate |
||
| 25 | application logic. In StupidlySimple framework the controller class calls a separate view component |
||
| 26 | which is <code>View::file()</code> to generate the HTML.</p> |
||
| 27 | <p>Controllers are located in <code>/app/Controllers</code> and are automatically included by Composer. |
||
| 28 | See how we define a controller <a target="_blank" href="https://github.com/stupidlysimple/framework/blob/master/app/Controller/Hello.php">on GitHub</a>.</p> |
||
| 29 | |||
| 30 | <h1>Controller Demonstration</h1> |
||
| 31 | <p>See how controller works:</p> |
||
| 32 | |||
| 33 | <h2>1. Post a Form to /hello (view on <a target="_blank" href="https://github.com/stupidlysimple/framework/blob/master/app/Controller/Hello.php#L9">GitHub</a>)</h2> |
||
| 34 | <p>The HTML request <code>POST /hello</code> will be mapped to <code>Controller\Hello::greetForm()</code></p> |
||
| 35 | <p>Type your name and submit by clicking Greet button:</p> |
||
| 36 | <form method="post" action="./hello"> |
||
| 37 | <div class="6u 12u$(xsmall)"> |
||
| 38 | <input type="text" name="name" id="name" value="" placeholder="Name"> |
||
| 39 | </div> |
||
| 40 | <div class="12u$"> |
||
| 41 | <ul class="actions"> |
||
| 42 | <li><input type="submit" value="Greet" class="special"></li> |
||
| 43 | <li><input type="reset" value="Reset"></li> |
||
| 44 | </ul> |
||
| 45 | </div> |
||
| 46 | </form> |
||
| 47 | |||
| 48 | <h2>2. Authentication (view on <a target="_blank" href="https://github.com/stupidlysimple/framework/blob/master/app/Controller/Auth.php#L20">GitHub</a>)</h2> |
||
| 49 | <p>Authentication is handled by <code>Controller\Auth</code>. Then, the controller |
||
| 50 | will call responsible class <code>Cartalyst\Sentry</code> for everything related to authentication.</p> |
||
| 51 | <p><a href="login" target="_blank" class="button special">Login</a></p> |
||
| 52 | |||
| 53 | <h2>3. Registration (view on <a target="_blank" href="https://github.com/stupidlysimple/framework/blob/master/app/Controller/Auth.php#L20">GitHub</a>)</h2> |
||
| 54 | <p>Registration is also handled by the <code>Controller\Auth</code>. The controller |
||
| 55 | will call responsible class <code>Cartalyst\Sentry</code> to do user registrations.</p> |
||
| 56 | <form method="post" action="./register" autocomplete="off"> |
||
| 57 | <div class="6u 12u$(xsmall)"> |
||
| 58 | <input type="text" name="first_name" id="first_name" value="" placeholder="First Name" autocomplete="off"> |
||
| 59 | <input type="text" name="last_name" id="last_name" value="" placeholder="Last Name" autocomplete="off"> |
||
| 60 | <input type="email" name="email" id="email" value="" placeholder="Email" autocomplete="off"> |
||
| 61 | <input type="password" name="password" id="password" value="" placeholder="Password" autocomplete="off"> |
||
| 62 | </div> |
||
| 63 | <div class="12u$"> |
||
| 64 | <ul class="actions"> |
||
| 65 | <li><input type="submit" value="Register Now" class="special"></li> |
||
| 66 | <li><input type="reset" value="Reset"></li> |
||
| 67 | </ul> |
||
| 68 | </div> |
||
| 69 | </form> |
||
| 70 | </div> |
||
| 71 | </div> |
||
| 72 | </div> |
||
| 73 | |||
| 74 | <?php Viewer::file('layouts/footer') ?>
|
||
| 75 | |||
| 76 | </div> |
||
| 77 | |||
| 78 | <?php Viewer::file('layouts/scripts') ?>
|
||
| 79 | </body> |
||
| 80 | </html> |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths