예제 #1
0
 private static final function getCookieValues($value = null)
 {
     if (self::$cookie === false) {
         return null;
     }
     $l = Util::first(self::$cookie, Q::cookie('l'));
     //$l = base64_decode($l);
     //$l = Encryption::decrypt($l);
     if (substr_count($l, '|') != 5) {
         return null;
     }
     list($c['id'], $c['type'], $c['expires'], $c['timeout'], $c['hash'], $c['status']) = explode('|', $l);
     return $value ? $c[$value] : $c;
 }
예제 #2
0
 protected function readMethods(RefClass $class, $methodType)
 {
     preg_match_all($this->RGX_METHOD, $class->source, $matches, PREG_OFFSET_CAPTURE);
     $lastMethod = null;
     foreach ($matches[0] as $i => $match) {
         $method = new $methodType();
         $method->reader = $this;
         $method->file = $class->file;
         $method->offset = $class->offset + intval($match[1]);
         $method->doc = $this->readDoc($matches[1][$i][0]);
         $method->isAbstract = $matches[2][$i][1] != -1;
         $method->access = Util::first($matches[3][$i][1], 'public');
         $method->isStatic = $matches[4][$i][1] != -1;
         $method->name = trim($matches[5][$i][0]);
         $parmStr = trim($matches[6][$i][0]);
         if ($lastMethod != null) {
             $lastMethod->limit = $method->offset - 1;
         }
         if ($parmStr) {
             $method->parms = $this->readParms($parmStr);
         }
         $class->methods[] = $method;
         $lastMethod = $method;
     }
     if ($lastMethod != null) {
         $lastMethod->limit = $class->limit - 1;
     }
 }