mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding visibility to a few methods.
This commit is contained in:
parent
1424e02488
commit
22bb07abb0
1 changed files with 2 additions and 2 deletions
|
@ -582,7 +582,7 @@ class CakeRequest implements ArrayAccess {
|
|||
* @param int $tldLength Number of segments your tld contains
|
||||
* @return string Domain name without subdomains.
|
||||
*/
|
||||
function domain($tldLength = 1) {
|
||||
public function domain($tldLength = 1) {
|
||||
$segments = explode('.', $this->host());
|
||||
$domain = array_slice($segments, -1 * ($tldLength + 1));
|
||||
return implode('.', $domain);
|
||||
|
@ -594,7 +594,7 @@ class CakeRequest implements ArrayAccess {
|
|||
* @param int $tldLength Number of segments your tld contains.
|
||||
* @return array of subdomains.
|
||||
*/
|
||||
function subdomains($tldLength = 1) {
|
||||
public function subdomains($tldLength = 1) {
|
||||
$segments = explode('.', $this->host());
|
||||
return array_slice($segments, 0, -1 * ($tldLength + 1));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue