protected function setState($state)
    {
        $state = intval($state);

        if ($state < 0 || $state > 3) {
            return false;
        }

        $this->state = $state;
        return true;
    }
protected function setState($state)
    {
        $state = intval($state);

        if ($state < 0 || $state > 3) {
            return false;
        }

        $this->state = $state;
        return true;
    }
protected function setState ( $ state ) { $ state = intval ( $ state ) ; if ( $ state < 0 || $ state > 3 ) { return false ; } $ this -> state = $ state ; return true ; }
Set the state of the watch. Supposed to be set internally, so it is a protected method.

@param $state State to be set.
@return bool Returns true if state is set successfully, false otherwise.
Set the state of the watch . Supposed to be set internally so it is a protected method .