src/PhpSigep/Cache/Storage/Adapter/FileSystemOptions.php
public function setDirPermission($dirPermission)
    {
        if ($dirPermission !== false) {
            if (is_string($dirPermission)) {
                $dirPermission = octdec($dirPermission);
            } else {
                $dirPermission = (int)$dirPermission;
            }

            // validate
            if (($dirPermission & 0700) != 0700) {
                throw new Exception\InvalidArgumentException(
                    'Invalid directory permission: need permission to execute, read and write by owner'
                );
            }
        }

        if ($this->dirPermission !== $dirPermission) {
            $this->dirPermission = $dirPermission;
        }

        return $this;
    }
public function setDirPermission($dirPermission)
    {
        if ($dirPermission !== false) {
            if (is_string($dirPermission)) {
                $dirPermission = octdec($dirPermission);
            } else {
                $dirPermission = (int)$dirPermission;
            }

            // validate
            if (($dirPermission & 0700) != 0700) {
                throw new Exception\InvalidArgumentException(
                    'Invalid directory permission: need permission to execute, read and write by owner'
                );
            }
        }

        if ($this->dirPermission !== $dirPermission) {
            $this->dirPermission = $dirPermission;
        }

        return $this;
    }
public function setDirPermission ( $ dirPermission ) { if ( $ dirPermission !== false ) { if ( is_string ( $ dirPermission ) ) { $ dirPermission = octdec ( $ dirPermission ) ; } else { $ dirPermission = ( int ) $ dirPermission ; } // validate if ( ( $ dirPermission & 0700 ) != 0700 ) { throw new Exception \ InvalidArgumentException ( 'Invalid directory permission: need permission to execute, read and write by owner' ) ; } } if ( $ this -> dirPermission !== $ dirPermission ) { $ this -> dirPermission = $ dirPermission ; } return $ this ; }
Set permission to create directories on unix systems
@param false|string|int $dirPermission FALSE to disable explicit permission or an octal number
@throws Exception\InvalidArgumentException
@return FilesystemOptions
@see setUmask
@see setFilePermission
@link http://php.net/manual/function.chmod.php
Set permission to create directories on unix systems