/**
  * Calls signal handler method and processes the @secured annotation.
  *
  * @param string
  * @return void
  * @throws \Nette\Application\BadRequestException
  */
 public function signalReceived($signal)
 {
     $method = $this->formatSignalMethod($signal);
     if (method_exists($this, $method)) {
         $reflection = $this->getReflection()->getMethod($method);
         $annotations = $reflection->getAnnotations();
         if (isset($annotations['secured'])) {
             $protectedParams = array();
             foreach ($reflection->getParameters() as $param) {
                 if ($param->isOptional()) {
                     continue;
                 }
                 $protectedParams[$param->name] = $this->getParameter($param->name);
             }
             if ($this->getParameter('__sec') !== $this->createSecureHash($protectedParams)) {
                 $this->error('Secured parameters are not valid.', 403);
             }
         }
     }
     parent::signalReceived($signal);
 }