Location: PHPKode > projects > AModules3 > amodules-3.0.1/samples/08-namespaces/main.php
<?
include '../../trunk/loader.php';

class MyApi extends ApiAdmin {
    function layout_Menu(){
        $this->add('Menu',null,'Menu')
            ->addMenuItem('Banana')
            ->addMenuItem('Orange')
            ->addMenuItem('Pink')
            ->addMenuItem('Apple')
            ->addMenuItem('Lemon')
            ;

    }
    function init(){
        parent::init();
        $this->addNamespace('namespacetest');
        $this->addNamespace('ClassDoc');
        $this->dbConnect();
    }

    function page_Banana($p){
        $p->template->set('Content','That is one good banana');
    }
    function page_Orange($p){
        $p->template->set('Content','kumi');
    }
    function page_Pink($p){
        $p->template->set('Content','Big Pink House');
    }
    function page_Apple($p){
        $p->template->set('Content','Adam\'s apple');
    }
    function page_Lemon($p){
        $p->template->set('Content','Tea with lemon? What is that?');
    }
}

$api = new MyApi('nmt');
$api->main();
?>
Return current item: AModules3