This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/libraries/Console/Application.php

40 lines
714 B
PHP
Raw Normal View History

2016-01-22 21:07:44 +01:00
<?php
2016-02-03 23:22:56 +01:00
/**
* Holds the console application meta.
2016-03-08 18:07:58 -05:00
*
2016-02-03 23:22:56 +01:00
* @package Sakura
*/
2016-01-22 21:07:44 +01:00
namespace Sakura\Console;
/**
2016-02-02 22:04:15 +01:00
* Command line interface main.
2016-03-08 18:07:58 -05:00
*
2016-01-22 21:07:44 +01:00
* @package Sakura
2016-02-02 22:04:15 +01:00
* @author Julian van de Groep <me@flash.moe>
2016-01-22 21:07:44 +01:00
*/
class Application extends \CLIFramework\Application
{
2016-02-02 22:04:15 +01:00
/**
* CLI Application name
*/
2016-01-22 21:07:44 +01:00
const NAME = 'Sakura';
2016-02-02 22:04:15 +01:00
/**
* CLI Application version
*/
2016-01-22 21:07:44 +01:00
const VERSION = SAKURA_VERSION;
2016-02-02 22:04:15 +01:00
/**
* CLI initialiser
*/
2016-01-22 21:07:44 +01:00
public function init()
{
2016-02-19 22:49:00 +01:00
// Execute the original init function
2016-01-22 21:07:44 +01:00
parent::init();
2016-02-19 22:49:00 +01:00
// Add commands with class reference because the autoloader is retarded
$this->command('serve', Command\ServeCommand::class);
2016-01-22 21:07:44 +01:00
}
}