From cb14fc2e6bea01b3ef7fa0a1e5a75988bf73957a Mon Sep 17 00:00:00 2001 From: "Daniel St. Jules" Date: Wed, 21 Dec 2016 23:28:07 -0800 Subject: [PATCH] Change private to protected to facilitate extending class --- src/Stringy.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Stringy.php b/src/Stringy.php index 1d4a116..8f71cce 100644 --- a/src/Stringy.php +++ b/src/Stringy.php @@ -1776,7 +1776,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess * @param string $padStr String used to pad * @return Stringy String with padding applied */ - private function applyPadding($left = 0, $right = 0, $padStr = ' ') + protected function applyPadding($left = 0, $right = 0, $padStr = ' ') { $stringy = static::create($this->str, $this->encoding); $length = \mb_strlen($padStr, $stringy->encoding); @@ -1804,7 +1804,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess * @param string $pattern Regex pattern to match against * @return bool Whether or not $str matches the pattern */ - private function matchesPattern($pattern) + protected function matchesPattern($pattern) { $regexEncoding = $this->regexEncoding(); $this->regexEncoding($this->encoding); @@ -1819,7 +1819,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess * Alias for mb_ereg_replace with a fallback to preg_replace if the * mbstring module is not installed. */ - private function eregReplace($pattern, $replacement, $string, $option = 'msr') + protected function eregReplace($pattern, $replacement, $string, $option = 'msr') { static $functionExists; if ($functionExists === null) { @@ -1838,7 +1838,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess * Alias for mb_regex_encoding which default to a noop if the mbstring * module is not installed. */ - private function regexEncoding() + protected function regexEncoding() { static $functionExists; @@ -1852,7 +1852,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess } } - private function supportsEncoding() + protected function supportsEncoding() { $supported = array('UTF-8' => true, 'ASCII' => true);