コード例 #1
0
<?php

defined('DAMMYFRAMEWORKPHP') or die('Cannot process request!!');
DAmmyCore::autoloadScripts(D_AUTOLOAD_APP, 'home');
//loads the app's model and handler component
class homeView extends DView
{
    private $model;
    function __construct()
    {
        $this->setTemplateResource(DFPath('app.view.templates', 'test.html', false));
        //sets the template file to be used as template
        $this->model = new homeModel();
        //starts the model component that contains the template context
        $this->setTemplateAdapter($this->model->context);
    }
}
new homeView();
//singing, favourite artist(why, met?, date?), want dinner?(no : write some code, yes : Jackpot!)
コード例 #2
0
 public static function init()
 {
     DAmmyCore::autoloadScripts(D_AUTOLOAD_DEFAULT);
     mt_srand((double) microtime() * 1000000);
     //seeding the randomization generator
 }