Пример #1
0
 /**
  * Check the method access type.
  *
  * @param string $method
  * @return string s = safe access u = unsafe access n = none
  */
 public function getMethodAccess($method)
 {
     $doc = $this->reflection->getMethod($method)->getDocComment();
     // default access type is none
     $access = 'n';
     if (strlen($doc) > 0) {
         $safe = !!preg_match('/' . $this->safeAttribute . '/', $doc);
         $unsafe = !!preg_match('/' . $this->unsafeAttribute . '/', $doc);
         if ($safe) {
             $access = 'secure';
         } elseif ($unsafe) {
             $access = 'anonymous';
         }
     }
     return $access;
 }