private function getDigitPattern()
    {
        if (!isset($this->digitPattern)) {
            $lengths = array_map('strlen', $this->digits->getDigits());

            if (count(array_flip($lengths)) === 1) {
                $this->digitPattern = array_pop($lengths);
            } else {
                $this->digitPattern = sprintf(
                    '(%s|.+)s%s',
                    implode('|', array_map('preg_quote', $this->digits->getDigits())),
                    $this->digits->isCaseSensitive() ? '' : 'i'
                );
            }
        }

        return $this->digitPattern;
    }
private function getDigitPattern()
    {
        if (!isset($this->digitPattern)) {
            $lengths = array_map('strlen', $this->digits->getDigits());

            if (count(array_flip($lengths)) === 1) {
                $this->digitPattern = array_pop($lengths);
            } else {
                $this->digitPattern = sprintf(
                    '(%s|.+)s%s',
                    implode('|', array_map('preg_quote', $this->digits->getDigits())),
                    $this->digits->isCaseSensitive() ? '' : 'i'
                );
            }
        }

        return $this->digitPattern;
    }
private function getDigitPattern ( ) { if ( ! isset ( $ this -> digitPattern ) ) { $ lengths = array_map ( 'strlen' , $ this -> digits -> getDigits ( ) ) ; if ( count ( array_flip ( $ lengths ) ) === 1 ) { $ this -> digitPattern = array_pop ( $ lengths ) ; } else { $ this -> digitPattern = sprintf ( '(%s|.+)s%s' , implode ( '|' , array_map ( 'preg_quote' , $ this -> digits -> getDigits ( ) ) ) , $ this -> digits -> isCaseSensitive ( ) ? '' : 'i' ) ; } } return $ this -> digitPattern ; }
Creates and returns the pattern for splitting strings into digits.
@return string|int Pattern to split strings into digits
Creates and returns the pattern for splitting strings into digits .