function c_cols($d)
 {
     $h = array();
     if (!isDrw($d)) {
         $d = (array) $d;
     }
     foreach ($d as $v) {
         $h[] = cEle('td', isNumStr($v) ? array('html' => $v) : (isDrw($v) ? $v : null));
     }
     return $h;
 }
Example #2
0
 function get($k = null)
 {
     if ($k === null) {
         return $this->O;
     }
     return isNumStr($k) && isset($this->O[$k]) ? $this->O[$k] : NOT_EXIST_KEY;
 }
 static function c_attrs($a, $v = null)
 {
     $p = func_get_args();
     $m = array();
     if (isStr($a) && isNumStr($v)) {
         $s = cur_doc()->createAttribute($a);
         $s->value = $v;
         return $s;
     }
     foreach ($p as $v) {
         if (isDrw($v)) {
             foreach ($v as $i => $k) {
                 $m[] = self::c_attrs($i, $k);
             }
         }
     }
     return pure($m);
 }