Neos\Flow\ResourceManagement\Target\FileSystemTarget::setOption PHP Method

setOption() protected method

Set an option value and return if it was set.
protected setOption ( string $key, mixed $value ) : boolean
$key string
$value mixed
return boolean
    protected function setOption($key, $value)
    {
        switch ($key) {
            case 'baseUri':
            case 'path':
            case 'extensionBlacklist':
                $this->{$key} = $value;
                break;
            case 'subdivideHashPathSegment':
                $this->subdivideHashPathSegment = (bool) $value;
                break;
            default:
                return false;
        }
        return true;
    }

Usage Example

 /**
  * Set an option value and return if it was set.
  *
  * @param string $key
  * @param mixed $value
  * @return boolean
  */
 protected function setOption($key, $value)
 {
     if ($key === 'relativeSymlinks') {
         $this->relativeSymlinks = (bool) $value;
         return true;
     }
     return parent::setOption($key, $value);
 }