2017 © Pedro Peláez
 

library url

A collection of url-related functions.

image

yalesov/url

A collection of url-related functions.

  • Wednesday, July 6, 2016
  • by yalesov
  • Repository
  • 1 Watchers
  • 2 Stars
  • 105 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 15 % Grown

The README.md

Yalesov\Url

Build Status, (*1)

A collection of url-related functions., (*2)

Installation

Composer:, (*3)

{
  "require": {
    "yalesov/url": "2.*"
  }
}

Usage

Turn a URL, relative or absolute, into an absolute URL:, (*4)

use Yalesov\Url\Url;
$url = Url::toAbsolute($baseUrl, $relativeUrl);

Filter out . and .. segments from URL's path:, (*5)

use Yalesov\Url\Url;
$path = Url::removeDotSegments($path);

Split a URL to its components: (reverse of Url::join()), (*6)

use Yalesov\Url\Url;
$parts = Url::split($url);
// one or more of the following keys may be present:
// $parts['scheme']   = (scheme, such as "http")
// $parts['host']     = (host name, IPv4, or IPv6 address)
// $parts['port']     = (the port number)
// $parts['user']     = (user name)
// $parts['pass']     = (user password)
// $parts['path']     = (path, e.g. a file path for "http")
// $parts['query']    = (the query)
// $parts['fragment'] = (the fragment)

Join together URL components to form a complete URL: (reverse of Url::split()), (*7)

use Yalesov\Url\Url;
$url = Url::join(array(
  'scheme'   => $scheme,
  'host'     => $host,
  'port'     => $port,
  'user'     => $user,
  'pass'     => $pass,
  'path'     => $path,
  'query'    => $query,
  'fragment' => $fragment,
));

The Versions

06/07 2016

dev-master

9999999-dev https://github.com/yalesov/php-url

A collection of url-related functions.

  Sources   Download

ISC

The Requires

 

The Development Requires

by Yulij Andreevich Lesov

url

06/07 2016

v2.0.4

2.0.4.0 https://github.com/yalesov/php-url

A collection of url-related functions.

  Sources   Download

ISC

The Requires

 

The Development Requires

by Yulij Andreevich Lesov

url

05/07 2016

v2.0.3

2.0.3.0 https://github.com/yalesov/php-url

A collection of url-related functions.

  Sources   Download

ISC

The Requires

 

The Development Requires

by Yulij Andreevich Lesov

url

05/07 2016

v2.0.2

2.0.2.0 https://github.com/yalesov/php-url

A collection of url-related functions.

  Sources   Download

ISC

The Requires

 

by Yulij Andreevich Lesov

url

05/07 2016

v2.0.1

2.0.1.0 https://github.com/yalesov/php-url

A collection of url-related functions.

  Sources   Download

ISC

The Requires

 

by Yulij Andreevich Lesov

url

05/07 2016

v2.0.0

2.0.0.0 https://github.com/yalesov/php-url

A collection of url-related functions.

  Sources   Download

ISC

The Requires

 

by Yulij Andreevich Lesov

url

03/10 2012

1.0.3

1.0.3.0 https://github.com/heartsentwined/url

A collection of url-related functions.

  Sources   Download

GPL-3.0

The Requires

 

by Avatar heartsentwined

url

28/09 2012

1.0.2

1.0.2.0 https://github.com/heartsentwined/url

A collection of url-related functions.

  Sources   Download

GPL-3.0

The Requires

 

by Avatar heartsentwined

url

08/09 2012

1.0.1

1.0.1.0 https://github.com/heartsentwined/url

A collection of url-related functions.

  Sources   Download

GPL-3.0

The Requires

 

by Avatar heartsentwined

url

08/09 2012

1.0.0

1.0.0.0 https://github.com/heartsentwined/url

A collection of url-related functions.

  Sources   Download

GPL-3.0

The Requires

 

by Avatar heartsentwined

url