Splits a valid ISBN-13 Number in its components

@param string $input The ISBN Numeber.
@return array['bookland']['publisherNumber']['ArticleNumber']['Checksum']
@access public
@throws NO ERROR HANDLING
199690
public function splitIsbn($isbn)
    {
        if (!$this->validateIsbn($isbn))
        {
            return false;
        } 
        $prefix         = substr($isbn, 0,3);
        $groupnumber    = $this->getGroupNumber($isbn);
        $pubnumber      = $this->getPublisherNumber($isbn);
        $prenumbers     = strlen($groupnumber)+strlen($pubnumber)+3;
        $articleNumber  = substr($isbn, $prenumbers, -1);
        $checkdigit     = substr($isbn, -1);
        return (array($prefix, $groupnumber, $pubnumber, $articleNumber, $checkdigit));        
    }
202360
private static function collectClosures(&$input) {
        static $closureNo = 1;
        $closures = [];
        if (is_array($input)) {
            foreach ($input as &$value) {
                if (is_array($value) || $value instanceof Closure) {
                    $closures = array_merge($closures, self::collectClosures($value));
                }
            }
        } elseif ($input instanceof Closure) {
            $closureNo++;
            $key = "--==<<[[((Closure#$closureNo))]]>>==--";
            $closures[$key] = $input;
            $input = $key;
        }

        return $closures;
    }
157197
public function hash($input) {
		$hash = crypt($input, $this->getSalt());

		if(strlen($hash) > 13)
			return $hash;

		return false;
	}
464340
private function tokenize($input, $limit = -1)
    {
        $chunks = preg_split('!\s+!', $input, $limit);
        if ($limit !== -1 && count($chunks) != $limit) {
            $chunks += array_fill(count($chunks), $limit, '');
        }
        return $chunks;
    }
755018
private function cleanKeysForXml(array $input): array
    {
        $return = [];
        foreach ($input as $key => $value) {
            // first remove the line return because the regex using "." pattern prevent to include the line return in the preg_replace.
            $key = str_replace("\n", '_', $key);
            $startCharacterPattern =
                '[A-Z]|_|[a-z]|[\xC0-\xD6]|[\xD8-\xF6]|[\xF8-\x{2FF}]|[\x{370}-\x{37D}]|[\x{37F}-\x{1FFF}]|'
                . '[\x{200C}-\x{200D}]|[\x{2070}-\x{218F}]|[\x{2C00}-\x{2FEF}]|[\x{3001}-\x{D7FF}]|[\x{F900}-\x{FDCF}]'
                . '|[\x{FDF0}-\x{FFFD}]|[\x{10000}-\x{EFFFF}]';
            $characterPattern = $startCharacterPattern . '|\-|\.|[0-9]|\xB7|[\x{300}-\x{36F}]|[\x{203F}-\x{2040}]';
            $key = preg_replace('/(?!' . $characterPattern . ')./u', '_', $key);
            $key = preg_replace('/^(?!' . $startCharacterPattern . ')./u', '_', $key);
            if (is_array($value)) {
                $value = $this->cleanKeysForXml($value);
            }
            $return[$key] = $value;
        }

        return $return;
    }
1260342
protected function parseHeaders($input)
    {
        if ($input !== '') {
            // Unfold the input
            $input   = preg_replace('/' . $this->params['crlf'] . "(\t| )/", ' ', $input);
            $headers = explode($this->params['crlf'], trim($input));

            foreach ($headers as $value) {
                $hdr_name  = substr($value, 0, $pos = strpos($value, ':'));
                $hdr_value = substr($value, $pos+1);

                if ($hdr_value[0] == ' ') {
                    $hdr_value = substr($hdr_value, 1);
                }

                $return[] = array(
                    'name'  => $hdr_name,
                    'value' => $this->params['decode_headers'] ? $this->decodeHeader($hdr_value) : $hdr_value,
                );
            }
        }
        else {
            $return = array();
        }

        return $return;
    }
24828
private static function ucs4array_ucs4($input)
    {
        $output = '';
        foreach ($input as $v) {
            $output .= chr(($v >> 24) & 255).chr(($v >> 16) & 255).chr(($v >> 8) & 255).chr($v & 255);
        }
        return $output;
    }
1045188
public static function normalize_feed( $input ) {
		$hcard = array();
		foreach ( $input['items'] as $key => $item ) {
			if ( self::is_type( $item, 'h-card' ) ) {
				$hcard = $item;
				unset( $input['items'][ $key ] );
				break;
			}
		}
		if ( 1 === count( $input['items'] ) ) {
			if ( self::has_prop( $input['items'][0], 'author' ) ) {
				$input['items'][0]['properties']['author'] = array( $hcard );
			}
			return $input;
		}
		return array(
			'items' => array(
				array(
					'type'       => array( 'h-feed' ),
					'properties' => array(
						'author' => array( $hcard ),
					),
					'children'   => $input['items'],
				),
			),
		);
	}
391865
public static function removeUtf8Bom($input)
    {
        $charset=[];
        $charset[1] = substr($input, 0, 1);
        $charset[2] = substr($input, 1, 1);
        $charset[3] = substr($input, 2, 1);
        if (ord($charset[1]) == 239 && ord($charset[2]) == 187 && ord($charset[3]) == 191){
            $rest = substr($input, 3);
            return $rest;
        }
        return $input;
    }
532798
public function trim(array $input)
    {
        $out = [];
        foreach ($input as $line) {
            $chunk = $this->chunk($line);
            $out[] = reset($chunk);
        }
        return $out;
    }
398617
public function fixStringNumericValues(&$input) {

        if (!\is_array($input)) {

			if (\is_string($input) && \is_numeric($input)) {
				$input += 0;
			}
            return $input;
        }

        foreach ($input as $k => $v) {

            if (\is_array($input[$k])) {
                $input[$k] = $this->fixStringNumericValues($input[$k]);
            }

            if (\is_string($v) && \is_numeric($v)) {
                $v += 0;
            }

            $input[$k] = $v;
        }

        return $input;
    }
452382
protected function flatten($input)
    {
        $list = [];

        foreach ($input as $item) {
            $list = array_merge($list, (array)$item);
        }

        return array_unique($list);
    }
1066741
private function processPageParams(array $input)
    {
        if (!empty($input['page']) && is_numeric($input['page'])) {
            $this->page = $input['page'];
        }
        if (!empty($input['per_page']) && is_numeric($input['per_page'])) {
            $this->perPage = $input['per_page'];
        }
        return $input;
    }
1008028
static function convertISBN10toISBN13( $isbnNr )
    {
        $isbnNr = 978 . substr( $isbnNr, 0, 9 );

        $weight13 = 1;
        $checksum13 = 0;
        $val = 0;

        for ( $i = 0; $i < 12; $i++ )
        {
            $val = $isbnNr{$i};
            $checksum13 = $checksum13 + $weight13 * $val;
            $weight13 = ( $weight13 + 2 ) % 4;
        }

        $checkDigit = ( 10 - ( $checksum13 % 10 ) ) % 10;
        $isbnNr .= $checkDigit;

        return $isbnNr;
    }
312999
public function canonicalize($input)
    {
        //first, return unmodified any input less than 5 characters long, or anything not a string
        if (!is_string($input) or strlen($input) < 5) {
            return $input;
        }

        //second, remove any spaces, uppercase, and break off the last three characters of the string
        $unspaced = mb_strtoupper(preg_replace('/\s/', '', $input) ?? '', 'UTF-8');
        $spaced = sprintf('%s %s', substr($unspaced, 0, -3), substr($unspaced, -3));

        //now check against the regex
        if (!preg_match(self::CODE_REGEX, $spaced)) {
            return $input;
        }

        return $spaced;
    }
292587
public function load($input)
    {
        foreach ($this->strategies as $strategy) {
            if ($strategy->supports($input)) {
                return array_map([$this, 'createJsonDefinition'], $strategy->load($input));
            }
        }

        return [];
    }
563538
public function getLength($input)
    {
        if (is_scalar($input)) {
            if ($this->countByChars) {
                return mb_strlen($input, $this->charset);
            } else {
                return strlen($input);
            }
        } elseif (is_array($input) || $input instanceof \Countable) {
            return count($input);
        } else {
            return false;
        }
    }