Ejemplo n.º 1
0
 /**
  * process
  *
  * @param string $str
  * @return string
  */
 public static function process($str)
 {
     $result = "";
     $codeParser = new Miaox_Aop_CodeParser($str);
     while (($token = $codeParser->nextToken()) !== null) {
         // Internal characters ( ie, (, {, }, ) ) do not have a token_name
         if (is_array($token)) {
             $result .= Miaox_Aop_CodeCruncher::analizeToken($token, $codeParser->getIndex(), $codeParser->getInit());
         } else {
             if (is_string($token)) {
                 $result .= $token;
             }
         }
     }
     return trim($result);
 }