You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,13 +87,13 @@ final class Rules
87
87
88
88
Domain name resolution is done using the `Pdp\Rules::resolve` method which expects at most two parameters:
89
89
90
-
-`$domain` a valid domain name as a string
91
-
-`$type` a string to optionnally specify which section of the PSL you want to validate the given domain against. The possible values are:
90
+
-`$domain` a domain name as a string
91
+
-`$type` a string which specifies which section of the PSL you want to validate the given domain against. The possible values are:
92
92
-`Rules::ALL_DOMAINS`, to validate against the full PSL.
93
-
-`Rules::ICANN_DOMAINS`, to validate against the PSL ICANN section only.
94
-
-`Rules::PRIVATE_DOMAINS`, to validate against the PSL PRIVATE section only.
93
+
-`Rules::ICANN_DOMAINS`, to validate against the PSL ICANN DOMAINS section only.
94
+
-`Rules::PRIVATE_DOMAINS`, to validate against the PSL PRIVATE DOMAINS section only.
95
95
96
-
By default, the `$type` argument is equal to `Rules::ALL_DOMAINS`. If an unrecognized section is submitted otherwise, a `Pdp\Exception` exception will be thrown.
96
+
By default, the `$type` argument is equal to `Rules::ALL_DOMAINS`. If an unsupported section is submitted otherwise, a `Pdp\Exception` exception will be thrown.
97
97
98
98
99
99
The `Pdp\Rules::resolve` returns a `Pdp\Domain` object.
@@ -118,15 +118,15 @@ The `Pdp\Domain` getter methods returns:
118
118
- the submitted domain name using `Pdp\Domain::getDomain`
119
119
- the public suffix part normalized according to the domain using `Pdp\Domain::getPublicSuffix`
120
120
- the registrable domain part using `Pdp\Domain::getRegistrableDomain`
121
-
- the subdomain part usung `Pdp\Domain::getSubDomain`.
121
+
- the subdomain part using`Pdp\Domain::getSubDomain`.
122
122
123
123
If the domain name or some of its part are seriously malformed or unrecognized, the getter methods will return `null`.
124
124
125
-
**The Domain name public status status depends on the PSL section used to resolve them:**
125
+
**The Domain name status depends on the PSL section used to resolve it:**
126
126
127
-
-`Pdp\Domain::isKnown` returns `true` if the public suffix is found in the selected PSL
128
-
-`Pdp\Domain::isICANN` returns `true` if the domain name resolution is done against a PSL which includes the ICANN DOMAINS section and its public suffix is found in it;
129
-
-`Pdp\Domain::isPrivate` returns `true` if the domain name resolution is done against a PSL which includes the PRIVATE DOMAINS section and its public suffix is found in it;
127
+
-`Pdp\Domain::isKnown` returns `true` if the public suffix is found in the selected PSL;
128
+
-`Pdp\Domain::isICANN` returns `true` if the public suffix is found in a selected PSL which includes the ICANN DOMAINS section;
129
+
-`Pdp\Domain::isPrivate` returns `true` if the public suffix is found in a selected PSL which includes the PRIVATE DOMAINS section;
130
130
131
131
**THIS EXAMPLE ILLUSTRATES HOW EACH OBJECT IS USED BUT SHOULD BE AVOID IN A PRODUCTIVE ENVIRONMENT**
The `Manager::refreshRules` method enables refreshing your local copy of the PSL stored with your [PSR-16](http://www.php-fig.org/psr/psr-16/) Cache and retrieved using the Http Client. By default the method will use the `Manager::PSL_URL` as the source URL but you are free to substitute this URL with your own.
283
+
The `Pdp\Manager::refreshRules` method enables refreshing your local copy of the PSL stored with your [PSR-16](http://www.php-fig.org/psr/psr-16/) Cache and retrieved using the Http Client. By default the method will use the `Manager::PSL_URL` as the source URL but you are free to substitute this URL with your own.
284
284
The method returns a boolean value which is `true` on success.
0 commit comments