public function setId($id)
    {
        // blacklist
        if (!(is_string($id) and filter_var($id, \FILTER_VALIDATE_INT) !== false)
        and !is_int($id)) {
            throw new \InvalidArgumentException( "Integer ID expected." );
        }

        $this->id = (int) trim($id);

        return $this;
    }
public function setId($id)
    {
        // blacklist
        if (!(is_string($id) and filter_var($id, \FILTER_VALIDATE_INT) !== false)
        and !is_int($id)) {
            throw new \InvalidArgumentException( "Integer ID expected." );
        }

        $this->id = (int) trim($id);

        return $this;
    }
public function setId ( $ id ) { // blacklist if ( ! ( is_string ( $ id ) and filter_var ( $ id , \ FILTER_VALIDATE_INT ) !== false ) and ! is_int ( $ id ) ) { throw new \ InvalidArgumentException ( "Integer ID expected." ) ; } $ this -> id = ( int ) trim ( $ id ) ; return $ this ; }
Sets the role ID.

@param  int          $id
@return RoleAbstract Fluent Interface

@uses   $id
@throws InvalidArgumentException If parameter is not integer-like.
Sets the role ID .