Neos\Flow\Mvc\RequestMatcher::addWeight PHP Method

addWeight() public method

Add a weight to the total
public addWeight ( integer $weight ) : void
$weight integer
return void
    public function addWeight($weight)
    {
        $this->weight += $weight;
        if ($this->parentMatcher !== null) {
            $this->parentMatcher->addWeight($weight);
        }
    }

Usage Example

 /**
  * Add a weight to the total
  *
  * @param integer $weight
  * @return void
  */
 public function addWeight($weight)
 {
     $this->weight += $weight;
     if ($this->parentMatcher !== null) {
         $this->parentMatcher->addWeight($weight);
     }
 }