} elseif (is_array($args)) {
// Some arguments are there
foreach ($args as $arg) {
- // Add the type
- $argsString .= $this->replaceControlCharacters($arg) . ' (' . gettype($arg);
+ // Add the value itself if not array. This prevents 'array to string conversion' message
+ if (is_array($arg)) {
+ $argsString .= 'Array';
+ } else {
+ $argsString .= $arg;
+ }
+
+ // Add data about the argument
+ $argsString .= ' (' . gettype($arg);
if (is_string($arg)) {
// Add length for strings
}
/**
- * Checks wether an object equals this object. You should overwrite this
+ * Checks whether an object equals this object. You should overwrite this
* method to implement own equality checks
*
* @param $objectInstance An instance of a FrameworkInterface object
- * @return $equals Wether both objects equals
+ * @return $equals Whether both objects equals
*/
public function equals (FrameworkInterface $objectInstance) {
// Now test it
* Outputs a debug backtrace and stops further script execution
*
* @param $message An optional message to output
+ * @param $doExit Whether exit the program (true is default)
* @return void
*/
- public function debugBackTrace ($message = '') {
+ public function debugBackTrace ($message = '', $doExit = true) {
// Sorry, there is no other way getting this nice backtrace
if (!empty($message)) {
// Output message
print('<pre>');
debug_print_backtrace();
print('</pre>');
- exit();
+
+ // Exit program?
+ if ($doExit === true) {
+ exit();
+ } // END - if
}
/**
- * Outputs a debug message wether to debug instance (should be set!) or dies with or pints the message
+ * Outputs a debug message whether to debug instance (should be set!) or dies with or pints the message
*
* @param $message Message we shall send out...
- * @param $doPrint Wether we shall print or die here which first is the default
+ * @param $doPrint Whether we shall print or die here which first is the default
* @return void
*/
public function debugOutput ($message, $doPrint = true) {
}
/**
- * Checks wether the given PHP extension is loaded
+ * Checks whether the given PHP extension is loaded
*
* @param $phpExtension The PHP extension we shall check
- * @return $isLoaded Wether the PHP extension is loaded
+ * @return $isLoaded Whether the PHP extension is loaded
*/
public final function isPhpExtensionLoaded ($phpExtension) {
// Is it loaded?
/**
* Idles (sleeps) for given milliseconds
*
- * @return $hasSlept Wether it goes fine
+ * @return $hasSlept Whether it goes fine
*/
public function idle ($milliSeconds) {
// Sleep is fine by default
}
/**
- * Checks wether the given encoded data was encoded with Base64
+ * Checks whether the given encoded data was encoded with Base64
*
* @param $encodedData Encoded data we shall check
- * @return $isBase64 Wether the encoded data is Base64
+ * @return $isBase64 Whether the encoded data is Base64
*/
protected function isBase64Encoded ($encodedData) {
// Determine it
* @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, $onlyKeys = array()) {
+ protected function getCacheKeyByCriteria (Criteria $criteriaInstance, array $onlyKeys = array()) {
// Generate it
$cacheKey = sprintf("%s@%s",
$this->__toString(),