/** * Adds new method to service. * * @param Method $method Method to add. */ public function addMethod(Method $method) { $this->methods[$method->getId()] = $method; }
/** * 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(); }