src/core.php
public function setPrefix($prefix)
    {
        // We ensure that the prefix is properly formatted. It
        // must start with a '/' and end without one.
        if($prefix != "") {
            if($prefix[0] != '/') {
                $prefix = '/' . $prefix;
            }
            if($prefix[strlen($prefix) - 1] == '/') {
                $prefix = substr($prefix, 0, strlen($prefix) - 1);
            }
        }

        $this->prefix = $prefix;
        return $this;
    }
public function setPrefix($prefix)
    {
        // We ensure that the prefix is properly formatted. It
        // must start with a '/' and end without one.
        if($prefix != "") {
            if($prefix[0] != '/') {
                $prefix = '/' . $prefix;
            }
            if($prefix[strlen($prefix) - 1] == '/') {
                $prefix = substr($prefix, 0, strlen($prefix) - 1);
            }
        }

        $this->prefix = $prefix;
        return $this;
    }
public function setPrefix ( $ prefix ) { // We ensure that the prefix is properly formatted. It // must start with a '/' and end without one. if ( $ prefix != "" ) { if ( $ prefix [ 0 ] != '/' ) { $ prefix = '/' . $ prefix ; } if ( $ prefix [ strlen ( $ prefix ) - 1 ] == '/' ) { $ prefix = substr ( $ prefix , 0 , strlen ( $ prefix ) - 1 ) ; } } $ this -> prefix = $ prefix ; return $ this ; }
Changes the URL prefix to work from.
@param string $prefix is the URL prefix to use, for instance "/glue".
@return this object (you can make a call chain).
Changes the URL prefix to work from .