function c_link($o_html, $url = '', $targ = '_parent')
{
    $a = cEle('a', array('html' => isStr($o_html) ? $o_html : '', 'target' => $targ, 'href' => $url));
    if (isEle(OBJ($o_html, false))) {
        $a->addChild(OBJ($o_html));
    }
    return $a;
}
 function remove($k = null)
 {
     $s = $k == null ? $this->cell : $k->cell;
     $j = '$this->cell_store->O';
     $a = $this->cell_store->O;
     if (isEle(_drw($s)->eq(0))) {
         $s = array($s);
     }
     foreach ($s as $v1) {
         $m = $this->cell_store->search($v1);
         $this->removeChild($v1[0]);
         if (!count($m[0])) {
             continue;
         }
         foreach ($m[0] as $u) {
             $w = explode('/', $u[1]);
             for ($i = 0; $i < count($w); $i++) {
                 pure($w[$i]);
                 $j .= isset($a->O) ? "->O['" . $w[$i] . "']" : "['" . $w[$i] . "']";
                 $h = OBJ($a, false);
                 $a =& $h[$w[$i]];
             }
             eval('unset(' . $j . ');');
         }
     }
     return $this;
 }
Esempio n. 3
0
function &_clone($w)
{
    if (isEle(OBJ($w))) {
        $c = _($w)->_clone(1);
    } else {
        if (is_object($w)) {
            $c = clone $w;
        } else {
            $c = $w;
        }
    }
    return $c;
}
 function replaceChild($new, $old = null)
 {
     if (!$this->more()) {
         if (isDrw($new) || type($new) == 'DRW') {
             while (list($i, $v) = _each($new, $k)) {
                 $this->replaceChild($i, $v);
             }
         }
         if (isEle($new) && isEle($old)) {
             $this->O->replaceChild($new, $old);
         }
     } else {
         foreach ($this->O as $v) {
             _($v)->replaceChild($new, $old);
         }
     }
     return $this;
 }