Ejemplo n.º 1
0
 /**
  * Adds new method to service.
  *
  * @param Method $method Method to add.
  */
 public function addMethod(Method $method)
 {
     $this->methods[$method->getId()] = $method;
 }
Ejemplo n.º 2
0
 /**
  * Checks whether current method is the one specified with selected rule.
  *
  * @param Method $method Method to check.
  * @param int    $rate   Rate to check.
  *
  * @return boolean Is this the method?
  */
 public function is(Method $method, $rate = null)
 {
     return $method->getId() == $this->getId();
 }