コード例 #1
0
<?php

$widgets = new pluggable();
$widgets->plug(new kv($widgets));
function widget($name)
{
    global $widgets;
    $template = $widgets->get($name);
    $widget = new widget($template->all());
    return $widget;
}
class widget extends pluggable
{
    function __construct($data = null)
    {
        $this->plug(new kv($this, $data));
    }
    function __toString()
    {
        return $this->get('dom')->__toString();
    }
}
class dom
{
    var $children = array();
    var $css = array();
    var $attrs = array();
    var $jsCalls = array();
    var $singular = false;
    static $singulars = array();
    static $jsFiles = array('toggler' => 'http://localhost/~keeyipchan/tinyTinyFw/_lib/tinyTinyFw.controls.js');
コード例 #2
0
ファイル: tinyTinyFw.php プロジェクト: keeyipchan/tinyTinyFw
    {
        return $this;
    }
    function take()
    {
        return $this;
    }
}
function field($key, $config)
{
    $field = new Field();
    $field->config = array_merge(array('key' => $key, 'property' => $property), $config);
    return $field;
}
$modules = new pluggable();
$modules->plug(new kv($modules));
class module extends pluggable
{
    var $fields = array();
    function prompt($field)
    {
        $this->fields = array_merge($this->fields, array($field));
        return $this;
    }
    function __construct()
    {
        $this->plug(new kv($this));
    }
    function run()
    {
        if (empty($_POST)) {