protected function translateSignal($signal)
    {
        if (isset($this->signals[$signal])) {
            $signal = $this->signals[$signal];
        } elseif (defined($signal)) {
            $signal = constant($signal);
        }

        if (! is_int($signal)) {
            throw new InvalidArgumentException('The given value is not a valid signal');
        }

        return $signal;
    }
protected function translateSignal($signal)
    {
        if (isset($this->signals[$signal])) {
            $signal = $this->signals[$signal];
        } elseif (defined($signal)) {
            $signal = constant($signal);
        }

        if (! is_int($signal)) {
            throw new InvalidArgumentException('The given value is not a valid signal');
        }

        return $signal;
    }
protected function translateSignal ( $ signal ) { if ( isset ( $ this -> signals [ $ signal ] ) ) { $ signal = $ this -> signals [ $ signal ] ; } elseif ( defined ( $ signal ) ) { $ signal = constant ( $ signal ) ; } if ( ! is_int ( $ signal ) ) { throw new InvalidArgumentException ( 'The given value is not a valid signal' ) ; } return $ signal ; }
Translate signals names to codes.


@param string|int $signal Signal name, PCNTL constant name or PCNTL constant value.

@throws InvalidArgumentException Then signal is not a valid signal.

@return int
Translate signals names to codes .