// Get an instance of the helper
$app = call_user_func_array(
array($cfg->getConfigEntry('app_helper_class'), 'getSelfInstance'),
- array()
+ []
);
// Set application name and version
} // END - function
// Assertion handler
-function tests_assert_handler ($file, $line, $code) {
+function tests_assert_handler (string $file, int $line, $code) {
// Empty code?
if ($code === '') {
$code = '<em>Unknown</em>';
$app = call_user_func_array(
array(
FrameworkConfiguration::getSelfInstance()->getConfigEntry('app_helper_class'), 'getSelfInstance'
- ), array()
+ ), []
);
// Some sanity checks
}
// Call user function
-call_user_func_array(array($app, FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method')), array());
+call_user_func_array(array($app, FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method')), []);
$applicationInstance = call_user_func_array(
array(
'Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper', 'getSelfInstance'
- ), array()
+ ), []
);
// Some sanity checks
* hard-coded configuration data and might be overwritten/extended by
* config data from the database.
*/
- private static $config = array();
+ private static $config = [];
/**
* Call-back instance (unused)
/**
* Array with all found classes
*/
- private $foundClasses = array();
+ private $foundClasses = [];
/**
* List of loaded classes
*/
- private $loadedClasses = array();
+ private $loadedClasses = [];
/**
* Suffix with extension for all class files
* A list for directory names (no leading/trailing slashes!) which not be scanned by the path scanner
* @see scanLocalPath
*/
- private $ignoreList = array();
+ private $ignoreList = [];
/**
* Debug this class loader? (true = yes, false = no)
* Registered paths where test classes can be found. These are all relative
* to base_path .
*/
- private static $testPaths = array();
+ private static $testPaths = [];
/**
* The protected constructor. Please use the factory method below, or use
* @param $strictNamingConvention Whether to strictly check naming-convention
* @return void
*/
- public static function enableStrictNamingConventionCheck ($strictNamingConvention = true) {
+ public static function enableStrictNamingConventionCheck (bool $strictNamingConvention = true) {
self::$strictNamingConvention = $strictNamingConvention;
}
* @param $relativePath Relative path to test classes
* @return void
*/
- public static function registerTestsPath ($relativePath) {
+ public static function registerTestsPath (string $relativePath) {
// Trace message
//* NOISY-DEBUG: */ printf('[%s:%d]: relativePath=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $relativePath);
* @param $className Name of the class to load
* @return void
*/
- public static function autoLoad ($className) {
+ public static function autoLoad (string $className) {
// Trace message
//* NOISY-DEBUG: */ printf('[%s:%d]: className=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $className);
* @param $ignoreList An optional list (array forced) of directory and file names which shall be ignored
* @return void
*/
- public function scanClassPath ($basePath, array $ignoreList = array() ) {
+ public function scanClassPath (string $basePath, array $ignoreList = [] ) {
// Is a list has been restored from cache, don't read it again
if ($this->listCached === true) {
// Abort here
* @return void
* @throws InvalidArgumentException If strict-checking is enabled and class name is not following naming-convention
*/
- private function loadClassFile ($className) {
- // Trace message
- //* NOISY-DEBUG: */ printf('[%s:%d] className=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $className);
-
+ private function loadClassFile (string $className) {
// The class name should contain at least 2 back-slashes, so split at them
+ //* NOISY-DEBUG: */ printf('[%s:%d] className=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $className);
$classNameParts = explode("\\", $className);
// At least 3 parts should be there
/**
* Generic array
*/
- private $genericArray = array();
+ private $genericArray = [];
/***********************
* Exception codes.... *
* @param $onlyKeys Only use these keys for a cache key
* @return $cacheKey A cache key suitable for lookup/storage purposes
*/
- protected function getCacheKeyByCriteria (Criteria $criteriaInstance, array $onlyKeys = array()) {
+ protected function getCacheKeyByCriteria (Criteria $criteriaInstance, array $onlyKeys = []) {
// Generate it
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-FRAMEWORK-SYSTEM: criteriaInstance=' . $criteriaInstance->__toString() . ',onlyKeys()=' . count($onlyKeys) . ' - CALLED!');
$cacheKey = sprintf('%s@%s',
}
// Initialize it
- $this->genericArray[$keyGroup][$subGroup] = array();
+ $this->genericArray[$keyGroup][$subGroup] = [];
}
/**
}
// Initialize it
- $this->genericArray[$keyGroup][$subGroup][$key] = array();
+ $this->genericArray[$keyGroup][$subGroup][$key] = [];
}
/**
}
// Initialize it
- $this->genericArray[$keyGroup][$subGroup][$key][$element] = array();
+ $this->genericArray[$keyGroup][$subGroup][$key][$element] = [];
}
/**
* @param $port Port number to connect to
* @return $responseArray Array with raw response
*/
- private function sendRawHttpRequest ($method, $host, $port, array $header = array()) {
+ private function sendRawHttpRequest ($method, $host, $port, array $header = []) {
// Minimum raw HTTP/1.1 request
$rawRequest = $method . ' ' . $host . ':' . $port . ' HTTP/1.1' . self::HTTP_EOL;
$rawRequest .= 'Host: ' . $host . ':' . $port . self::HTTP_EOL;
/**
* Generic filter chains
*/
- private $filterChains = array();
+ private $filterChains = [];
/**
* Protected constructor
} // END - foreach
}
+ /**
+ * Count the criteria, e.g. useful to find out if a database query has no
+ * limitation (search criteria).
+ *
+ * @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
+ * @return $count Count of all criteria entries
+ */
+ protected final function count (string $criteriaType = 'default') {
+ // Return it
+ return $this->countGenericArrayGroup('criteria', $criteriaType);
+ }
+
/**
* Checks whether given key is set
*
* @param $criteriaKey Criteria key
* @return $isSet Whether key is set
*/
- public function isKeySet ($criteriaType, $criteriaKey) {
+ public function isKeySet (string $criteriaType, string $criteriaKey) {
// Make sure no 'my-' or 'my_' passes this point
assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false));
* @param $criteriaKey Criteria key
* @return $isSet Whether key is set
*/
- public function isChoiceKeySet ($criteriaKey) {
+ public function isChoiceKeySet (string $criteriaKey) {
// Call inner method
return $this->isKeySet('choice', $criteriaKey);
}
* @param $criteriaKey Criteria key
* @return $isSet Whether key is set
*/
- public function isExcludeKeySet ($criteriaKey) {
+ public function isExcludeKeySet (string $criteriaKey) {
// Call inner method
return $this->isKeySet('exclude', $criteriaKey);
}
* @param $wrapperConfigEntry Configuration entry which hold the wrapper class' name
* @return void
*/
- public final function setWrapperConfigEntry ($wrapperConfigEntry) {
- $this->wrapperConfigEntry = (string) $wrapperConfigEntry;
+ public final function setWrapperConfigEntry (string $wrapperConfigEntry) {
+ $this->wrapperConfigEntry = $wrapperConfigEntry;
}
/**
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return $criteria
*/
- public final function getCriteriaArray ($criteriaType = 'default') {
+ public final function getCriteriaArray (string $criteriaType = 'default') {
return $this->getGenericArrayKey('criteria', $criteriaType, 'entries');
}
* @param $criteriaKey Criteria key to unset
* @return void
*/
- public final function unsetCriteria ($criteriaKey) {
+ public final function unsetCriteria (string $criteriaKey) {
// Make sure no 'my-' or 'my_' passes this point
assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false));
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return void
*/
- public final function addCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
+ public final function addCriteria (string $criteriaKey, $criteriaValue, string $criteriaType = 'default') {
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue . ',criteriaType=' . $criteriaType . ' - CALLED!');
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return void
*/
- public final function setCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
+ public final function setCriteria (string $criteriaKey, $criteriaValue, string $criteriaType = 'default') {
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue . ',criteriaType=' . $criteriaType . ' - CALLED!');
* @param $criteriaValue Criteria value
* @return void
*/
- public final function addChoiceCriteria ($criteriaKey, $criteriaValue) {
+ public final function addChoiceCriteria (string $criteriaKey, $criteriaValue) {
// Make sure no 'my-' or 'my_' passes this point
assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false) && (!is_bool($criteriaValue)));
* @param $criteriaValue Criteria value
* @return void
*/
- public final function addExcludeCriteria ($criteriaKey, $criteriaValue) {
+ public final function addExcludeCriteria (string $criteriaKey, $criteriaValue) {
// Add it with generic method
$this->addCriteria($criteriaKey, $criteriaValue, 'exclude');
}
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return void
*/
- public final function addConfiguredCriteria ($criteriaKey, $configEntry, $criteriaType = 'default') {
+ public final function addConfiguredCriteria ($criteriaKey, $configEntry, string $criteriaType = 'default') {
// Add the configuration entry as a criteria
$value = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configEntry);
$this->addCriteria($criteriaKey, $value, $criteriaType);
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return $value Whether the value of the critera or false
*/
- public function getCriteriaElemnent ($criteriaKey, $criteriaType = 'default') {
+ public function getCriteriaElemnent ($criteriaKey, string $criteriaType = 'default') {
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA: criteriaKey=' . $criteriaKey . ',criteriaType=' . $criteriaType . ' - CALLED!');
* @param $criteriaKey The requested criteria key
* @return $value Whether the value of the critera or false
*/
- public function getCriteriaChoiceElemnent ($criteriaKey) {
+ public function getCriteriaChoiceElemnent (string $criteriaKey) {
// Call inner method
return $this->getCriteriaElemnent($criteriaKey, 'choice');
}
* @param $criteriaKey The requested criteria key
* @return $value Whether the value of the critera or false
*/
- public function getCriteriaExcludeElemnent ($criteriaKey) {
+ public function getCriteriaExcludeElemnent (string $criteriaKey) {
// Call inner method
return $this->getCriteriaElemnent($criteriaKey, 'exclude');
}
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return $matches Whether the entry matches or not
*/
- public function ifEntryMatches (array $entryArray, $criteriaType = 'default') {
+ public function ifEntryMatches (array $entryArray, string $criteriaType = 'default') {
// First nothing matches and nothing is counted
$matches = false;
$counted = 0;
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return $cacheKey The key suitable for the cache system
*/
- public function getCacheKey ($onlyKeys = array(), $criteriaType = 'default') {
+ public function getCacheKey (array $onlyKeys = [], string $criteriaType = 'default') {
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($this->__toString() . ': criteriaType=' . $criteriaType . ',count()=' . $this->countGenericArray('criteria')));
* @param $onlyKeys Only use these keys for a cache key
* @return $cacheKey The key suitable for the cache system
*/
- public function getCacheKeyChoice ($onlyKeys = array()) {
+ public function getCacheKeyChoice (array $onlyKeys = []) {
// Call inner method
return $this->getCacheKey($onlyKeys, 'choice');
}
* @param $onlyKeys Only use these keys for a cache key
* @return $cacheKey The key suitable for the cache system
*/
- public function getCacheKeyExclude ($onlyKeys = array()) {
+ public function getCacheKeyExclude (array $onlyKeys = []) {
// Call inner method
return $this->getCacheKey($onlyKeys, 'exclude');
}
- /**
- * Count the criteria, e.g. useful to find out if a database query has no
- * limitation (search criteria).
- *
- * @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
- * @return $count Count of all criteria entries
- */
- public final function count ($criteriaType = 'default') {
- // Return it
- return $this->countGenericArrayGroup('criteria', $criteriaType);
- }
-
/**
* Count 'choice' criteria, e.g. useful to find out if a database query
* has no limitation (search criteria).
/**
* Criteria to handle
*/
- private $criteria = array();
+ private $criteria = [];
/**
* Limitation for the search
// 'choice' check
if ((is_array($searchChoice)) && (count($valueArray) == 1)) {
- // $value is a single-search value, so use in_array()
+ // $value is a single-search value, so use in_[]
$isMatching = ((($isMatching === true) || (($searchDefault === false) && (!is_null($value)))) && (in_array($value, $searchChoice)));
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - SINGLE-MATCH');
} elseif ((is_array($searchChoice)) && (count($valueArray) > 1)) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',valueArray()=' . count($valueArray) . ',isMatching=' . intval($isMatching));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[]=' . count($valueArray) . ',isMatching=' . intval($isMatching));
// $value is choice-search value, so check all entries
$isMatching = (($isMatching === true) || (($searchDefault === false) && (!is_null($value))));
} // END - foreach
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',valueArray()=' . count($valueArray) . ',idx=' . $idx . ',isMatching=' . intval($isMatching) . ' - CHOICE-MATCH');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[]=' . count($valueArray) . ',idx=' . $idx . ',isMatching=' . intval($isMatching) . ' - CHOICE-MATCH');
} else {
// Choice-match is false
// Debug message
/**
* The last read file's content including header information
*/
- private $lastContents = array();
+ private $lastContents = [];
/**
* Whether the "connection is already up
/**
* Table information array
*/
- private $tableInfo = array();
+ private $tableInfo = [];
/**
* Element for index
*/
private function getContentsFromTableInfoFile (StoreableCriteria $dataSetInstance) {
// Default content is no data
- $infoArray = array();
+ $infoArray = [];
// Create FQFN for getting the table information file
$infoInstance = $this->generateFileFromDataSet($dataSetInstance, 'info');
// Initialize the result data, this need to be rewritten e.g. if a local file cannot be read
$resultData = array(
BaseDatabaseBackend::RESULT_INDEX_STATUS => self::RESULT_OKAY,
- BaseDatabaseBackend::RESULT_INDEX_ROWS => array()
+ BaseDatabaseBackend::RESULT_INDEX_ROWS => []
);
// Initialize limit/skip
$isFound = true;
// Search in the criteria with FMFW (First Matches, First Wins)
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: dataArray()=%d', count($dataArray)));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: data[]=%d', count($dataArray)));
foreach ($dataArray as $key => $value) {
// Make sure value is not bool
assert(!is_bool($value));
} // END - foreach
// Write the data to a local file
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHED-LFDB: Writing dataArray()=' . count($dataArray) . ' to ' . $fileInfoInstance->getPathname() . ' ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHED-LFDB: Writing data[]=' . count($dataArray) . ' to ' . $fileInfoInstance->getPathname() . ' ...');
$this->writeDataArrayToFqfn($fileInfoInstance, $dataArray);
// Count found entries up
* @param $onlyKeys Only use these keys for a cache key
* @return void
*/
- protected function queryInsertDataSet (StoreableCriteria $dataSetInstance, array $onlyKeys = array()) {
+ protected function queryInsertDataSet (StoreableCriteria $dataSetInstance, array $onlyKeys = []) {
// Default cache key is NULL
//* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-WRAPPER: dataSetInstance=%s,onlyKeys()=%d - CALLED!', $dataSetInstance->__toString(), count($onlyKeys)));
$cacheKey = NULL;
* @param $onlyKeys Only use these keys for a cache key
* @return void
*/
- protected function queryUpdateDataSet (StoreableCriteria $dataSetInstance, array $onlyKeys = array()) {
+ protected function queryUpdateDataSet (StoreableCriteria $dataSetInstance, array $onlyKeys = []) {
// Init cache key
$cacheKey = NULL;
* @param $onlyKeys Only use these keys for a cache key
* @return $resultInstance An instance of a database result class
*/
- public function doSelectByCriteria (Criteria $criteriaInstance, array $onlyKeys = array()) {
+ public function doSelectByCriteria (Criteria $criteriaInstance, array $onlyKeys = []) {
// Default cache key if cache is not enabled
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-WRAPPER: criteriaInstance=%s,onlyKeys()=%d - CALLED!', $criteriaInstance->__toString(), count($onlyKeys)));
$cacheKey = NULL;
- $result = array();
+ $result = [];
// Is the cache enabled?
if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) {
* @param $onlyKeys Only use these keys for a cache key
* @return $numRows Numbers of rows of database entries
*/
- public function doSelectCountByCriteria (Criteria $criteriaInstance, $onlyKeys = array()) {
+ public function doSelectCountByCriteria (Criteria $criteriaInstance, array $onlyKeys = []) {
// Total numbers is -1 so we can distinglish between failed and valid queries
$numRows = 0;
/**
* Counter of all objects
*/
- private static $objectCounters = array();
+ private static $objectCounters = [];
/**
* Protected constructor
* @throws NoClassException If the requested class was not found
* @throws InvalidArgumentException If className is empty or the name not following naming-convention
*/
- public static final function createObjectByName ($fullClassName, array $args = array()) {
+ public static final function createObjectByName ($fullClassName, array $args = []) {
// Is the class name valid and is the class there?
if (empty($fullClassName)) {
// Throw an exception here
* @param $args Arguments in an indexed array
* @return $objectInstance An instance of the requested object
*/
- public static final function createObjectByConfiguredName ($configEntry, array $args = array()) {
+ public static final function createObjectByConfiguredName ($configEntry, array $args = []) {
// Read the configuration entry
$fullClassName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configEntry);
* 'instance' => NULL
* )
*/
- private static $enabledFeatures = array();
+ private static $enabledFeatures = [];
/**
* Protected constructor
/**
* File header
*/
- private $header = array();
+ private $header = [];
/**
* Seek positions for gaps ("fragmentation")
*/
- private $gaps = array();
+ private $gaps = [];
/**
* Seek positions for damaged entries (e.g. mismatching hash sum, ...)
*/
- private $damagedEntries = array();
+ private $damagedEntries = [];
/**
* Back-buffer
$this->setSeekPosition(0);
// Init arrays
- $this->gaps = array();
- $this->damagedEntries = array();
+ $this->gaps = [];
+ $this->damagedEntries = [];
}
/**
* @param $except Some parts of a directory we want to ignore. Valid: directory and file names, other values will be silently ignored
* @return SplFileInfo An instance of a SplFileInfo class
*/
- public function readDirectoryExcept (array $except = array()) {
+ public function readDirectoryExcept (array $except = []) {
// No exceptions given?
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('DIRECTORY-POINTER: except()=%d - CALLED!', count($except)));
if (count($except) == 0) {
// Initialize some variables and arrays
$inputBuffer = '';
$lastBuffer = '';
- $header = array();
- $data = array();
+ $header = [];
+ $data = [];
$readData = ''; // This will contain our read data
// Get a file input handler
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] data()=%d,columnSeparator=%s - CALLED!', __METHOD__, __LINE__, strlen($data), $columnSeparator));
// Init return array
- $lineArray = array();
+ $lineArray = [];
// Whether the parser reads a quoted string (which may contain the column separator again)
$isInQuotes = false;
array_push($lineArray, $column);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] lineArray()=%d - After add!', __METHOD__, __LINE__, count($lineArray)));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] line[]=%d - After add!', __METHOD__, __LINE__, count($lineArray)));
// Clear variable ...
$column = '';
array_push($lineArray, $column);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] lineArray()=%d - After add!', __METHOD__, __LINE__, count($lineArray)));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] line[]=%d - After add!', __METHOD__, __LINE__, count($lineArray)));
} // END - if
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] lineArray()=%d - EXIT!', __METHOD__, __LINE__, count($lineArray)));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] line[]=%d - EXIT!', __METHOD__, __LINE__, count($lineArray)));
// Return it
return $lineArray;
*/
protected function getFilters () {
// Default is nothing found
- $filters = array();
+ $filters = [];
// Are some filters set?
if ($this->isValidGenericArrayKey('filters', 'generic', 'dummy')) {
*/
protected function getPostFilters () {
// Default is nothing found
- $filters = array();
+ $filters = [];
// Are some filters set?
if ($this->isValidGenericArrayKey('filters', 'post', 'dummy')) {
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Shutting down all ' . $this->getListInstance()->count() . ' tasks...');
// Remember all tasks that has been shutdown for removal
- $tasks = array();
+ $tasks = [];
// Instance a visitor
$this->setVisitorInstance(ObjectFactory::createObjectByConfiguredName('shutdown_task_visitor_class'));
/**
* All image strings
*/
- private $imageStrings = array();
+ private $imageStrings = [];
/**
* Current string name
/**
* Array with groups
*/
- private $groups = array();
+ private $groups = [];
/**
* Array with sub group
*/
- private $subGroups = array();
+ private $subGroups = [];
/**
* Previously opened group
/**
* List groups array
*/
- private $listGroups = array();
+ private $listGroups = [];
/**
* List entries array
*/
- private $listEntries = array();
+ private $listEntries = [];
/**
* List index array
*/
- private $listIndex = array();
+ private $listIndex = [];
/**
* Protected constructor
} // END - if
// Init array
- $array = array();
+ $array = [];
// Is there another list?
if (!is_null($list)) {
} // END - foreach
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',list[' . gettype($list) . ']=' . $list . ',array()=' . count($array) . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',list[' . gettype($list) . ']=' . $list . ',[]=' . count($array) . ' - EXIT!');
// Return it
return $array;
$this->listGroups[$groupName]->clearList();
// Clear this list
- $this->listIndex = array();
- $this->listEntries = array();
+ $this->listIndex = [];
+ $this->listEntries = [];
}
/**
} // END - if
// Init the entries' array
- $entries = array();
+ $entries = [];
// Get an iterator
$iteratorInstance = $this->listGroups[$groupName]->getIterator();
assert(!is_array($arrayKey));
// Init array
- $entry = array();
+ $entry = [];
// Debug message
//* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY: Checking arrayKey=' . $arrayKey . ',lookFor=' . $lookFor);
/**
* Array for the request data
*/
- private $requestData = array();
+ private $requestData = [];
/**
* Whether this request is valid and can be further processed. The default is
/**
* Array with all headers
*/
- private $responseHeaders = array();
+ private $responseHeaders = [];
/**
* Cookies we shall sent out
*/
- private $cookies = array();
+ private $cookies = [];
/**
* Body of the response
* @return void
*/
public final function resetResponseHeaders () {
- $this->responseHeaders = array();
+ $this->responseHeaders = [];
}
/**
header('Set-Cookie: ' . $cookieString);
// Remove them all
- $this->cookies = array();
+ $this->cookies = [];
} // END - if
}
/**
* The variable stack for the templates
*/
- private $varStack = array();
+ private $varStack = [];
/**
* Loaded templates for recursive protection and detection
*/
- private $loadedTemplates = array();
+ private $loadedTemplates = [];
/**
* Compiled templates for recursive protection and detection
*/
- private $compiledTemplates = array();
+ private $compiledTemplates = [];
/**
* Loaded raw template data
/**
* Loaded helpers
*/
- private $helpers = array();
+ private $helpers = [];
/**
* Current variable group
/**
* All template groups except "general"
*/
- private $variableGroups = array();
+ private $variableGroups = [];
/**
* Code begin
*/
private function readCurrentGroup () {
// Default is not found
- $result = array();
+ $result = [];
// Is the group there?
if ($this->isVarStackSet($this->currGroup)) {
// Is the stack there?
if (!isset($this->varStack[$variableGroup])) {
// Then initialize it here
- $this->varStack[$variableGroup] = array();
+ $this->varStack[$variableGroup] = [];
}
// Not found, add it
// Initialize some arrays
if (is_null($this->loadedRawData)) {
// Initialize both
- $this->loadedRawData = array();
- $this->rawTemplates = array();
+ $this->loadedRawData = [];
+ $this->rawTemplates = [];
}
// Load all requested templates
public final function compileVariables () {
// Initialize the $content array
$validVar = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('tpl_valid_var');
- $dummy = array();
+ $dummy = [];
// Iterate through all general variables
foreach ($this->getVarStack('general') as $currVariable) {
$methodName = sprintf('finish%s', StringUtils::convertToClassName($nodeName));
// Call the corresponding method
- call_user_func_array(array($this->getImageInstance(), $methodName), array());
+ call_user_func_array(array($this->getImageInstance(), $methodName), []);
}
/**
$methodName = 'finish' . StringUtils::convertToClassName($nodeName);
// Call the corresponding method
- call_user_func_array(array($this, $methodName), array());
+ call_user_func_array(array($this, $methodName), []);
}
/**
// Call the corresponding method
//* DEBUG: */ echo "call: ".$methodName."<br />\n";
- call_user_func_array(array($this, $methodName), array());
+ call_user_func_array(array($this, $methodName), []);
}
/**
/**
* The super constructor for all exceptions
*
- * @param $msgArray An array with message parts
+ * @param $messageArray An array with message parts
* @param $code An optional code for better debugging
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Prepare the message
$message = sprintf('[%s:%d] Cannot resolve action <span class="exception_reason">%s (%s)</span>.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1],
- $msgArray[0]->getClassName()
+ $messageArray[1],
+ $messageArray[0]->getClassName()
);
// Call parent contructor with message
* @param $code Error code
* @return void
*/
- public function __construct (Filterable $filterInstance, $code) {
+ public function __construct (Filterable $filterInstance, int $code) {
// Construct the message
$message = sprintf('[%s:%d] Authorization has failed. Error code %s',
$filterInstance->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Construct message
$message = sprintf('[%s:%d] Raw data %s contains invalid characters for BASE64-encoding.',
$messageArray[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Construct message
$message = sprintf('[%s:%d] Data length %s modulo 4 is not zero: data=%s',
$messageArray[0]->__toString(),
/**
* Array for the backtrace
*/
- private $backTrace = array();
+ private $backTrace = [];
/**
* Extra data
* @param $code An optional code for better debugging
* @return void
*/
- public function __construct ($message, $code = 0) {
+ public function __construct (string $message, int $code = 0) {
// Make sure everything is assigned properly
parent::__construct($message, $code);
* @param $code Integer code to encode in hex
* @return $hexCode The exception code in hex-decimal format
*/
- public final function getHexCode ($code = NULL) {
- // Get the decimal code
- if (is_null($code)) $code = $this->getCode();
+ public final function getHexCode (int $code = NULL) {
+ // Is NULL?
+ if (is_null($code)) {
+ // Get default error code
+ $code = $this->getCode();
+ }
// Format it to hex-decimal, 0x as prefix and 3 chars
$hexCode = sprintf("0x%03s", dechex($code));
* @param $extraData Extra data to store
* @return void
*/
- protected final function setExtraData ($extraData) {
+ protected final function setExtraData (string $extraData) {
$this->extraData = $extraData;
}
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $array, $code) {
+ public function __construct (array $array, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Der Kompressor %s zu den geladenen Daten aus %s und der aktuell verwendete Kompressor %s stimmen nicht überein!',
$array[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Construct message
$message = sprintf('[%s:%d] Configuration key %s has unspported value type %s.',
$messageArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Configuration entry %s not found.',
$classArray[0],
* @param $code Error code
* @return void
*/
- public function __construct (array $messageData, $code) {
+ public function __construct (array $messageData, int $code) {
// Construct the message
$message = sprintf('[%s:] Connection with socket %s is already registered.',
$messageData[0]->__toString(),
* @param $code An optional code for better debugging
* @return void
*/
- public function __construct (ControllerResolver $resolverInstance, $code) {
+ public function __construct (ControllerResolver $resolverInstance, int $code) {
// Prepare the message
$message = sprintf('[%s:%d] Cannot resolve default controller <span class="exception_reason">(%s)</span>. Maybe missing?',
$resolverInstance->__toString(),
/**
* The super constructor for all exceptions
*
- * @param $msgArray An array with message parts
+ * @param $messageArray An array with message parts
* @param $code An optional code for better debugging
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Prepare the message
$message = sprintf('[%s:%d] Cannot resolve controller <span class="exception_reason">%s (class name: %s)</span>.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1],
- $msgArray[0]->getClassName()
+ $messageArray[1],
+ $messageArray[0]->getClassName()
);
// Set extra data
- $this->setExtraData($msgArray[0]->getClassName() . ':' . $this->getLine());
+ $this->setExtraData($messageArray[0]->getClassName() . ':' . $this->getLine());
// Call parent contructor with message
parent::__construct($message, $code);
* @param $code Error code
* @return void
*/
- public function __construct (Filterable $filterInstance, $code) {
+ public function __construct (Filterable $filterInstance, int $code) {
// Get length
$length = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('captcha_string_length');
* @param $code Error code
* @return void
*/
- public function __construct (Filterable $filterInstance, $code) {
+ public function __construct (Filterable $filterInstance, int $code) {
// Construct message
$message = sprintf('[%s:%d] Encrypt string is missing.',
$filterInstance->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($message, $code) {
+ public function __construct ($message, int $code) {
// Just call the parent constructor
parent::__construct($message, $code);
}
/**
* The constructor
*
- * @param $msgArray Message array
+ * @param $messageArray Message array
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Construct the message
$message = sprintf('[%s:%d] SQL error detected. Message from database: %s, code: %s.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1],
- $this->getHexCode($msgArray[2])
+ $messageArray[1],
+ $this->getHexCode($messageArray[2])
);
// Call parent constructor
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($path, $code) {
+ public function __construct (string $path, int $code) {
// Add a message around the missing class
$message = sprintf('Save path %s is no directory.', $path);
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($path, $code) {
+ public function __construct (string $path, int $code) {
// Add a message around the missing class
$message = sprintf('Path %s is not readable. Please fix your file access rights.', $path);
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($path, $code) {
+ public function __construct (string $path, int $code) {
// Add a message around the missing class
$message = sprintf('Save path %s is write-protected. Please fix your file permissions.', $path);
/**
* The constructor
*
- * @param $msgArray Message array holding all needed data
+ * @param $messageArray Message array holding all needed data
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the host name
$message = sprintf('[%s:%d] Host name "%s" cannot be resolved (NXDOMAIN).',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1]
+ $messageArray[1]
);
// Call parent constructor
* @param $code Error code
* @return void
*/
- public function __construct (array $messageArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Construct message
$message = sprintf('[%s:%d] Method %s cannot be called.',
$messageArray[0],
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($path, $code) {
+ public function __construct (string $path, int $code) {
// Add a message around the missing class
$message = sprintf('No pointer could be initialized for path "%s".', $path);
* @param $code Code number for the exception
* @return void
*/
- public function __construct (SplFileInfo $infoInstance, $code) {
+ public function __construct (SplFileInfo $infoInstance, int $code) {
// Add a message around the missing class
$message = sprintf('A problem has been detected reading or writing to/from %s.', $infoInstance->getPathname());
* @param $code Code number for the exception
* @return void
*/
- public function __construct (SplFileInfo $infoInstance, $code) {
+ public function __construct (SplFileInfo $infoInstance, int $code) {
// Add a message around the missing class
$message = sprintf('File "%s" not found.', $infoInstance->getPathname());
* @param $code Code number for the exception
* @return void
*/
- public function __construct (SplFileInfo $infoInstance, $code) {
+ public function __construct (SplFileInfo $infoInstance, int $code) {
// Add a message around the missing class
$message = sprintf('File %s is read-protected. Please set read access rights (CHMOD).', $infoInstance->getPathname());
* @param $code Code number for the exception
* @return void
*/
- public function __construct (SplFileInfo $infoInstance, $code) {
+ public function __construct (SplFileInfo $infoInstance, int $code) {
// Add a message around the missing class
$message = sprintf('File %s cannot be written. Please check file and/or directory permissions.', $infoInstance->getPathname());
/**
* The constructor
*
- * @param $msgArray Message from the exception
+ * @param $messageArray Message from the exception
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Unexpected data length of %s bytes has been detected, %s bytes were expected.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1],
- $msgArray[2]
+ $messageArray[1],
+ $messageArray[2]
);
// Call parent constructor
/**
* The constructor
*
- * @param $msgArray Message from the exception
+ * @param $messageArray Message from the exception
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] MD5 hashes %s and %s doesnt match.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1],
- $msgArray[2]
+ $messageArray[1],
+ $messageArray[2]
);
// Call parent constructor
* @param $code Code number for the exception
* @return void
*/
- public function __construct (FrameworkInterface $class, $code) {
+ public function __construct (FrameworkInterface $class, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Has an invalid resource.',
$class->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($path, $code) {
+ public function __construct (string $path, int $code) {
// Add a message around the missing class
$message = sprintf('Der angegebene Pfad %s ist ungütig (kein Pfad).', $path);
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($path, $code) {
+ public function __construct (string $path, int $code) {
// Add a message around the missing class
$message = sprintf('The path %s appears to be read-protected. Please fix your CHMOD rights.', $path);
* @param $code Code number for the exception
* @return void
*/
- public function __construct (SplFileInfo $infoInstance, $code) {
+ public function __construct (SplFileInfo $infoInstance, int $code) {
// Add a message around the missing class
$message = sprintf('Path "%s" cannot be written to. Please check permissions.', $infoInstance->getPath());
* @param $code Exception code for better debugging
* @return void
*/
- public function __construct (Filterable $filterInstance, $code) {
+ public function __construct (Filterable $filterInstance, int $code) {
// Construct the message
$message = sprintf('[%s:%d] Filter chain interruppted by fatal error in filter.',
$filterInstance->__toString(),
* @param $code Exception code for better debugging
* @return void
*/
- public function __construct (array $filterArray, $code) {
+ public function __construct (array $filterArray, int $code) {
// Construct the message
$message = sprintf('[%s:%d] Filter chain %s is not initialized.',
$filterArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Could not add form element %s because form is closed.',
$classArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Could not add sub group %s because no form group has been opened before.',
$classArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (BaseHelper $helperInstance, $code) {
+ public function __construct (BaseHelper $helperInstance, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Form is not yet closed. Close it with method <u>%s::addFormTag()</u> and add no parameters.',
$helperInstance->__toString(),
/**
* The constructor
*
- * @param $msgArray Array containing exception data
+ * @param $messageArray Array containing exception data
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Group %s already opened before.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1]
+ $messageArray[1]
);
// Call parent constructor
/**
* The constructor
*
- * @param $msgArray Array containing exception data
+ * @param $messageArray Array containing exception data
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Sub group not opened before. Raw text follows: %s',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1]
+ $messageArray[1]
);
// Call parent constructor
/**
* The constructor
*
- * @param $msgArray Array containing exception data
+ * @param $messageArray Array containing exception data
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Sub group %s already opened before.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1]
+ $messageArray[1]
);
// Call parent constructor
* @param $code Code number for the exception
* @return void
*/
- public function __construct (BaseHelper $helperInstance, $code) {
+ public function __construct (BaseHelper $helperInstance, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Form name not set.',
$helperInstance->__toString(),
/**
* The constructor
*
- * @param $msgArray Array containing exception data
+ * @param $messageArray Array containing exception data
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Group not opened before. Raw text follows: %s',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1]
+ $messageArray[1]
);
// Call parent constructor
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Registry key %s does not include a class with implemented interface <u>Manageable(User|Guest)</u>.',
$classArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] %s is not a string with path.',
$classArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Language base path %s does not exist or is not a directory.',
$classArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Base language path %s is read-protected. Please change access rights (CHMOD).',
$classArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($message, $code) {
+ public function __construct (string $message, int $code) {
// Call parent constructor
parent::__construct($message, $code);
}
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Add a message around the missing class
$message = sprintf('The class %s does not match class %s.',
$classArray[0],
* @param $code Code number for the exception
* @return void
*/
- public function __construct (FrameworkInterface $class, $code) {
+ public function __construct (FrameworkInterface $class, int $code) {
if (is_object($class)) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Dimensions not found in array, array is invalid!',
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($message, $code) {
+ public function __construct (string $message, int $code) {
// Call parent constructor
parent::__construct($message, $code);
}
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($message, $code) {
+ public function __construct (string $message, int $code) {
// Add a message around the missing class
$message = sprintf('%s is out of bounds.',
$message
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $array, $code) {
+ public function __construct (array $array, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] %s has %d elements, expected arre %d.',
$array[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Invalid command <span class="exception_reason">%s (class %s)</span> detected.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1],
- $msgArray[0]->getClassName()
+ $messageArray[1],
+ $messageArray[0]->getClassName()
);
// Set extra data
- $this->setExtraData($msgArray[0]->getClassName() . ':' . $this->getLine());
+ $this->setExtraData($messageArray[0]->getClassName() . ':' . $this->getLine());
// Call parent constructor
parent::__construct($message, $code);
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Object does not implement expected interface %s.',
$classArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (FrameworkInterface $class, $code) {
+ public function __construct (FrameworkInterface $class, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Object is not allowed here.',
$class->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Extract all elements
$elements = '';
if ((isset($classArray[2])) && (is_array($classArray[2]))) {
/**
* The constructor
*
- * @param $msgArray Message from the exception
+ * @param $messageArray Message from the exception
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Class %s not found.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1]
+ $messageArray[1]
);
// Set extra data
- $this->setExtraData($msgArray[1]);
+ $this->setExtraData($messageArray[1]);
// Call parent constructor
parent::__construct($message, $code);
* @param $code Code number for the exception
* @return void
*/
- public function __construct (FrameworkInterface $class, $code) {
+ public function __construct (FrameworkInterface $class, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Headers are already sent.',
$class->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Init extra class name
$extraClassName = '';
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $array, $code) {
+ public function __construct (array $array, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] While the application %s was initialized, a variable %s was not created.',
$array[0]->__toString(),
/**
* The super constructor for all exceptions
*
- * @param $msgArray Error message array
+ * @param $messageArray Error message array
* @param $code Error code
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Construct the message
$message = sprintf('[%s:%d] Database instance %s contains invalid entries.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1]->__toString()
+ $messageArray[1]->__toString()
);
// Call parent exception constructor
* @param $code Error code
* @return void
*/
- public function __construct (UpdateableResult $resultInstance, $code) {
+ public function __construct (UpdateableResult $resultInstance, int $code) {
// Construct the message
$message = sprintf('[%s:%d] Update of result instance has nothing changed.',
$resultInstance->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageData, $code) {
+ public function __construct (array $messageData, int $code) {
// Construct the message
$message = sprintf('[%s:] Socket resource %s is not a server socket.',
$messageData[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageData, $code) {
+ public function __construct (array $messageData, int $code) {
// Construct the message
$message = sprintf('[%s:] Invalid socketResource[%s]=%s, errno=%s, errstr=%s',
$messageData[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageData, $code) {
+ public function __construct (array $messageData, int $code) {
// Construct the message
$message = sprintf('[%s:] Socket %s has no error reported.',
$messageData[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageData, $code) {
+ public function __construct (array $messageData, int $code) {
// Construct the message
$message = sprintf('[%s:] Socket %s is already registered.',
$messageData[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageData, $code) {
+ public function __construct (array $messageData, int $code) {
// Construct the message
$message = sprintf('[%s:] Could not bind to socket %s: Type=%s, errno=%s, errstr=%s',
$messageData[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageData, $code) {
+ public function __construct (array $messageData, int $code) {
// Construct the message
$message = sprintf('[%s:] Could not make a connection, type=%s, errno=%s, errstr=%s',
$messageData[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageData, $code) {
+ public function __construct (array $messageData, int $code) {
// Construct the message
$message = sprintf('[%s:] Cannot create socket, type=%s, errno=%s, errstr=%s',
$messageData[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageData, $code) {
+ public function __construct (array $messageData, int $code) {
// Construct the message
$message = sprintf('[%s:] Socket operation failed, type=%s, errno=%s, errstr=%s',
$messageData[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageData, $code) {
+ public function __construct (array $messageData, int $code) {
// Construct the message
$message = sprintf('[%s:] Changing option on socket failed, type=%s, errno=%s, errstr=%s',
$messageData[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageData, $code) {
+ public function __construct (array $messageData, int $code) {
// Construct the message
$message = sprintf('[%s:] Socket error handler %s is not yet implemented, errorCode=%s, message=%s',
$messageData[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Construct message
$message = sprintf('[%s:%d] Stacker %s already initialized, forceReInit=%d.',
$messageArray[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Construct message
$message = sprintf('[%s:%d] Stacker %s is empty.',
$messageArray[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Construct message
$message = sprintf('[%s:%d] Stacker %s is full.',
$messageArray[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $messageArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Construct message
$message = sprintf('[%s:%d] Stacker %s is not initialized.',
$messageArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Invalid state %s of type %s detected.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1],
+ $messageArray[1],
gettype($mgArray[2])
);
* @param $code Error code
* @return void
*/
- public function __construct (Stateable $stateInstance, $code) {
+ public function __construct (Stateable $stateInstance, int $code) {
// Construct the message
$message = sprintf('[%s:%d] Unexpected state detected.',
$stateInstance->__toString(),
/**
* The super constructor for all exceptions
*
- * @param $msgArray An array with message parts
+ * @param $messageArray An array with message parts
* @param $code An optional code for better debugging
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Prepare the message
$message = sprintf('[%s:%d] Cannot resolve state <span class="exception_reason">%s (class name: %s)</span>.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1],
- $msgArray[0]->getClassName()
+ $messageArray[1],
+ $messageArray[0]->getClassName()
);
// Set extra data
- $this->setExtraData($msgArray[0]->getClassName() . ':' . $this->getLine());
+ $this->setExtraData($messageArray[0]->getClassName() . ':' . $this->getLine());
// Call parent contructor with message
parent::__construct($message, $code);
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Der Template-Basispfad %s ist lesegeschützt! Bitte Zugriffsrechte (CHMOD) ändern.',
$classArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Path "%s" is no directory.',
$classArray[0]->__toString(),
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $messageArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Variable %s is not set, cannot modify(?) its value to %s.',
$messageArray[0]->__toString(),
/**
* The constructor
*
- * @param $msgArray An array holding our informations
+ * @param $messageArray An array holding our informations
* @param $code Code number for the exception
* @return void
*/
- public function __construct (array $msgArray, $code) {
+ public function __construct (array $messageArray, int $code) {
// Add a message around the missing class
$message = sprintf('[%s:%d] Der Template-Typ %s entspricht nicht dem erwartetem Template-Typ %s.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1],
- $msgArray[2]
+ $messageArray[1],
+ $messageArray[2]
);
// Call parent constructor
* @param $code Code number for the exception
* @return void
*/
- public function __construct (FrameworkInterface $class, $code) {
+ public function __construct (FrameworkInterface $class, int $code) {
// Add a message around the missing class
$message = sprintf('Template-Engine %s not (yet) supported.',
$class->__toString()
* @param $code An optional code for better debugging
* @return void
*/
- public function __construct (Filterable $filterInstance, $code) {
+ public function __construct (Filterable $filterInstance, int $code) {
// Create the message
$message = sprintf('[%s:%d] Supplied account password did not match with stored.',
$filterInstance->__toString(),
/**
* The super constructor for all exceptions
*
- * @param $msgArray The non-optional message for the exception
+ * @param $messageArray The non-optional message for the exception
* @param $code An optional code for better debugging
* @return void
*/
- public function __construct (array $msgArray, $code = 0) {
+ public function __construct (array $messageArray, $code = 0) {
// Create the message
$message = sprintf('[%s:%d] User %s is a guest account.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1]
+ $messageArray[1]
);
// Make sure everything is assigned properly
/**
* The super constructor for all exceptions
*
- * @param $msgArray The non-optional message for the exception
+ * @param $messageArray The non-optional message for the exception
* @param $code An optional code for better debugging
* @return void
*/
- public function __construct (array $msgArray, $code = 0) {
+ public function __construct (array $messageArray, $code = 0) {
// Create the message
$message = sprintf('[%s:%d] User email %s was not found.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1]
+ $messageArray[1]
);
// Make sure everything is assigned properly
/**
* The super constructor for all exceptions
*
- * @param $msgArray The non-optional message for the exception
+ * @param $messageArray The non-optional message for the exception
* @param $code An optional code for better debugging
* @return void
*/
- public function __construct (array $msgArray, $code = 0) {
+ public function __construct (array $messageArray, $code = 0) {
// Create the message
$message = sprintf('[%s:%d] User %s is not a guest account: %s',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1],
- $msgArray[0]->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS)
+ $messageArray[1],
+ $messageArray[0]->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS)
);
// Make sure everything is assigned properly
/**
* The super constructor for all exceptions
*
- * @param $msgArray The non-optional message for the exception
+ * @param $messageArray The non-optional message for the exception
* @param $code An optional code for better debugging
* @return void
*/
- public function __construct (array $msgArray, $code = 0) {
+ public function __construct (array $messageArray, $code = 0) {
// Create the message
$message = sprintf('[%s:%d] Supplied password for user %s did not match with stored password.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1]->getUserName()
+ $messageArray[1]->getUserName()
);
// Make sure everything is assigned properly
/**
* The super constructor for all exceptions
*
- * @param $msgArray The non-optional message for the exception
+ * @param $messageArray The non-optional message for the exception
* @param $code An optional code for better debugging
* @return void
*/
- public function __construct (array $msgArray, $code = 0) {
+ public function __construct (array $messageArray, $code = 0) {
// Create the message
$message = sprintf('[%s:%d] Username %s was not found.',
- $msgArray[0]->__toString(),
+ $messageArray[0]->__toString(),
$this->getLine(),
- $msgArray[1]
+ $messageArray[1]
);
// Make sure everything is assigned properly
* @param $code Error code
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Extract attributes
$attributes = '<em>None</em>';
if ((is_array($classArray[2])) && (count($classArray[2]) > 0)) {
* @param $code Error code
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Construct our message
$message = sprintf('[%s:%d] XML nodes mismatch. Given: %s, Expected: %s',
$classArray[0]->__toString(),
* @param $code Error code
* @return void
*/
- public function __construct (array $classArray, $code) {
+ public function __construct (array $classArray, int $code) {
// Construct our message
$message = sprintf('[%s:%d] XML Error: %s at line %d.',
$classArray[0]->__toString(),
* @param $wrapperConfigEntry Configuration entry which hold the wrapper class' name
* @return void
*/
- function setWrapperConfigEntry ($wrapperConfigEntry);
+ function setWrapperConfigEntry (string $wrapperConfigEntry);
/**
* Getter for wrapper class name
* @param $criteriaKey Criteria key
* @return $isSet Whether key is set
*/
- function isKeySet ($criteriaType, $criteriaKey);
+ function isKeySet (string $criteriaType, string $criteriaKey);
/**
* Checks whether given key is set for 'choice' type
* @param $criteriaKey Criteria key
* @return $isSet Whether key is set
*/
- function isChoiceKeySet ($criteriaKey);
+ function isChoiceKeySet (string $criteriaKey);
/**
* Checks whether given key is set for 'exclude' type
* @param $criteriaKey Criteria key
* @return $isSet Whether key is set
*/
- function isExcludeKeySet ($criteriaKey);
+ function isExcludeKeySet (string $criteriaKey);
/**
* Getter for criteria array
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return $criteria
*/
- function getCriteriaArray ($criteriaType = 'default');
+ function getCriteriaArray (string $criteriaType = 'default');
/**
* Getter for criteria array 'choice' type
* @param $criteriaKey Criteria key to unset
* @return void
*/
- function unsetCriteria ($criteriaKey);
+ function unsetCriteria (string $criteriaKey);
/**
* Add criteria, this method converts dashes to underscores because dashes
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return void
*/
- function addCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default');
+ function addCriteria (string $criteriaKey, $criteriaValue, string $criteriaType = 'default');
/**
* Sets criteria, this method converts dashes to underscores because dashes
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return void
*/
- function setCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default');
+ function setCriteria (string $criteriaKey, $criteriaValue, string $criteriaType = 'default');
/**
* Add "choice" criteria, this method converts dashes to underscores because
* @param $criteriaValue Criteria value
* @return void
*/
- function addChoiceCriteria ($criteriaKey, $criteriaValue);
+ function addChoiceCriteria (string $criteriaKey, $criteriaValue);
/**
* Add "exclude" criteria, this method converts dashes to underscores because
* @param $criteriaValue Criteria value
* @return void
*/
- function addExcludeCriteria ($criteriaKey, $criteriaValue);
+ function addExcludeCriteria (string $criteriaKey, $criteriaValue);
/**
* Add configured criteria
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return void
*/
- function addConfiguredCriteria ($criteriaKey, $configEntry, $criteriaType = 'default');
+ function addConfiguredCriteria (string $criteriaKey, string $configEntry, string $criteriaType = 'default');
/**
* Get criteria element or false if not found
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return $value Whether the value of the critera or false
*/
- function getCriteriaElemnent ($criteriaKey, $criteriaType = 'default');
+ function getCriteriaElemnent (string $criteriaKey, string $criteriaType = 'default');
/**
* Get criteria element or false if not found for 'choice' type
* @param $criteriaKey The requested criteria key
* @return $value Whether the value of the critera or false
*/
- function getCriteriaChoiceElemnent ($criteriaKey);
+ function getCriteriaChoiceElemnent (string $criteriaKey);
/**
* Get criteria element or false if not found for 'exclude' type
* @param $criteriaKey The requested criteria key
* @return $value Whether the value of the critera or false
*/
- function getCriteriaExcludeElemnent ($criteriaKey);
+ function getCriteriaExcludeElemnent (string $criteriaKey);
/**
* Checks whether given array entry matches
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return $matches Whether the entry matches or not
*/
- function ifEntryMatches (array $entryArray, $criteriaType = 'default');
+ function ifEntryMatches (array $entryArray, string $criteriaType = 'default');
/**
* Checks whether given array 'choice' entry matches
* @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
* @return $cacheKey The key suitable for the cache system
*/
- function getCacheKey ($onlyKeys = array(), $criteriaType = 'default');
+ function getCacheKey (array $onlyKeys = [], string $criteriaType = 'default');
/**
* "Getter" for a cache key ('choice' type)
* @param $onlyKeys Only use these keys for a cache key
* @return $cacheKey The key suitable for the cache system
*/
- function getCacheKeyChoice ($onlyKeys = array());
+ function getCacheKeyChoice (array $onlyKeys = []);
/**
* "Getter" for a cache key ('exclude' type)
* @param $onlyKeys Only use these keys for a cache key
* @return $cacheKey The key suitable for the cache system
*/
- function getCacheKeyExclude ($onlyKeys = array());
-
- /**
- * Count the criteria, e.g. useful to find out if a database query has no
- * limitation (search criteria).
- *
- * @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
- * @return $count Count of all criteria entries
- */
- function count ($criteriaType = 'default');
+ function getCacheKeyExclude (array $onlyKeys = []);
/**
* Count 'choice' criteria, e.g. useful to find out if a database query
* @param $onlyKeys Only use these keys for a cache key
* @return $resultInstance An instance of a database result class
*/
- function doSelectByCriteria(Criteria $criteriaInstance, array $onlyKeys = array());
+ function doSelectByCriteria(Criteria $criteriaInstance, array $onlyKeys = []);
/**
* Count the numbers of rows we shall receive
* @param $onlyKeys Only use these keys for a cache key
* @return $numRows Numbers of rows of database entries
*/
- function doSelectCountByCriteria(Criteria $criteriaInstance, $onlyKeys = array());
+ function doSelectCountByCriteria(Criteria $criteriaInstance, array $onlyKeys = []);
/**
* Getter for primary key used in wrapped table
* @param $except Some parts of a directory we want to ignore. Valid: directory and file names, other values will be silently ignored
* @return SplFileInfo An instance of a SplFileInfo class
*/
- function readDirectoryExcept (array $except = array());
+ function readDirectoryExcept (array $except = []);
/**
* Close a directory source and set it's instance to null and the path name