Skip to content

Commit

Permalink
feat: add main application handler
Browse files Browse the repository at this point in the history
  • Loading branch information
yusuftaufiq committed Apr 5, 2022
1 parent 29f2995 commit 4417f20
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/ide-helper
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ switch (true) {
}

require_once $autoload;

(new \Haemanthus\CodeIgniter3IdeHelper\Application())
->registerCommands()
->run();
46 changes: 46 additions & 0 deletions src/Application.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

namespace Haemanthus\CodeIgniter3IdeHelper;

use Silly\Application as SillyApplication;

class Application
{
const APP_NAME = 'CodeIgniter 3 IDE Helper';

const APP_VERSION = '0.1.0';

/**
* Undocumented variable
*
* @var \Silly\Application
*/
protected $app;

public function __construct()
{
$this->app = new SillyApplication(static::APP_NAME, static::APP_VERSION);
}

/**
* Undocumented function
*
* @return $this
*/
public function registerCommands()
{
return $this;
}

/**
* Undocumented function
*
* @return $this
*/
public function run()
{
$this->app->run();

return $this;
}
}

0 comments on commit 4417f20

Please sign in to comment.