From: Roland Häder Date: Sat, 11 Feb 2012 16:02:26 +0000 (+0000) Subject: Renamed 'seperator' to 'separator' X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f97af6b5b50bc961ec5ad850b73765d64811a5bc;p=core.git Renamed 'seperator' to 'separator' --- diff --git a/inc/classes/exceptions/main/class_MissingDecimalsThousandsSeperatorException.php b/inc/classes/exceptions/main/class_MissingDecimalsThousandsSeperatorException.php index e983a698..f551ef47 100644 --- a/inc/classes/exceptions/main/class_MissingDecimalsThousandsSeperatorException.php +++ b/inc/classes/exceptions/main/class_MissingDecimalsThousandsSeperatorException.php @@ -1,45 +1,3 @@ - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.ship-simu.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -class MissingDecimalsThousandsSeperatorException extends FrameworkException { - /** - * The constructor - * - * @param $message Message from the exception - * @param $code Code number for the exception - * @return void - */ - public function __construct ($instance, $code) { - // Add a message around the missing class - $message = sprintf("[%s:%d] Die Dezimal- und Tausendertrenner fehlen!", - $instance->__toString(), - $this->getLine() - ); - - // Call parent constructor - parent::__construct($message, $code); - } -} - -// [EOF] +// @DEPRECATED ?> diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 10ce072b..d142efb1 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -169,12 +169,12 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { private $wrapperInstance = NULL; /** - * Thousands seperator + * Thousands separator */ private $thousands = '.'; // German /** - * Decimal seperator + * Decimal separator */ private $decimals = ','; // German @@ -757,21 +757,21 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { /** * Formats computer generated price values into human-understandable formats - * with thousand and decimal seperators. + * with thousand and decimal separators. * * @param $value The in computer format value for a price * @param $currency The currency symbol (use HTML-valid characters!) * @param $decNum Number of decimals after commata * @return $price The for the current language formated price string - * @throws MissingDecimalsThousandsSeperatorException If decimals or - * thousands seperator + * @throws MissingDecimalsThousandsSeparatorException If decimals or + * thousands separator * is missing */ public function formatCurrency ($value, $currency = '€', $decNum = 2) { // Are all required attriutes set? if ((!isset($this->decimals)) || (!isset($this->thousands))) { // Throw an exception - throw new MissingDecimalsThousandsSeperatorException($this, self::EXCEPTION_ATTRIBUTES_ARE_MISSING); + throw new MissingDecimalsThousandsSeparatorException($this, self::EXCEPTION_ATTRIBUTES_ARE_MISSING); } // END - if // Cast the number diff --git a/inc/classes/main/helper/web/links/class_WebLinkHelper.php b/inc/classes/main/helper/web/links/class_WebLinkHelper.php index 4ea1819b..dcb01d64 100644 --- a/inc/classes/main/helper/web/links/class_WebLinkHelper.php +++ b/inc/classes/main/helper/web/links/class_WebLinkHelper.php @@ -33,14 +33,14 @@ class WebLinkHelper extends BaseWebHelper implements HelpableTemplate { private $linkBase = ''; /** - * First parameter seperator + * First parameter separator */ - const FIRST_PARAMETER_SEPERATOR = '?'; + const FIRST_PARAMETER_SEPARATOR = '?'; /** - * Seperator for more paraemters + * SEPARATOR for more paraemters */ - const EXTRA_PARAMETER_SEPERATOR = '&'; + const EXTRA_PARAMETER_SEPARATOR = '&'; /** * Protected constructor @@ -276,19 +276,19 @@ class WebLinkHelper extends BaseWebHelper implements HelpableTemplate { throw new NoGroupOpenedException(array($this, $linkAction . '(' . $linkText . ')'), self::EXCEPTION_GROUP_NOT_OPENED); } // END - if - // Default parameter seperator is & - $seperator = self::EXTRA_PARAMETER_SEPERATOR; + // Default parameter SEPARATOR is & + $separator = self::EXTRA_PARAMETER_SEPARATOR; // Is there a question mark in? - $linkArray = explode(self::FIRST_PARAMETER_SEPERATOR, $this->getLinkBase()); + $linkArray = explode(self::FIRST_PARAMETER_SEPARATOR, $this->getLinkBase()); if (count($linkArray) == 0) { // No question mark - $seperator = self::FIRST_PARAMETER_SEPERATOR; + $separator = self::FIRST_PARAMETER_SEPARATOR; } // END - if // Prepare action $action = sprintf("%saction=%s", - $seperator, + $separator, $linkAction ); diff --git a/inc/classes/main/io/class_FileIoStream.php b/inc/classes/main/io/class_FileIoStream.php index 98af0428..e1ccd8aa 100644 --- a/inc/classes/main/io/class_FileIoStream.php +++ b/inc/classes/main/io/class_FileIoStream.php @@ -33,14 +33,14 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil const FILE_IO_DATA_BLOCK_ID = '@data'; /** - * Seperator #1 + * Separator #1 */ const FILE_IO_CHUNKER = ':'; /** - * Seperator #2 + * Separator #2 */ - const FILE_IO_SEPERATOR = '^'; + const FILE_IO_SEPARATOR = '^'; /** * Protected constructor @@ -95,7 +95,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil // Write a header information for validation purposes $fileInstance->writeToFile(sprintf("%s%s%s%s%s%s%s%s%s\n", self::FILE_IO_FILE_HEADER_ID, - self::FILE_IO_SEPERATOR, + self::FILE_IO_SEPARATOR, $dataArray[0], self::FILE_IO_CHUNKER, time(), @@ -117,7 +117,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil // Save it to the stream $fileInstance->writeToFile(sprintf("%s%s%s%s%s\n", self::FILE_IO_DATA_BLOCK_ID, - self::FILE_IO_SEPERATOR, + self::FILE_IO_SEPARATOR, $line, self::FILE_IO_CHUNKER, md5($line) @@ -175,7 +175,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil // Analyze this line if (substr($rawLine, 0, 5) == self::FILE_IO_FILE_HEADER_ID) { // Header found, so let's extract it - $header = explode(self::FILE_IO_SEPERATOR, $rawLine); + $header = explode(self::FILE_IO_SEPARATOR, $rawLine); $header = trim($header[1]); // Now we must convert it again into an array @@ -188,7 +188,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil } // END - if } elseif (substr($rawLine, 0, 5) == self::FILE_IO_DATA_BLOCK_ID) { // Is a data line! - $data = explode(self::FILE_IO_SEPERATOR, $rawLine); + $data = explode(self::FILE_IO_SEPARATOR, $rawLine); $data = $data[1]; // First element is the data, second the MD5 checksum diff --git a/inc/classes/main/streams/crypto/class_McryptStream.php b/inc/classes/main/streams/crypto/class_McryptStream.php index 5bab4ef5..bb6a89d7 100644 --- a/inc/classes/main/streams/crypto/class_McryptStream.php +++ b/inc/classes/main/streams/crypto/class_McryptStream.php @@ -23,9 +23,9 @@ */ class McryptStream extends BaseStream implements EncryptableStream { /** - * Seperator on many places + * Separator on many places */ - const DATA_PAYLOAD_SEPERATOR = '|'; + const DATA_PAYLOAD_SEPARATOR = '|'; /** * Protected constructor @@ -75,39 +75,39 @@ class McryptStream extends BaseStream implements EncryptableStream { // Add some "payload" to the string switch ($this->getRngInstance()->randomNumber(0, 8)) { case 0: - $payloadString = crc32($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPERATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPERATOR . crc32($this->getRngInstance()->randomString(20)); + $payloadString = crc32($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPARATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPARATOR . crc32($this->getRngInstance()->randomString(20)); break; case 1: - $payloadString = crc32($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPERATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPERATOR . md5($this->getRngInstance()->randomString(20)); + $payloadString = crc32($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPARATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPARATOR . md5($this->getRngInstance()->randomString(20)); break; case 2: - $payloadString = crc32($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPERATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPERATOR . sha1($this->getRngInstance()->randomString(20)); + $payloadString = crc32($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPARATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPARATOR . sha1($this->getRngInstance()->randomString(20)); break; case 3: - $payloadString = md5($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPERATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPERATOR . crc32($this->getRngInstance()->randomString(20)); + $payloadString = md5($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPARATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPARATOR . crc32($this->getRngInstance()->randomString(20)); break; case 4: - $payloadString = md5($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPERATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPERATOR . md5($this->getRngInstance()->randomString(20)); + $payloadString = md5($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPARATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPARATOR . md5($this->getRngInstance()->randomString(20)); break; case 5: - $payloadString = md5($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPERATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPERATOR . sha1($this->getRngInstance()->randomString(20)); + $payloadString = md5($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPARATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPARATOR . sha1($this->getRngInstance()->randomString(20)); break; case 6: - $payloadString = sha1($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPERATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPERATOR . crc32($this->getRngInstance()->randomString(20)); + $payloadString = sha1($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPARATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPARATOR . crc32($this->getRngInstance()->randomString(20)); break; case 7: - $payloadString = sha1($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPERATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPERATOR . md5($this->getRngInstance()->randomString(20)); + $payloadString = sha1($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPARATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPARATOR . md5($this->getRngInstance()->randomString(20)); break; case 8: - $payloadString = sha1($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPERATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPERATOR . sha1($this->getRngInstance()->randomString(20)); + $payloadString = sha1($this->getRngInstance()->randomString(10)) . self::DATA_PAYLOAD_SEPARATOR . base64_encode($str) . self::DATA_PAYLOAD_SEPARATOR . sha1($this->getRngInstance()->randomString(20)); break; } @@ -140,7 +140,7 @@ class McryptStream extends BaseStream implements EncryptableStream { $payloadString = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $encrypted, MCRYPT_MODE_ECB, $iv); // Get the real string out - $strArray = explode(self::DATA_PAYLOAD_SEPERATOR, $payloadString); + $strArray = explode(self::DATA_PAYLOAD_SEPARATOR, $payloadString); // Does the element count match? assert(count($strArray) == 3); diff --git a/inc/classes/third_party/api/primusportal/class_PrimeraApi.php b/inc/classes/third_party/api/primusportal/class_PrimeraApi.php index 2251e4a5..a265c479 100644 --- a/inc/classes/third_party/api/primusportal/class_PrimeraApi.php +++ b/inc/classes/third_party/api/primusportal/class_PrimeraApi.php @@ -129,7 +129,7 @@ class PrimeraApi extends BaseFrameworkSystem { private $errno = 0; private $err = ''; - private $seperator = ':'; + private $separator = ':'; private $username = ''; private $password = ''; @@ -187,7 +187,7 @@ class PrimeraApi extends BaseFrameworkSystem { $x = explode("\n", $content); $return = array(); foreach($x as $currentLine) { - $line_exploded = explode($this->seperator, $currentLine,2); + $line_exploded = explode($this->separator, $currentLine,2); if (count($line_exploded) > 1) { $return[$line_exploded[0]] = $line_exploded[1]; } // END - if