-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed the root namespace to match the corporate namespace rules.
- Loading branch information
Martin Brecht-Precht
committed
Jul 6, 2016
1 parent
e572c7a
commit 49f8bc2
Showing
7 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ A PHP library providing common URL implementation. | |
```{json} | ||
{ | ||
"require": { | ||
"markenwerk/url-util": "~1.0" | ||
"markenwerk/url-util": "~2.0" | ||
} | ||
} | ||
``` | ||
|
@@ -31,9 +31,9 @@ require_once('path/to/vendor/autoload.php'); | |
### Parsing an URL | ||
|
||
```{php} | ||
use Url; | ||
use Markenwerk\UrlUtil; | ||
$url = new Url\Url('https://john:[email protected]:8443/path/to/resource?arg1=123&arg2=test#fragment'); | ||
$url = new UrlUtil\Url('https://john:[email protected]:8443/path/to/resource?arg1=123&arg2=test#fragment'); | ||
$scheme = $url->getScheme(); | ||
fwrite(STDOUT, 'Scheme "' . $scheme . '"' . PHP_EOL); | ||
|
@@ -69,8 +69,8 @@ $url | |
->setPassword('supersecret') | ||
->setPath('path/to/another/resource') | ||
->removeQueryParameterByKey('arg2') | ||
->addQueryParameter(new Url\QueryParameter('arg1', '456')) | ||
->addQueryParameter(new Url\QueryParameter('arg3', 'test')) | ||
->addQueryParameter(new UrlUtil\QueryParameter('arg1', '456')) | ||
->addQueryParameter(new UrlUtil\QueryParameter('arg3', 'test')) | ||
->setFragment('target'); | ||
fwrite(STDOUT, 'URL "' . $url->buildUrl() . '"' . PHP_EOL); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
], | ||
"autoload": { | ||
"psr-4": { | ||
"Url\\": "src/" | ||
"Markenwerk\\UrlUtil\\": "src/" | ||
} | ||
}, | ||
"require": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,9 @@ | |
|
||
require_once('vendor/autoload.php'); | ||
|
||
use Url; | ||
use Markenwerk\UrlUtil; | ||
|
||
$url = new Url\Url('https://john:[email protected]:8443/path/to/resource?arg1=123&arg2=test#fragment'); | ||
$url = new UrlUtil\Url('https://john:[email protected]:8443/path/to/resource?arg1=123&arg2=test#fragment'); | ||
|
||
$scheme = $url->getScheme(); | ||
fwrite(STDOUT, 'Scheme "' . $scheme . '"' . PHP_EOL); | ||
|
@@ -42,8 +42,8 @@ | |
->setPassword('supersecret') | ||
->setPath('path/to/another/resource') | ||
->removeQueryParameterByKey('arg2') | ||
->addQueryParameter(new Url\QueryParameter('arg1', '456')) | ||
->addQueryParameter(new Url\QueryParameter('arg3', 'test')) | ||
->addQueryParameter(new UrlUtil\QueryParameter('arg1', '456')) | ||
->addQueryParameter(new UrlUtil\QueryParameter('arg3', 'test')) | ||
->setFragment('target'); | ||
|
||
fwrite(STDOUT, 'URL "' . $url->buildUrl() . '"' . PHP_EOL); |