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(); }
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()); }