Skip to content

Commit 8ae4252

Browse files
committed
Merge pull request #8 from jeremykendall/psl
Adds public suffix list parsing
2 parents 52b4bb5 + 06f8768 commit 8ae4252

10 files changed

+18582
-7031
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
vendor
22
composer.lock
3+
data/public-suffix-list.txt

README.markdown

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ echo $url; // http://jwage.com#about/me?param1=value1&param2=value2
102102

103103
### Domain Parts
104104

105-
Purl can parse a URL in to parts and its canonical form. It uses the list of domains from http://publicsuffix.org to break the domain into its suffix, domain, subdomain and canonical form.
105+
Purl can parse a URL in to parts and its canonical form. It uses the list of domains from http://publicsuffix.org to break the domain into its public suffix, registerable domain, subdomain and canonical form.
106106

107107
```php
108108
<?php
109109
$url = new \Purl\Url('http://about.jwage.com');
110110

111-
echo $url->suffix; // com
112-
echo $url->domain; // jwage
111+
echo $url->publicSuffix; // com
112+
echo $url->registerableDomain; // jwage
113113
echo $url->subdomain; // about
114114
echo $url->canonical; // com.jwage.about/
115115
```

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"psr-0": {"Purl": "src/"}
1313
},
1414
"require": {
15-
"php": ">=5.3.0"
15+
"php": ">=5.3.0",
16+
"jeremykendall/php-domain-parser": "0.0.6"
1617
}
1718
}

0 commit comments

Comments
 (0)