PHP Classes

File: o2system

Recommend this page to a friend!
  Packages of Steeven Lim   o2system   o2system   Download  
File: o2system
Role: Example script
Content type: text/plain
Description: Example script
Class: o2system
Start projects using the with O2System Framework
Author: By
Last change:
Date: 6 years ago
Size: 1,557 bytes
 

Contents

Class file image Download
#!/usr/bin/php -q
<?php
/**
 * This file is part of the O2System PHP Framework package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @author         Steeve Andrian Salim
 * @copyright      Copyright (c) Steeve Andrian Salim
 */
// ------------------------------------------------------------------------

require_once 'cli.php';

// Set the current directory correctly for CLI requests
if ( defined( 'STDIN' ) ) {
    chdir( dirname( __FILE__ ) );
}

/*
 * ------------------------------------------------------
 * CREATE APP
 * ------------------------------------------------------
 */

// Commander
// php o2system commander/method --option --

$welcomeNote = <<<WELCOME_NOTE
    )       (
 ( /(     ) )\ )              )
 )\()) ( /((()/( (         ( /(   (     )
((_)\  )(_))/(_)))\ )  (   )\()) ))\   (
  ((_)((_) (_)) (()/(  )\ (_))/ /((_)  )\  
 / _ \|_  )/ __| )(_))((_)| |_ (_))  _((_))
| (_) |/ / \__ \| || |(_-<|  _|/ -_)| '  \()
 \___//___||___/ \_, |/__/ \__|\___||_|_|_|
                 |__/
WELCOME_NOTE;

$cliApp = new O2System\Framework\Cli\App();
$cliApp
    ->setWelcomeNote( ( new \O2System\Kernel\Cli\Writers\Text )
        ->setContextualClass( \O2System\Kernel\Cli\Writers\Text::DANGER )
        ->setString( $welcomeNote )
    )
    ->setName( FRAMEWORK_NAME )
    ->setVersion( FRAMEWORK_VERSION )
    ->setCommandersNamespace( '\O2System\Framework\Cli\Commanders' )
    ->setCommandersPath( PATH_FRAMEWORK . 'Cli/Commanders' )
    ->run();