示例#1
0
文件: SSO.php 项目: wilaheng/wila
 private function configure($a)
 {
     $n = $a["P"];
     $b = explode("/", $n);
     $c = count($b) - 1;
     $g = $this->node;
     for ($i = 0; $i < $c; $i++) {
         $g = $g->{$b[$i]};
     }
     $q = preg_replace("/(@[A-Za-z])|([^0-9a-zA-Z|:\\/_])/", "", $n);
     $x = $this->namespace_($q);
     $this->_map[$a["C"]] = $a["C"] . ":" . $a["H"] . "@" . $x;
     $g->{$b[$c]} = $this->_map[$a["C"]] . "#" . $this->getFeatures($a["C"]);
     $c = _2cn($x);
     return $c;
 }
示例#2
0
文件: RE.php 项目: wilaheng/wila
 /**
  * @ajax
  * @ignore
  */
 public function HEAD()
 {
     $r = req();
     $z = array();
     $j = array();
     foreach ($r->objs as $i => $k) {
         try {
             if (!empty($r->args[$i])) {
                 $r->setParameter($r->args[$i]);
             }
             $p = strrpos($k, "/");
             $c = _2cn(substr($k, 0, $p));
             $m = substr($k, $p + 1);
             if (!isset($j[$c])) {
                 $j[$c] = new $c();
             }
             array_push($z, $j[$c]->{$m}());
         } catch (Exception $e) {
             array_push($z, $e->getMessage());
         }
     }
     return $z;
 }
示例#3
0
 public static function get()
 {
     $f = func_get_args();
     $n = array_shift($f);
     $n = _2cn($n);
     if (isset(self::$singleton[$n])) {
         return self::$singleton[$n];
     }
     if (!class_exists($n, false)) {
         require_once _2cp($n) . phpExt;
         if (!class_exists($n, false)) {
             throw new Exception(inf()->resourceNotFound($n));
         }
     }
     $x = new Service($n, sizeof($f) ? $f[0] : null);
     if ($x->noted(inf()->singleton)) {
         if (!isset(self::$singleton[$n])) {
             self::$singleton[$n] = $x;
         }
     }
     return $x;
 }