示例#1
0
 function __construct($data = array())
 {
     parent::__construct();
     if (isset($data['_id'])) {
         $this->id = $data['_id'];
     }
     $this->attrs = $data;
 }
示例#2
0
文件: Router.php 项目: laiello/waxphp
 function __construct($querystring, $default_object = "Home", $default_method = "index")
 {
     parent::__construct();
     $parts = explode("/", $querystring);
     $this->aliases['objectname'] = $default_object;
     $this->aliases['method'] = $default_method;
     // take apart the querystring
     $indx = 0;
     $aliases = array_keys($this->aliases);
     foreach ($parts as $part) {
         if (isset($aliases[$indx])) {
             if ($aliases[$indx] == "objectid" && !is_numeric($part)) {
                 $indx++;
             }
             $this->data[$aliases[$indx++]] = $part;
         } else {
             $this->data['args'][] = $part;
         }
     }
 }
示例#3
0
文件: View.php 项目: laiello/waxphp
 function __construct($name, WaxBlock $parent_block = NULL)
 {
     parent::__construct();
     $this->block = $parent_block;
     $this->name = $name;
 }