src/Server/Server.php
public function setPrefix($prefix)
    {
        if (!$this->checker->setString($prefix)->getString()) {
            throw ServerException::forInvalidPrefix($prefix, 'The path is expected to be a string. Got: %s');
        }

        if (!$this->checker->isValidAbsolutePath()) {
            throw ServerException::forInvalidPrefix(
                $prefix,
                'The path is expected to be absolute and an existing directory. Got: %s'
            );
        }

        $this->prefix = $prefix;

        return $this;
    }
public function setPrefix($prefix)
    {
        if (!$this->checker->setString($prefix)->getString()) {
            throw ServerException::forInvalidPrefix($prefix, 'The path is expected to be a string. Got: %s');
        }

        if (!$this->checker->isValidAbsolutePath()) {
            throw ServerException::forInvalidPrefix(
                $prefix,
                'The path is expected to be absolute and an existing directory. Got: %s'
            );
        }

        $this->prefix = $prefix;

        return $this;
    }
public function setPrefix ( $ prefix ) { if ( ! $ this -> checker -> setString ( $ prefix ) -> getString ( ) ) { throw ServerException :: forInvalidPrefix ( $ prefix , 'The path is expected to be a string. Got: %s' ) ; } if ( ! $ this -> checker -> isValidAbsolutePath ( ) ) { throw ServerException :: forInvalidPrefix ( $ prefix , 'The path is expected to be absolute and an existing directory. Got: %s' ) ; } $ this -> prefix = $ prefix ; return $ this ; }
Sets the prefix of a server instance.


@param string $prefix the filesystem path where the web server is installed

@throws ServerException if the prefix is invalid
Sets the prefix of a server instance .