2017 © Pedro Peláez
 

library path-converter

Relative path converter

image

matthiasmullie/path-converter

Relative path converter

  • Friday, February 2, 2018
  • by matthiasmullie
  • Repository
  • 10 Watchers
  • 36 Stars
  • 1,233,470 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 10 Forks
  • 0 Open issues
  • 12 Versions
  • 12 % Grown

The README.md

Path converter

Build status Code coverage Latest version Downloads total License, (*1)

Usage

use MatthiasMullie\PathConverter\Converter;

$from = '/css/imports/icons.css';
$to = '/css/minified.css';

$converter = new Converter($from, $to);
$result = $converter->convert('../../images/icon.jpg');
// $result is now '../images/icon.jpg'

Methods

__construct($from, $to)

The object constructor accepts 2 paths: the source path your file(s) is/are currently relative to, and the target path to convert to., (*2)

convert($path): string

$path is the relative file, which is currently relative to $from (in constructor). The return value will be the relative path of this same file, but now relative to $to (in constructor), (*3)

Installation

Simply add a dependency on matthiasmullie/path-converter to your composer.json file if you use Composer to manage the dependencies of your project:, (*4)

composer require matthiasmullie/path-converter

Although it's recommended to use Composer, you can actually include these files anyway you want., (*5)

License

PathConverter is MIT licensed., (*6)

The Versions

02/02 2018

dev-master

9999999-dev http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative

02/02 2018

1.1.1

1.1.1.0 http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative

26/01 2017

1.1.0

1.1.0.0 http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative

27/04 2016

1.0.8

1.0.8.0 http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative

07/01 2016

1.0.7

1.0.7.0 http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative

05/01 2016

1.0.6

1.0.6.0 http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative

01/06 2015

1.0.5

1.0.5.0 http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative

13/05 2015

1.0.4

1.0.4.0 http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative

21/02 2015

1.0.3

1.0.3.0 http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative

21/02 2015

1.0.2

1.0.2.0 http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative

21/02 2015

1.0.1

1.0.1.0 http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative

20/02 2015

1.0.0

1.0.0.0 http://github.com/matthiasmullie/path-converter

Relative path converter

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-pcre *

 

The Development Requires

converter path paths relative