예제 #1
0
파일: Token.php 프로젝트: JeCat/framework
 public function cloneOf(self $aOther)
 {
     $this->nType = $aOther->nType;
     $this->setSourceCode($aOther->sourceCode());
     $this->setTargetCode($aOther->targetCode());
     $this->setPosition($aOther->position());
     $this->setBelongsClass($aOther->belongsClass());
     $this->setBelongsFunction($aOther->belongsFunction());
     $this->setBelongsNamespace($aOther->belongsNamespace());
     $this->setLine($aOther->line());
     $this->sType = $this->tokenTypeName();
 }
예제 #2
0
 public function matchWeaveMethod(Token $aToken)
 {
     if (!($aClass = $aToken->belongsClass()) or $aMethod = $aToken->belongsFunction()) {
         return false;
     }
     if ($aClass->fullName() != $this->weaveClass()) {
         return false;
     }
     return preg_match($this->weaveMethodNameRegexp(), $aMethod->name());
 }