public function setMode($mode)
    {
        if (!in_array($mode, $this->acceptedModes)) {
            throw new \InvalidArgumentException(sprintf('Invalid mode: [%s]', $mode));
        }

        $this->mode = $mode;
    }
public function setMode($mode)
    {
        if (!in_array($mode, $this->acceptedModes)) {
            throw new \InvalidArgumentException(sprintf('Invalid mode: [%s]', $mode));
        }

        $this->mode = $mode;
    }
public function setMode ( $ mode ) { if ( ! in_array ( $ mode , $ this -> acceptedModes ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid mode: [%s]' , $ mode ) ) ; } $ this -> mode = $ mode ; }
Set the permission mode.

@param string $mode Permission mode

@throws \InvalidArgumentException

@return void
Set the permission mode .