File: shell.php

Recommend this page to a friend!
  Classes of Sylvain Rabot  >  AShell  >  shell.php  >  Download  
File: shell.php
Role: Example script
Content type: text/plain
Description: Example
Class: AShell
Manage a command line shell in pure PHP
Author: By
Last change:
Date: 13 years ago
Size: 810 bytes
 

Contents

Class file image Download
<?php

/*
 * Project: Absynthe Shell
 * File: AShell.class.php
 * Author: Sylvain 'Absynthe' Rabot <sylvain@abstraction.fr>
 * Webste: http://aforge.abstraction.fr/
 * Version: alpha 1
 * Date: 08/07/2007
 * License: LGPL
 */

require './ashell.class.php';

class
dumpargs extends ASCommand
{
    public function
__construct()
    {
       
$this->name = "dumpargs";
       
$this->prompt = "dumpargs$ ";
       
$this->description = "This command show you the arguments";
       
$this->help = '';
    }
   
    public function
start()
    {
       
$this->newLine();
       
$this->write("Content of the arguments : ");
       
$this->newLine(2);
       
       
var_dump($this->arguments);
       
       
$this->newLine(2);
    }
}

$shell = new AShell();
$shell->registerCommand($command = new dumpargs());
$shell->start();


?>


For more information send a message to info at phpclasses dot org.