Skip to content

Commit 78f4f14

Browse files
Williams IsaacWilliams Isaac
Williams Isaac
authored and
Williams Isaac
committed
Completed Console Configuration and Added Console Commands
1 parent fb48346 commit 78f4f14

14 files changed

+583
-64
lines changed

Controllers/indexController.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77

88
class IndexController extends C_Base
99
{
10-
11-
private $modelObj;
12-
private $model;
13-
public $cat;
14-
1510
function __construct( $tile )
1611
{
1712
/** Loading the corresponding Model class **/

cogent

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
#!/usr/bin/env php
22
<?php
33
// application.php
4-
require 'src/AppBundle/Commands/CreateUserCommand.php';
4+
require 'src/AppBundle/Commands/CreateControllerCommand.php';
5+
require 'src/AppBundle/Commands/CreateModelCommand.php';
6+
require 'src/AppBundle/Commands/HttpRequestHandler.php';
57
require 'vendor/autoload.php';
68

79
use Symfony\Component\Console\Application;
8-
use AppBundle\Command\CreateUserCommand;
10+
use AppBundle\Commands\CreateControllerCommand;
11+
use AppBundle\Commands\CreateModelCommand;
12+
use AppBundle\Commands\HttpRequestHandler;
913

1014

1115
$application = new Application('Welcome to CogentPHP Console Developed By Williams Isaac', '0.1.0');
12-
$application->add(new CreateUserCommand());
16+
$application->add(new CreateControllerCommand());
17+
$application->add(new CreateModelCommand());
18+
$application->add(new HttpRequestHandler());
1319
// ... register commands
1420

1521
$application->run();

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"symfony/console": "2.4.x-dev",
1111
"symfony/event-dispatcher": "^3.1",
1212
"ohmy/auth":"*",
13-
"devture/form":"*"
13+
"devture/form":"*",
14+
"nategood/httpful": "^0.2.20"
1415
}
1516
}

composer.lock

Lines changed: 246 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/C_Base.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
*
1010
*/
1111
class C_Base{
12-
13-
1412
function __construct()
1513
{
1614

core/build/ControllerTemplate.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
/** Autoloading The required Classes **/
4+
5+
use Core\Core\C_Base;
6+
use Core\Core\Redirect;
7+
8+
class controllername extends C_Base
9+
{
10+
private $model;
11+
function __construct($tile)
12+
{
13+
/** Loading the corresponding Model class **/
14+
$this->model = new $tile;
15+
}
16+
17+
public function index()
18+
{
19+
/** Initializing a index.html view Found in (Views/index.html) **/
20+
Init::view('index');
21+
}
22+
}
23+
?>

0 commit comments

Comments
 (0)