2017 © Pedro Peláez
 

library url

Url is a small PHP class that helps dealing with Urls.

image

arne-groskurth/url

Url is a small PHP class that helps dealing with Urls.

  • Wednesday, February 28, 2018
  • by arnegroskurth
  • Repository
  • 1 Watchers
  • 2 Stars
  • 4,238 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 12 % Grown

The README.md

Url

Build Status codecov License, (*1)

Url is a small PHP class that helps dealing with Urls., (*2)

Setup

$ composer require arne-groskurth/url

Examples

<?php

use ArneGroskurth\Url\Url;

// construct url
$url = new Url();
$url->setHost('domain.tld');
$url->setScheme('ftps');

// parses given url
$url = new Url('http://username:password@www.test.com:8080/some/path.html?one=1&two=2#myfrag');

// modify parts
$url->setPort(80);
$url->removeQueryParameter('two');
$url->setQueryParameter('three', 3);

// get back url string
print $url->getUrl();

// avoid some parts on return
print $url->getUrl(Url::ALL - Url::CREDENTIALS);
print $url->getUrl(Url::SCHEME + Url::PORT);

// interpret link relative to some url
print $url->resolveRelativeUrl('../other/path.html')->getUrl();
print $url->resolveRelativeUrl('//domain.tld/')->getUrl();

The Versions

28/02 2018

dev-master

9999999-dev https://github.com/arnegroskurth/Url

Url is a small PHP class that helps dealing with Urls.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Arne Groskurth

url

28/02 2018

v1.1.0

1.1.0.0 https://github.com/arnegroskurth/Url

Url is a small PHP class that helps dealing with Urls.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Arne Groskurth

url

21/10 2016

v1.0

1.0.0.0 https://github.com/arnegroskurth/Url

Url is a small class that helps dealing with Urls.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Arne Groskurth

url