2017 © Pedro Peláez
 

library absolute-url-deriver

Derives an absolute URL from relative and source URLs

image

webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  • Monday, March 12, 2018
  • by webignition
  • Repository
  • 1 Watchers
  • 11 Stars
  • 9,974 Installations
  • PHP
  • 9 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 21 Versions
  • 4 % Grown

The README.md

Absolute URL deriver Build Status

Overview

Derives absolute URL from relative and source URLs., (*1)

Useful when:, (*2)

  • extracting full HREF URLs for links in a HTML document
  • determining absolute new URL for a 301 redirect where the HTTP server returned a relative Location value

Usage

The "Hello World" example

<?php
use webignition\AbsoluteUrlDeriver\AbsoluteUrlDeriver;
use webignition\Uri\Uri;

$base = 'https://example.com';
$relative = '/path?query#fragment';

$this->assertEquals(
    'https://example.com/path?query#fragment', 
    AbsoluteUrlDeriver::derive(new Uri($base), new Uri($relative))
);

Building

Using as a library in a project

If used as a dependency by another project, update that project's composer.json and update your dependencies., (*3)

"require": {
    "webignition/absolute-url-deriver": ">=3,<4"      
}

Developing

This project has external dependencies managed with [composer][3]. Get and install this first., (*4)

# Make a suitable project directory
mkdir ~/absolute-url-deriver && cd ~/absolute-url-deriver

# Clone repository
git clone git@github.com:webignition/absolute-url-deriver.git .

# Retrieve/update dependencies
composer install

Testing

Have look at the [project on travis][4] for the latest build status, or give the tests a go yourself., (*5)

cd ~/absolute-url-deriver
phpunit tests

The Versions

12/03 2018

dev-master

9999999-dev https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jon Cram

url absolute

12/03 2018

1.5.2

1.5.2.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jon Cram

url absolute

12/03 2018

dev-cs-psr4

dev-cs-psr4 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jon Cram

url absolute

20/10 2014

1.5.1

1.5.1.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jon Cram

url absolute

04/04 2014

1.5

1.5.0.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jon Cram

url absolute

13/01 2014

1.4.1.2

1.4.1.2 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

08/01 2014

1.4.1.1

1.4.1.1 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

21/10 2013

1.4.1

1.4.1.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

03/10 2013

1.4

1.4.0.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

03/10 2013

1.3.7

1.3.7.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

01/10 2013

1.3.5

1.3.5.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

01/10 2013

1.3.6

1.3.6.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

09/07 2013

1.3.4

1.3.4.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

05/04 2013

1.3.2.1

1.3.2.1 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

05/04 2013

1.3.3

1.3.3.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

18/03 2013

1.3.2

1.3.2.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

18/03 2013

1.3.1

1.3.1.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

18/03 2013

1.3

1.3.0.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

19/07 2012

1.2

1.2.0.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

19/07 2012

1.1

1.1.0.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute

17/07 2012

1.0

1.0.0.0 https://github.com/webignition/absolute-url-deriver

Derives an absolute URL from relative and source URLs

  Sources   Download

MIT

The Requires

 

by Jon Cram

url absolute