// So look for array element?
if (($exists === TRUE) && (!is_null($arrayElement))) {
// Get it
- $array = $this->offetget($offset);
+ $array = $this->offsetGet($offset);
// Is it an array and element is found?
if ((is_array($array)) && (isset($array[$arrayElement]))) {
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue);
// Add it
- $this->criteria['choice'][$this->convertDashesToUnderscores($criteriaKey)][] = (string) $criteriaValue;
+ array_push($this->criteria['choice'][$this->convertDashesToUnderscores($criteriaKey)], (string) $criteriaValue);
}
/**
// Entry found!
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: indexKey=' . $this->getIndexKey() . ',idx=' . $idx . ',dataArray=' . print_r($dataArray, TRUE));
- $resultData[BaseDatabaseBackend::RESULT_INDEX_ROWS][] = $dataArray;
+ array_push($resultData[BaseDatabaseBackend::RESULT_INDEX_ROWS], $dataArray);
// Count found entries up
$limitFound++;
* @return void
*/
public final function addFilter (Filterable $filterInstance) {
- $this->filters[] = $filterInstance;
+ array_push($this->filters, $filterInstance);
}
/**
} // END - if
// Add it as a recipient
- $this->recipientList[$templateName]['recipients'][] = $userInstance;
+ array_pushh($this->recipientList[$templateName]['recipients'], $userInstance);
}
/**
*/
public final function addEntry ($key, $value) {
// Simply add it
- $this->rawEntries[$key][] = $value;
+ array_push($this->rawEntries[$key], $value);
}
/**
*/
public final function addFatalMessage ($messageId) {
// Adds the resolved message id to the fatal message list
- $this->fatalMessages[] = $this->getApplicationInstance()->getLanguageInstance()->getMessage($messageId);
+ array_push($this->fatalMessages, $this->getApplicationInstance()->getLanguageInstance()->getMessage($messageId));
}
/**
*/
public final function addFatalMessagePlain ($message) {
// Adds the resolved message id to the fatal message list
- $this->fatalMessages[] = $message;
+ array_push($this->fatalMessages, $message);
}
/**
$currVars = $this->readCurrentGroup();
// Append our variable
- $currVars[] = $this->generateVariableArray($variableName, $value);
+ array_push($currVars, $this->generateVariableArray($variableName, $value));
// Add it to the stack
$this->setVarStack($this->currGroup, $currVars);
// Is the variable set?
if ($index === FALSE) {
// Not found, add it
- $this->varStack[$varGroup][] = $this->generateVariableArray($variableName, $value);
+ array_push($this->varStack[$varGroup], $this->generateVariableArray($variableName, $value));
} else {
// Then modify it
$this->setVariableValue($this->currGroup, $index, $value);
$this->loadedRawData[$template] = $this->readVariable($template, 'config');
// Recursive protection:
- $this->loadedTemplates[] = $template;
+ array_push($this->loadedTemplates, $template);
} elseif ($this->getVariableIndex($template) !== FALSE) {
// Use that content here
$this->loadedRawData[$template] = $this->readVariable($template);
// Recursive protection:
- $this->loadedTemplates[] = $template;
+ array_push($this->loadedTemplates, $template);
} else {
// Then try to search for code-templates
try {
// Remember this template for recursion detection
// RECURSIVE PROTECTION!
- $this->loadedTemplates[] = $template;
+ array_push($this->loadedTemplates, $template);
} catch (FileIoException $e) {
// Even this is not done... :/
- $this->rawTemplates[] = $template;
+ array_push($this->rawTemplates, $template);
}
}
} // END - if
} // END - if
// Remember this template being compiled
- $this->compiledTemplates[] = $template;
+ array_push($this->compiledTemplates, $template);
// Compile the loaded code in five steps:
//
// Remember this template for recursion detection
// RECURSIVE PROTECTION!
- $this->loadedTemplates[] = $template;
+ array_push($this->loadedTemplates, $template);
} catch (FileIoException $e) {
// This template was never found. We silently ignore it
unset($this->rawTemplates[$key]);
// Generate request header
$request = "GET /".trim($script)." HTTP/1.0\r\n";
$request .= "Host: ".$host."\r\n";
- $request .= sprintf("User-Agent: Bube oder Dame / 1.0 by Quix0r [Spieler: %d]\r\n\r\n", $this->w_id);
+ $request .= sprintf("User-Agent: WernisApi/1.0 by Quix0r [Spieler: %d]\r\n\r\n", $this->w_id);
// Initialize array
$response = array();
// Read response
while(!feof($fp)) {
- $response[] = trim(fgets($fp, 1024));
- }
+ array_push($response, trim(fgets($fp, 1024)));
+ } // END - while
// Close socket
fclose($fp);
// Was the request successfull?
- if ((!ereg("200 OK", $response[0])) && (empty($response[0]))) {
+ if ((!ereg('200 OK', $response[0])) && (empty($response[0]))) {
// Not found / access forbidden
$response = array('', '', '');
- }
+ } // END - if
// Return response
return $response;
* scanning the whole directory structure starting from given base
* path.
*/
- $ignoreList[] = '.';
- $ignoreList[] = '..';
- $ignoreList[] = '.htaccess';
- $ignoreList[] = '.svn';
+ array_push($ignoreList, '.');
+ array_push($ignoreList, '..');
+ array_push($ignoreList, '.htaccess');
+ array_push($ignoreList, '.svn');
// Keep it in class for later usage
$this->ignoreList = $ignoreList;
$this->total++;
// Mark this class as loaded
- $this->loadedClasses[] = $this->classes[$fileName];
+ array_push($this->loadedClasses, $this->classes[$fileName]);
// Remove it from classes list
unset($this->classes[$fileName]);