// Convert arguments type into human-readable
foreach ($traceArray['args'] as $arg) {
$argsString .= ', ' . gettype($arg);
- } // END - foreach
+ }
$argsString = substr($argsString, 2);
// Set missing file/line
basename($traceArray['file']),
$traceArray['line']
);
- } // END - foreach
+ }
// Construct the message
$message = sprintf("--------------------------------------------------------------------------------
// Empty code?
if ($code === '') {
$code = '<em>Unknown</em>';
- } // END - if
+ }
// Create message
$message = sprintf('File: %s, Line: %s, Code: %s',
// Reset timer
$timeDisplay = microtime(true);
$GLOBALS['iteration_second'] = 0;
- } // END - if
+ }
// Time spend from last flush
$testTime = abs(microtime(true) - $GLOBALS['time_flush']);
if ($testTime >= $GLOBALS['flush_file_time']) {
// Flush check-point file
flushCheckPointFile($GLOBALS['current_hash']);
- } // END - if
+ }
// Time spend from last found block
$testTime = abs(microtime(true) - $GLOBALS['found_time']);
if (!isset($hash['root_hash'])) {
// Bad file
die('INCONSISTENCY: hash=' . print_r($hash, true));
- } // END - if
+ }
if (isset($rootHashes[$hash['root_hash']])) {
// Count up
// First entry found
$rootHashes[$hash['root_hash']] = 1;
}
- } // END - foreach
- } // END - foreach
+ }
+ }
// Find best root hash
$bestRootHash = '';
$bestRootCount = 0;
foreach ($rootHashes as $hash => $count) {
- // Debug message
- //* NOISY-DEBUG: */ print ('hash=' . $hash . ',count=' . $count . ',bestRootHash=' . $bestRootHash . ',bestRootCount=' . $bestRootCount . PHP_EOL);
-
// Is a better one found?
+ //* NOISY-DEBUG: */ print ('hash=' . $hash . ',count=' . $count . ',bestRootHash=' . $bestRootHash . ',bestRootCount=' . $bestRootCount . PHP_EOL);
if ($count > $bestRootCount) {
// Remember it
$bestRootHash = $hash;
$bestRootCount = $count;
- } // END - if
- } // END - foreach
+ }
+ }
// Output message
print ('bestRootHash=' . $bestRootHash . ',bestRootCount=' . $bestRootCount . PHP_EOL);
// Abort search
break;
- } // END - if
- } // END - for
- } // END - foreach
- } // END - if
+ }
+ }
+ }
+ }
// Next round
$GLOBALS['iteration']++;
//* NOISY-DEBUG: */ print('nonceHash=' . $nonceHash . PHP_EOL);
//* NOISY-DEBUG: */ print('sumNonce=' . $sumNonce . PHP_EOL);
//* NOISY-DEBUG: */ print('sumGenesis=' . $GLOBALS['sum_genesis'] . PHP_EOL);
- } // END - while
+ }
// If the iteration is zero, then no hash is found
if ($GLOBALS['iteration'] == 0) {
// Bad hash found
$timeBadHashes += abs(microtime(true) - $timeHash);
- // And next round
- //* NOISY-DEBUG: */ print('BAD:nonce=' . $GLOBALS['nonce'] . PHP_EOL);
-
// Nothing found, so calculate new nonce
+ //* NOISY-DEBUG: */ print('BAD:nonce=' . $GLOBALS['nonce'] . PHP_EOL);
calculateNonce();
continue;
- } // END - if
+ }
// Add amount of hashes per block (multiple-hash)
$GLOBALS['hashes_block'] += $GLOBALS['iteration'] * $GLOBALS['hash_cycles'] + $GLOBALS['hash_cycles'];
// Push found hash
addFoundHash($nonceHash);
- } // END - while
+ }
// Flush check-point file
flushCheckPointFile($GLOBALS['current_hash']);
$rewardPerHour = $GLOBALS['total_reward'] / abs(microtime(true) - START_TIME) * 3600;
print ('totalReward=' . $GLOBALS['total_reward'] . ',blockValue=' . $blockValue . ',rewardPerHour=' . $rewardPerHour . PHP_EOL);
-} // END - while
+}
for ($idx = 0; $idx < ($GLOBALS['hash_cycles'] - 1); $idx++) {
// Over-hash the given hash
$hash = hashString($hash);
- } // END - for
+ }
// Return it
return $hash;
for ($idx = 0; $idx < (strlen($decode) / 2); $idx++) {
// And add it
$sum = $sum + hexdec(substr($decode, $idx, 2));
- } // END - for
+ }
// And return it
//* NOISY-DEBUG: */ printf('[%s:%d]: sum=%d - EXIT!' . PHP_EOL, __FUNCTION__, __LINE__, $sum);
$GLOBALS['current_hash'] = $data[9];
$GLOBALS['root_hash'] = $data[10];
$GLOBALS['found_hashes'] = json_decode(gzuncompress(base64_decode($data[11])), TRUE);
- } // END - if
+ }
}
for ($i = 1; $i <= $totalDays; $i++) {
$x = bcmul($x, 2);
$y = bcadd($y, $x);
-} // END - foreach
+}
print 'After ' . $totalDays . ' days (' . $years . ' years) you have eaten ' . $y . ' fruits.' . PHP_EOL;
print 'Length:' . strlen($y) . PHP_EOL;
$balance = bcadd($balance, $interest);
print 'Month ' . $i . ': rate=' . bcmul($rate, 100) . '%,interest=' . $interest . ',balance=' . $balance . PHP_EOL;
-} // END - foreach
+}
print 'After ' . $totalMonths . ' months (' . $years . ' years) you have ' . $balance . ' EUR back.' . PHP_EOL;
//print 'Length:' . strlen($balance) . PHP_EOL;
$__factor = constant('__FACTOR_64');
$__format = constant('__FORMAT_READ_64');
$__step = constant('__STEP_64');
-} // END - if
+}
$buffer = file_get_contents('test.data.bin' . ($__factor * 2)) or die('Please run write.php first!' . PHP_EOL);
//print 'chr=' . $chr . PHP_EOL;
$decoded .= chr($chr);
- } // END - for
-} // END - for
+ }
+}
$decoded = gzuncompress($decoded);
$__right = constant('__RIGHT_64');
$__format = constant('__FORMAT_WRITE_64');
$__step = constant('__STEP_64');
-} // END - if
+}
$str = gzcompress(file_get_contents('test.data'), 9);
$big += $add;
//print 'idx=' . $idx . ',i=' . $i . ',ord=' . $ord . ',factor=' . $factor . ',add=' . $add . ',big=' . $big . PHP_EOL;
- } // END - if
- } // END - for
+ }
+ }
$l = ($big & $__left) >>$__factor;
$r = $big & $__right;
//print 'big=' . $big . ',unpacked('.strlen($unpacked) . ')='.md5($unpacked).PHP_EOL;
$encoded .= $unpacked;
-} // END - for
+}
print 'Hash(' . strlen($encoded) . ')=' . md5($encoded) . PHP_EOL;
print 'Encoded ' . strlen($str) . ' bytes into ' . strlen($encoded) . ' bytes ...' . PHP_EOL;
// Not found
$exists = false;
}
- } // END - if
+ }
// Return status
return $exists;
if ($this->offsetExists($offset)) {
// Then get the data from it
$data = $this->dataCache->offsetGet($offset);
- } // END - if
+ }
// Return data
return $data;
// Purge only existing keys
//* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHE: Unsetting cache ' . $offset);
$this->dataCache->offsetUnset($offset);
- } // END - if
+ }
}
}
// Abort here
return;
- } // END - if
+ }
// @TODO Unfinished
$this->partialStub('Still unfinished! ;-)');
foreach (array('default', 'choice', 'exclude') as $criteriaType) {
// Init it
$this->initGenericArrayKey('criteria', $criteriaType, 'entries');
- } // END - foreach
+ }
}
/**
foreach ($this->getGenericArray('criteria') as $criteriaType => $dummy) {
// Remove it
$this->unsetGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey);
- } // END - foreach
+ }
}
/**
// Then count this one up
$counted++;
}
- } // END - foreach
- } // END - foreach
+ }
+ }
// Now check if expected criteria counts match
$matches = ($counted == $this->countGenericArrayGroup('criteria', $criteriaType));
urlencode($criteriaValue)
);
}
- } // END - foreach
+ }
// Remove last semicolon
$cacheKey = substr($cacheKey, 0, -1);
foreach ($primaryKeys as $primaryKey) {
// Add it
$return .= trim($this->getCriteriaElemnent($primaryKey));
- } // END - foreach
+ }
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATA-SET-CRITERIA: tableName=' . $this->getTableName() . ',return=' . $return . ' - EXIT!');
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: match=' . $match . ',isMatching=' . intval($isMatching));
- } // END - foreach
+ }
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[]=' . count($valueArray) . ',idx=' . $idx . ',isMatching=' . intval($isMatching) . ' - CHOICE-MATCH');
if (is_null(self::$selfInstance)) {
// Then get a new one
self::$selfInstance = self::createCryptoHelper();
- } // END - if
+ }
// Return the instance
return self::$selfInstance;
if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('extension_uuid_loaded') === true) {
// Then add it as well
$uuid = uuid_create();
- } // END - if
+ }
// Return it
return $uuid;
// Then extract the X first characters from the hash as our salt
$salt = substr($oldHash, 0, $length);
- } // END - if
+ }
// Hash the password with salt
//* DEBUG: */ echo "salt=".$salt."/plain=".$str."<br />\n";
if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) {
// Set the new instance
$this->setCacheInstance(ObjectFactory::createObjectByConfiguredName('cache_class'));
- } // END - if
+ }
}
/**
// First get a key suitable for our cache and extend it with this class name
$cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys);
//* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-FRONTEND: Using cache key ' . $cacheKey . ' for purging ...');
- } // END - if
+ }
// Does this key exists in cache?
//* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FRONTEND: cacheKey[%s]=%s', gettype($cacheKey), $cacheKey));
// Purge the cache
//* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FRONTEND: Calling this->cacheInstance->purgeOffset(%s) ...', $cacheKey));
$this->getCacheInstance()->purgeOffset($cacheKey);
- } // END - if
+ }
// Handle it over to the middleware
FrameworkBootstrap::getDatabaseInstance()->queryInsertDataSet($dataSetInstance);
// First get a key suitable for our cache and extend it with this class name
$cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys);
//* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-FRONTEND: Using cache key ' . $cacheKey . ' for purging ...');
- } // END - if
+ }
// Does this key exists in cache?
if ((FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->getCacheInstance()->offsetExists($cacheKey))) {
// Purge the cache
$this->getCacheInstance()->purgeOffset($cacheKey);
- } // END - if
+ }
// Handle it over to the middleware
FrameworkBootstrap::getDatabaseInstance()->queryUpdateDataSet($dataSetInstance);
if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) {
// First get a key suitable for our cache and extend it with this class name
$cacheKey = $this->getCacheKeyByCriteria($criteriaInstance, $onlyKeys);
- } // END - if
+ }
// Does this key exists in cache?
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FRONTEND: cacheKey[%s]=%s', gettype($cacheKey), $cacheKey));
// A valid result has returned from the database layer
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FRONTEND: Setting cacheKey=%s with result()=%d entries', $cacheKey, count($result)));
$this->getCacheInstance()->offsetSet($cacheKey, $result);
- } // END - if
+ }
} else {
// This invalid result must be wrapped
$result = array(
// Debug message
//* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-FRONTEND: numRows=' . $numRows);
- } // END - if
+ }
// Return the result
return $numRows;
if (is_null($updateInstance)) {
// Throw an exception here
throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
- } // END - if
+ }
// Get search instance from update instance
$searchInstance = $updateInstance->getSearchInstance();
if (is_null($searchInstance)) {
// Throw an exception here
throw new NullPointerException($updateInstance, self::EXCEPTION_IS_NULL_POINTER);
- } // END - if
- } // END - if
+ }
+ }
// Generate a data set object
$dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_USER));
// Check configuration
self::$enabledFeatures[$featureName]['is_enabled'] = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configKey) === 'Y');
- } // END - if
+ }
// Return "cached" status
return self::$enabledFeatures[$featureName]['is_enabled'];
// Then it can't be available
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FRAMEWORK-FEATURE: Feature "%s"is not enabled.', $featureName));
return false;
- } // END - if
+ }
// Create config key (for feature class lookup)
$configKey = sprintf('feature_%s_class', $featureName);
// Feature class not found
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FRAMEWORK-FEATURE: Feature "%s"is not available due to missing feature class. Disabling feature ...', $featureName));
}
- } // END - if
+ }
// Return "cached" status
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FRAMEWORK-FEATURE: featureName=%s,isAvailable=%d - EXIT!', $featureName, intval(self::$enabledFeatures[$featureName]['is_available'])));
if (!is_callable($callable)) {
// Not callable method requested
throw new FeatureMethodNotCallableException(array(self::$enabledFeatures[$featureName]['instance'], $featureMethod), self::EXCEPTION_FEATURE_METHOD_NOT_CALLABLE);
- } // END - if
+ }
// Then call it
$return = call_user_func_array($callable, $args);
if ($this->getDirectoryIteratorInstance() instanceof DirectoryIterator) {
// Try to close a directory
$this->closeDirectory();
- } // END - if
+ }
// Call the parent destructor
parent::__destruct();
// To next entry
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY-POINTER: Invoking directoryIteratorInstance->next() ...');
$this->getDirectoryIteratorInstance()->next();
- } // END - while
- } // END - if
+ }
+ }
// Return read line
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('DIRECTORY-POINTER: fileInfoInstance[%s]=%s - EXIT!', gettype($fileInfoInstance), $fileInfoInstance));
if ((is_null($fileObject)) || ($fileObject === false)) {
// Something bad happend
throw new FileIoException($infoInstance, self::EXCEPTION_FILE_POINTER_INVALID);
- } // END - if
+ }
// Create new instance
$pointerInstance = new FrameworkRawFileInputPointer();
if ((is_null($fileObject)) || ($fileObject === false)) {
// Something bad happend
throw new FileIoException($infoInstance, self::EXCEPTION_FILE_POINTER_INVALID);
- } // END - if
+ }
// Create new instance
$pointerInstance = new FrameworkTextFileInputPointer();
// Bail out
ApplicationEntryPoint::exitApplication('The application has made a fatal error. Exception: ' . $e->__toString() . ' with message: ' . $e->getMessage());
}
- } // END - for
+ }
// Write a header information for validation purposes
$fileInstance->writeToFile(sprintf('%s%s%s%s%s%s%s%s%s' . PHP_EOL,
// Advance to the next 50-chars block
$idx += 50;
- } // END - while
+ }
// Close the file
unset($fileInstance);
// Break infinite loop maybe caused by the input handler
if ($lastBuffer == $inputBuffer) {
break;
- } // END - if
+ }
// Remember last read line for avoiding possible infinite loops
$lastBuffer = $inputBuffer;
- } // END - while
+ }
// Close directory handle
unset($fileInstance);
if (count($header) != 4) {
// Throw an exception
throw new InvalidArrayCountException(array($this, 'header', count($header), 4), self::EXCEPTION_ARRAY_HAS_INVALID_COUNT);
- } // END - if
+ }
} elseif (substr($rawLine, 0, 5) == self::FILE_IO_DATA_BLOCK_ID) {
// Is a data line!
$data = explode(self::FILE_IO_SEPARATOR, $rawLine);
if (md5($data[0]) != $data[1]) {
// MD5 hash did not match!
throw new InvalidMD5ChecksumException(array($this, md5($data[0]), $data[1]), self::EXCEPTION_MD5_CHECKSUMS_MISMATCH);
- } // END - if
+ }
} else {
// Invalid count!
throw new InvalidArrayCountException(array($this, 'data', count($data), 2), self::EXCEPTION_ARRAY_HAS_INVALID_COUNT);
// Other raw lines than header/data tagged lines and re-add the new-line char
$readData .= $rawLine . PHP_EOL;
}
- } // END - foreach
+ }
// Was raw lines read and no header/data?
if ((!empty($readData)) && (count($header) == 0) && (count($data) == 0)) {
// Return raw lines back
return $readData;
- } // END - if
+ }
// Was a header found?
if (count($header) != 4) {
// Throw an exception
throw new InvalidArrayCountException(array($this, 'header', count($header), 4), self::EXCEPTION_ARRAY_HAS_INVALID_COUNT);
- } // END - if
+ }
// Decode all from Base64
$readData = @base64_decode($readData);
if (strlen($readData) != $header[2]) {
// Size did not match
throw new InvalidDataLengthException(array($this, strlen($readData), $header[2]), self::EXCEPTION_UNEXPECTED_STRING_SIZE);
- } // END - if
+ }
// Validate the decoded data with the final MD5 hash
if (md5($readData) != $header[3]) {
// MD5 hash did not match!
throw new InvalidMD5ChecksumException(array($this, md5($readData), $header[3]), self::EXCEPTION_MD5_CHECKSUMS_MISMATCH);
- } // END - if
+ }
// Return all in an array
return array(
if (is_null($mode)) {
// No infoInstance given
throw new InvalidArgumentException('Parameter "mode" is empty');
- } // END - if
+ }
// Try to open a handler
$fileObject = $infoInstance->openFile($mode);
if ((is_null($fileObject)) || ($fileObject === false)) {
// Something bad happend
throw new FileIoException($infoInstance, self::EXCEPTION_FILE_POINTER_INVALID);
- } // END - if
+ }
// Create new instance
$pointerInstance = new FrameworkRawFileOutputPointer();
if (empty($mode)) {
// No filename given
throw new InvalidArgumentException('Parameter "mode" is empty');
- } // END - if
+ }
// Try to open a handler
$fileObject = $fileInstance->openFile($mode);
if ((is_null($fileObject)) || ($fileObject === false)) {
// Something bad happend
throw new FileIoException($fileInstance, self::EXCEPTION_FILE_POINTER_INVALID);
- } // END - if
+ }
// Create new instance
$pointerInstance = new FrameworkTextFileOutputPointer();
// Abort here
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
- } // END - elseif
+ }
} elseif (empty($email)) {
// Empty field!
$requestInstance->requestIsValid(false);
// Abort here
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
- } // END - elseif
+ }
}
/**
$userInstance = NULL;
// Get a registry instance
- $registry = GenericRegistry::getRegistry();
+ $registryInstance = GenericRegistry::getRegistry();
// Is the user already there?
- if ($registry->instanceExists('user')) {
+ if ($registryInstance->instanceExists('user')) {
// Use the instance for checking for the email
- $userInstance = $registry->getInstance('user');
+ $userInstance = $registryInstance->getInstance('user');
$userInstance->setEmailAddress($email);
} else {
// If this instance is created then the username *does* exist
$userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class'), 'createMemberByEmail'), array($email));
// Remember this user instance in our registry for later usage
- $registry->addInstance('user', $userInstance);
+ $registryInstance->addInstance('user', $userInstance);
}
// Does the email exist?
// Abort here
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
- } // END - elseif
+ }
}
}
$userInstance = NULL;
// Get a registry instance
- $registry = GenericRegistry::getRegistry();
+ $registryInstance = GenericRegistry::getRegistry();
// Is the user already there?
- if ($registry->instanceExists('user')) {
+ if ($registryInstance->instanceExists('user')) {
// Use the instance for checking for the email
- $userInstance = $registry->getInstance('user');
+ $userInstance = $registryInstance->getInstance('user');
$userInstance->setUserName($userName);
} else {
// If this instance is created then the username *does* exist
$userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class'), 'createMemberByUsername'), array($userName));
// Remember this user instance in our registry for later usage
- $registry->addInstance('user', $userInstance);
+ $registryInstance->addInstance('user', $userInstance);
} catch (UsernameMissingException $e) {
// User was not found
}
// Abort here
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
- } // END - if
- } // END - if
+ }
+ }
if (empty($password)) {
// Password is empty
// Abort here
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
- } // END - if
+ }
// Get a user instance
$userInstance = GenericRegistry::getRegistry()->getInstance('user');
if ($currentHash != $passHash) {
// Throw an exception here to stop the proccessing
throw new AccountPasswordMismatchException($this, BaseUser::EXCEPTION_USER_PASS_MISMATCH);
- } // END - if
+ }
}
}
// Add a message to the response
$responseInstance->addFatalMessage('day_of_birth_unset');
- } // END - if
+ }
// Month of birth set?
if (!$requestInstance->isRequestElementSet('birth_month')) {
// Add a message to the response
$responseInstance->addFatalMessage('month_of_birth_unset');
- } // END - if
+ }
// Year of birth set?
if (!$requestInstance->isRequestElementSet('birth_year')) {
// Add a message to the response
$responseInstance->addFatalMessage('year_of_birth_unset');
- } // END - if
+ }
// Is the request still valid?
if (!$requestInstance->isRequestValid()) {
// Abort here
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
- } // END - if
+ }
// Now comes the final check
$birthCheck = mktime(
// Abort here
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
- } // END - if
+ }
}
}
// Stop processing here
exit();
- } // END - if
+ }
}
}
// Skip further processing
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
- } // END - if
+ }
// Create config entry
$configKey = sprintf('%s_captcha_secured',
if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configKey) != 'Y') {
// Not enabled, so don't check
return;
- } // END - if
+ }
// Get the captcha code
$captchaCode = $requestInstance->getRequestElement('c_code');
// Skip further processing
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
- } // END - not the same!
+ }
}
}
$userInstance = NULL;
// Get a registry instance
- $registry = GenericRegistry::getRegistry();
+ $registryInstance = GenericRegistry::getRegistry();
// Is the user already there?
- if ($registry->instanceExists('user')) {
+ if ($registryInstance->instanceExists('user')) {
// Use the instance for checking for the email
- $userInstance = $registry->getInstance('user');
+ $userInstance = $registryInstance->getInstance('user');
$userInstance->setUserGuest($userName);
} else {
// If this instance is created then the username *does* exist
$userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_class'), 'createGuestByUsername'), array($userName));
// Remember this user instance in our registry for later usage
- $registry->addInstance('user', $userInstance);
+ $registryInstance->addInstance('user', $userInstance);
} catch (UsernameMissingException $e) {
// User was not found
}
$userInstance = NULL;
// Get a registry instance
- $registry = GenericRegistry::getRegistry();
+ $registryInstance = GenericRegistry::getRegistry();
// Is the user already there?
- if ($registry->instanceExists('user')) {
+ if ($registryInstance->instanceExists('user')) {
// Use the instance for checking for the email
- $userInstance = $registry->getInstance('user');
+ $userInstance = $registryInstance->getInstance('user');
$userInstance->setUserName($userName);
} else {
// If this instance is created then the username *does* exist
$userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class'), 'createMemberByUsername'), array($userName));
// Remember this user instance in our registry for later usage
- $registry->addInstance('user', $userInstance);
+ $registryInstance->addInstance('user', $userInstance);
} catch (UsernameMissingException $e) {
// User was not found
}
if ((is_null($userInstance)) || ($userInstance->ifUsernameExists() === false)) {
// This username is still available
$alreadyTaken = false;
- } // END - if
+ }
// Return the result
return $alreadyTaken;
// Stop processing here
exit();
- } // END - if
+ }
}
}
// Stop processing here
exit();
- } // END - if
+ }
// Is the user account confirmed?
if ($userInstance->getField(UserDatabaseFrontend::DB_COLUMN_USER_STATUS) != FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_unconfirmed')) {
// Stop processing here
exit();
- } // END - if
+ }
// Add this instance to registry
GenericRegistry::getRegistry()->addInstance('user', $userInstance);
public function FsOpen ($path, FuseFileInfo $fi) {
if (($fi->flags & FUSE_O_ACCMODE) != FUSE_O_RDONLY) {
return -FUSE_ENOACCES;
- } // END - if
+ }
return -FUSE_ENOERR;
}
if ($offset > strlen($data)) {
return 0;
- } // END - if
+ }
$buf = substr( $data, $offset, $size );
public function FsReadDir ($path, array &$buf) {
if (strcmp($path, '/') != 0) {
return -FUSE_ENOENT;
- } // END - if
+ }
$buf[] = '.';
$buf[] = '..';
if (is_null($formId)) {
// Use form id from form name
$formId = $formName;
- } // END - if
+ }
// Set form name
$helperInstance->setFormName($formName);
if ($this->ifGroupOpenedPreviously()) {
// Then automatically close it here
$this->addFormGroup();
- } // END - if
+ }
// Simply close it
$this->formOpened = false;
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<input type="text" class="form-control" id="%s_%s_field" name="%s" value="%s" />',
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<input type="password" class="form-control" id="%s_%s_field" name="%s" value="%s" />',
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<input type="hidden" name="%s" value="%s" />',
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Set whether the check box is checked...
$checked = ($fieldChecked ? ' checked="checked"' : ' ');
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, 'reset'), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<input type="reset" class="reset_button" id="%s_reset" value="%s" />',
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, 'submit'), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<input type="submit" class="submit_button" id="%s_submit" name="%s_submit" value="%s" />',
if (($this->ifGroupOpenedPreviously() === false) && ($groupId === $this->getPreviousGroupId())) {
// Abort here silently
return false;
- } // END - if
+ }
// Initialize content with closing div by default
$content = " </div>\n</div><!-- Group - CLOSE //-->";
if ($this->ifSubGroupOpenedPreviously()) {
// Close it here
$this->addFormSubGroup();
- } // END - if
+ }
// Get previous group id
$prevGroupId = $this->getPreviousGroupId();
if ((!empty($groupId)) && ($groupId != $prevGroupId)) {
//* DEBUG: */ echo $groupId.'/'.$prevGroupId."<br />\n";
$this->addFormGroup($groupId, $groupText);
- } // END - if
+ }
}
}
if (($this->ifSubGroupOpenedPreviously() === false) && ($subGroupId == $this->getPreviousSubGroupId())) {
// Abort here silently
return false;
- } // END - if
+ }
// Initialize content with closing div by default
$content = " </div>\n</div><!-- Sub group- CLOSE //-->";
// All call it again if sub group name is not empty
if ((!empty($subGroupId)) && ($subGroupId != $prevSubGroupId)) {
$this->addFormSubGroup($subGroupId, $subGroupText);
- } // END - if
+ }
}
}
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Default is no title attribute
$titleAttribute = '';
if (!empty($fieldTitle)) {
// Create title attribute
$titleAttribute = sprintf(' title="%s" data-toggle="tooltip"', $fieldTitle);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<label class="col-form-label" for="%s_%s_field"%s>
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, 'form_notes'), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf(" <div id=\"form_note_%s\">
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, 'form_notes'), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Shall we close or open the sub group?
if (($this->ifSubGroupOpenedPreviously() === false) && ($this->getPreviousSubGroupId() !== $selectId)) {
$firstEntry = sprintf("<option value=\"invalid\" disabled=\"disabled\">%s</option>\n",
$firstEntry
);
- } // END - if
+ }
// Construct the opening select tag
$content = sprintf("<select class=\"select_box\" id=\"%s_%s\" name=\"%s\">\n%s",
if ($this->ifSubGroupOpenedPreviously() === false) {
// Then throw an exception here
throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED);
- } // END - if
+ }
// Render the content
$content = sprintf("<option value=\"invalid\" class=\"suboption suboption_%s\" disabled=\"disabled\">%s</option>\n",
if ($this->ifSubGroupOpenedPreviously() === false) {
// Then throw an exception here
throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED);
- } // END - if
+ }
// Render the content
$content = sprintf("<option value=\"%s\" class=\"option option_%s\">%s</option>\n",
if (is_null($requestInstance)) {
// Throw an exception here
throw new NullPointerException($helperInstance, self::EXCEPTION_IS_NULL_POINTER);
- } // END - if
+ }
// Get page (this will throw an exception if not set)
$command = StringUtils::convertDashesToUnderscores($requestInstance->getRequestElement('command'));
if (!is_null($linkBase)) {
// Then output a deprecation message
$helperInstance->deprecationWarning('[' . __METHOD__ . ':' . __LINE__ . ']: linkBase is deprecated. Please remove it from your templates and add a config entry ' . $configEntry . ' in your config.php file.');
- } // END - if
+ }
// Determine link base from config now and 'command' request
try {
if (is_null($linkBase)) {
// Then throw again the exception
throw new NoConfigEntryException(array(__CLASS__, ($configEntry)), FrameworkConfiguration::EXCEPTION_CONFIG_ENTRY_WAS_NOT_FOUND);
- } // END - if
+ }
}
// Set link base
if ($this->ifGroupOpenedPreviously()) {
// Then close it
$this->closePreviousGroupByContent('');
- } // END - if
+ }
// Get the content
$content = $this->renderContent();
if ($this->ifGroupOpenedPreviously()) {
// Then close it here
$this->closePreviousGroupByContent('');
- } // END - if
+ }
// Generate the group content
$content = sprintf('<%s id="group_%s_%s">%s',
if ($this->ifGroupOpenedPreviously() === false) {
// No group was opened before!
throw new NoGroupOpenedException(array($this, $groupNote), self::EXCEPTION_GROUP_NOT_OPENED);
- } // END - if
+ }
// Is a previous sub group open?
if ($this->ifSubGroupOpenedPreviously()) {
// Then close it
$this->closePreviousSubGroupByContent('</' . $groupCode . '>');
- } // END - if
+ }
// Generate the group content
$content = sprintf('<%s id="subgroup_%s_%s">%s',
if ($this->ifGroupOpenedPreviously() === false) {
// No group was opened before!
throw new NoGroupOpenedException(array($this, $linkAction . '(' . $linkText . ')'), self::EXCEPTION_GROUP_NOT_OPENED);
- } // END - if
+ }
// Default parameter SEPARATOR is &
$separator = self::EXTRA_PARAMETER_SEPARATOR;
if (count($linkArray) == 0) {
// No question mark
$separator = self::FIRST_PARAMETER_SEPARATOR;
- } // END - if
+ }
// Prepare action
$action = sprintf('%saction=%s',
// Set the image string
//* DEBUG: */ print __METHOD__.": size={$size}, x={$x}, y={$y}, string={$imageString}<br />\n";
imagestring($this->getImageResource(), $size, $x, $y, $imageString, $foreColor);
- } // END - foreach
+ }
break;
}
if (!$this->valid()) {
// Throw an exception here
throw new IndexOutOfBoundsException($this->key(), self::EXCEPTION_INDEX_OUT_OF_BOUNDS);
- } // END - if
+ }
// Now get the entry
$current = $this->getListInstance()->getEntry($this->key());
if (count($entries) > 0) {
// Debugging:
/* DEBUG-DIE: */ ApplicationEntryPoint::exitApplication(sprintf('[%s:%d]: UNFINISHED: entries=%s', __METHOD__, __LINE__, print_r($entries, TRUE)));
- } // END - if
+ }
// Get instance registry entries from it
$entries = $this->getRegistryInstance()->getInstanceRegistry();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('REGISTRY-ITERATOR[instance]: key=%s - Adding ...', $key));
//* DEBUG-DIE: */ ApplicationEntryPoint::exitApplication(sprintf('[%s:%d]: key=%s,entry=%s', __METHOD__, __LINE__, $key, print_r($entry, TRUE)));
array_push($this->registryKeys['instance'], $key);
- } // END - foreach
- } // END - if
+ }
+ }
// Trace message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY-ITERATOR: EXIT!');
FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('application_base_path'),
$applicationInstance->getAppShortName()
);
- } // END - if
+ }
// Is the base path valid?
if (empty($languageBasePath)) {
if ($this->langStrings->offsetExists($messageId)) {
// Return the message string
$messageText = $this->langStrings->offsetGet($messageId);
- } // END - if
+ }
// Return the text
return $messageText;
// Transfer the data to the response
$templateInstance->transferToResponse($responseInstance);
- } // END - foreach
- } // END - foreach
+ }
+ }
}
/**
if (!empty($contentType)) {
// Set the header
FrameworkBootstrap::getResponseInstance()->addHeader('Content-type', $contentType);
- } // END - if
- } // END - if
+ }
+ }
// Return instance
return self::$!!!Instance;
@header(sprintf('Content-type: %s',
$contentType
));
- } // END - if
+ }
// Return instance
return self::$consoleInstance;
if (is_null(self::$consoleInstance)) {
$contentType = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('web_content_type');
self::$consoleInstance = ConsoleOutput::createConsoleOutput($contentType);
- } // END - if
+ }
// Return the instance
return self::$consoleInstance;
if (!empty($err)) {
// Log this line
error_log(html_entity_decode(strip_tags($err)), 0);
- } // END - if
- } // END - foreach
+ }
+ }
}
/**
// Has he enought points?
$hasRequired = ($currEntry['points'] >= $requiredPoints);
- } // END - if
+ }
// Return the result
return $hasRequired;
if (is_null(self::$registryInstance)) {
// Not yet, so create one
self::$registryInstance = new ???Registry();
- } // END - if
+ }
// Return the instance
return self::$registryInstance;
if (is_null(self::$registryInstance)) {
// Not yet, so create one
self::$registryInstance = new ???FormatUpgradeRegistry();
- } // END - if
+ }
// Return the instance
return self::$registryInstance;
if (is_null(self::$registryInstance)) {
// Not yet, so create one
self::$registryInstance = new LocalFileDatabaseFormatUpgradeRegistry();
- } // END - if
+ }
// Return the instance
return self::$registryInstance;
if (is_null(self::$registryInstance)) {
// Not yet, so create one
self::$registryInstance = new GenericRegistry();
- } // END - if
+ }
// Return the instance
return self::$registryInstance;
// Secure it against attacks
$value = htmlentities(strip_tags($value), ENT_QUOTES);
- } // END - if
+ }
// Return the element's value
return $value;
if ((!isset($_SERVER['argv'])) || (!isset($_SERVER['argc']))) {
// Maybe not right PHP mode? (needs CLI?)
trigger_error(sprintf('[%s:%d]: argv/argc not set: %s', __METHOD__, __LINE__, print_r($_SERVER, true)), E_USER_ERROR);
- } // END - if
+ }
// Get the "request data" from the command-line argument list
$args = $_SERVER['argv'];
if ($_SERVER['argc'] < 2) {
// Skip this
return;
- } // END - if
+ }
// Is the first element "index.php" ?
if ($args[0] == 'index.php') {
// Then remove it
array_shift($args);
- } // END - if
+ }
// Try to determine next parameters
foreach ($args as $arg) {
// Set a name=value pair escaped and secured
$this->setRequestElement($argArray[0], escapeshellcmd($argArray[1]));
}
- } // END - foreach
+ }
}
/**
// Does this header exist?
if (isset($_SERVER[$name])) {
$headerValue = $_SERVER[$name];
- } // END - if
+ }
// Return the value
return $headerValue;
if (isset($_COOKIE[$cookieName])) {
// Then get it
$cookieValue = $_COOKIE[$cookieName];
- } // END - if
+ }
// Return the value
return $cookieValue;
// Is the action empty? Then fall back to default action
if (empty($actionName)) {
$actionName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_action');
- } // END - if
+ }
// Check if action is valid
if ($this->isActionValid($actionName) === false) {
// This action is invalid!
throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
- } // END - if
+ }
// Get the action
$actionInstance = $this->loadAction();
if ((!is_object($actionInstance)) || (!$actionInstance instanceof Actionable)) {
// This action has an invalid instance!
throw new InvalidActionInstanceException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
- } // END - if
+ }
// Set last action
$this->setResolvedInstance($actionInstance);
// Is the action empty? Then fall back to default action
if (empty($actionName)) {
$actionName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_action');
- } // END - if
+ }
// Check if action is valid
if ($this->isActionValid($actionName) === false) {
// This action is invalid!
throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
- } // END - if
+ }
// Get the action
$actionInstance = $this->loadAction();
if ($this->is|||Valid($!!!Name) === false) {
// This action is invalid!
throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION);
- } // END - if
+ }
// Get the action
$!!!Instance = $this->load|||();
if ((!is_object($!!!Instance)) || (!$!!!Instance instanceof |||able)) {
// This action has an invalid instance!
throw new Invalid|||InstanceException(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION);
- } // END - if
+ }
// Set last action
$this->setResolvedInstance($!!!Instance);
// Is the action empty? Then fall back to default action
if (empty($!!!Name)) {
$!!!Name = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_action');
- } // END - if
+ }
// Check if action is valid
if ($this->is|||Valid($!!!Name) === false) {
// This action is invalid!
throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION);
- } // END - if
+ }
// Get the action
$!!!Instance = $this->load|||();
foreach ($this->responseHeaders as $name => $value) {
header($name . ': ' . $value);
//* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('name=' . $name . ',value=' . $value);
- } // END - foreach
+ }
// Send cookies out?
if (count($this->cookies) > 0) {
// Remove them all
$this->cookies = [];
- } // END - if
+ }
}
// Are there some error messages?
// Throw an exception here
//* DEBUG: */ return;
throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
- } // END - if
+ }
// Shall we encrypt the cookie?
if ($encrypted) {
// Unsupported at the moment
$this->partialStub('Encryption is unsupported at the moment.');
- } // END - if
+ }
// For slow browsers set the cookie array element first
$_COOKIE[$cookieName] = $cookieValue;
// Get all config entries
if (is_null($expires)) {
$expires = (time() + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_expire'));
- } // END - if
+ }
$path = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_path');
$domain = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_domain');
if (headers_sent()) {
// Throw an exception here
throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
- } // END - if
+ }
// Assign application data
$this->getTemplateInstance()->assignApplicationData($applicationInstance);
// Is there a / in front of the relative URL?
if (substr($url, 0, 1) == '/') {
$url = substr($url, 1);
- } // END - if
+ }
// No, then extend it with our base URL
$url = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_url') . '/' . $url;
- } // END - if
+ }
// Add redirect header
$this->addHeader('Location', str_replace('&', '&', $url));
// Remove it from array
unset($_COOKIE[$cookieName]);
- } // END - if
+ }
}
/**
if (isset($_COOKIE[$cookieName])) {
// Update the cookie
$this->addCookie($cookieName, $_COOKIE[$cookieName], false);
- } // END - if
+ }
}
}
// Get all config entries
if (is_null($expires)) {
$expires = (time() + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_expire'));
- } // END - if
+ }
$path = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_path');
$domain = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_domain');
if (headers_sent()) {
// Throw an exception here
throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
- } // END - if
+ }
// Assign application data
$this->getTemplateInstance()->assignApplicationData($applicationInstance);
// No, then extend it with our base URL
$url = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_url') . '/' . $url;
- } // END - if
+ }
// Add redirect header
$this->addHeader('Location', str_replace('&', '&', $url));
// Remove it from array
unset($_COOKIE[$cookieName]);
- } // END - if
+ }
}
/**
if (isset($_COOKIE[$cookieName])) {
// Update the cookie
$this->addCookie($cookieName, $_COOKIE[$cookieName], false);
- } // END - if
+ }
}
}
if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('is_single_server') == 'Y') {
// Then use that IP for extra security
$serverIp = FrameworkBootstrap::detectServerAddress();
- } // END - if
+ }
// Yet-another fixed salt. This is not dependend on server software or date
if ($extraInstance instanceof FrameworkInterface) {
// Is the number <1, then fix it to default length
if ($length < 1) {
$length = $this->rndStrLen;
- } // END - if
+ }
// Initialize the string
$randomString = '';
for ($idx = 0; $idx < $length; $idx++) {
// Add a random character and add it to our string
$randomString .= chr($this->randomNumber(0, 255));
- } // END - for
+ }
// Return the random string a little mixed up
return str_shuffle($randomString);
// Get key
if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('crypt_fixed_salt') == 'Y') {
$key = md5($this->getFixedSalt());
- } // END - if
+ }
// Return it
return $key;
if (empty($characters)) {
// Then skip it silently
return;
- } // END - if
+ }
// Unfinished work!
$this->partialStub('Handling extra characters is not yet supported!');
if (empty($characters)) {
// Then skip it silently
return;
- } // END - if
+ }
// Add the message now
$this->assignVariable('message', $characters);
if (empty($templateName)) {
// Set generic template name
$templateName = $this->typePrefix . '_' . $this->xmlTemplateType . '_template_type';
- } // END - if
+ }
// Set template type
$this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($templateName));
if (is_null($value)) {
// Bah, needs fixing.
$this->debugInstance(sprintf('[%s:%d]: key=%s returns NULL', __METHOD__, __LINE__, $key));
- } // END - if
+ }
// Return value
return $value;
// Save the parsed raw content in our dependency array
$this->dependencyContent[$node] = $templateInstance->getRawTemplateData();
- } // END - if
+ }
}
/**
if (($nodeName != $this->getCurrMainNode()) && (in_array($nodeName, $this->getMainNodes()))) {
// Did not match!
throw new XmlNodeMismatchException (array($this, $nodeName, $this->getCurrMainNode()), XmlParser::EXCEPTION_XML_NODE_MISMATCH);
- } // END - if
+ }
// Construct method name
$methodName = 'finish' . StringUtils::convertToClassName($nodeName);
// And finally set it
$this->setResultInstance($resultInstance);
- } // END - if
+ }
// Rewind it
$this->getResultInstance()->rewind();
if ($this->getResultInstance()->valid()) {
// Entry found
$exists = true;
- } // END - if
+ }
// Return the status
return $exists;
// And finally set it
$this->setResultInstance($resultInstance);
- } // END - if
+ }
// Rewind it
$this->getResultInstance()->rewind();
// Set the username
$this->setUserName($currEntry['username']);
- } // END - if
- } // END - if
+ }
+ }
// Return the status
return $exists;
// And finally set it
$this->setResultInstance($resultInstance);
- } // END - if
+ }
// Rewind it and advance to first entry
$this->getResultInstance()->rewind();
// So does the hashes match?
//* DEBUG: */ echo $requestInstance->getRequestElement('pass_hash') . '<br />' . $this->getResultInstance()->getFoundValue() . '<br />';
$matches = ($requestInstance->getRequestElement('pass_hash') === $this->getResultInstance()->getFoundValue());
- } // END - if
+ }
// Return the status
return $matches;
if (isset($entry['pass_hash'])) {
// Get it
$passHash = $entry['pass_hash'];
- } // END - if
+ }
// And return the hash
return $passHash;
// If there is no action use the default on
if (is_null($lastAction)) {
$lastAction = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_default_action');
- } // END - if
+ }
// Get a critieria instance
$searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
//* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('STRING-UTILS: big=%d,chunk(%d)=%s', $big, strlen($chunk), md5($chunk)));
$packed .= $chunk;
- } // END - for
+ }
// Return it
//* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('STRING-UTILS: packed=%s - EXIT!', $packed));
if (!is_array($debug)) {
$info .= $debug . ', ';
}
- } // END - foreach
+ }
// Remove last chars (commata, space)
$info = substr($info, 0, -2);
// No more searches required because we have found a valid compressor stream
break;
}
- } // END - while
+ }
// Close the directory
$directoryInstance->closeDirectory();
// Init additional filter chains
foreach (array('bootstrap', 'tests', 'shutdown') as $filterChain) {
$this->initFilterChain($filterChain);
- } // END - foreach
+ }
}
/**
if (extension_loaded('xdebug')) {
// Quiet it a bit as this interfers with the nice testing output
ini_set('xdebug.show_exception_trace', FALSE);
-} // END - if
+}
// Autoload more stuff
require dirname(__DIR__) . '/vendor/autoload.php';