Andrew13\Cabinet\CabinetUpload::cleanPath PHP Méthode

cleanPath() public méthode

public cleanPath ( $path )
    public function cleanPath($path)
    {
        // Check to see if it begins in a slash
        if (substr($path, 0) != '/') {
            $path = '/' . $path;
        }
        // Check to see if it ends in a slash
        if (substr($path, -1) != '/') {
            $path .= '/';
        }
        return $path;
    }