Esempio n. 1
0
/**
 *
 * Smarty Modifier to debug output the variable content to the firebug console.
 *
 * @example
 * {$variable|firebug}
 *
 * @param mixed Variable to firedebug
 *
 * @return string
 */
function smarty_modifier_firebug($var)
{
    Koch_Debug::firebug($var);
    // using firebug directly
    /*if (false === class_exists('FirePHP', false)) {
          include ROOT_LIBRARIES.'firephp/FirePHP.class.php';
      }
      $firephp = FirePHP::getInstance(true);
      $firephp->log($var); */
}
Esempio n. 2
0
 /**
  * The Magic Call __callStatic() is triggered when invoking inaccessible methods in a static context.
  * Method overloading.
  * Available from PHP 5.3 onwards.
  *
  * @param $name string The $name argument is the name of the method being called.
  * @param $arguments arra The $arguments argument is an enumerated array containing the parameters passed to the $name'ed method.
  */
 public static function __callStatic($method, $arguments)
 {
     // Because value of $name is case sensitive, its forced to be lowercase.
     $method = mb_strtolower($method);
     // Debug message for Method Overloading
     // Making it easier to see which static method is called magically
     Koch_Debug::fbg('DEBUG (Overloading): Calling static method "' . $method . '" ' . implode(', ', $arguments) . "\n");
     // construct the filename of the command
     $filename = __DIR__ . '/Pool/' . $method . '.php';
     // check if name is valid
     if (is_file($filename) === true and is_readable($filename) === true) {
         // dynamically include the command
         include_once $filename;
         return call_user_func_array($method, $arguments);
     } else {
         trigger_error('Koch Framework Function not found: "' . $filename . '".');
     }
 }
Esempio n. 3
0
 /**
  * Development / Helper Method for displaying loaded Models
  */
 public static function debugLoadedClasses()
 {
     $em = self::getEntityManager();
     $config = $em->getConfiguration();
     #$config->addEntityNamespace('Core', $module_models_path); // = Core:Session
     #$config->addEntityNamespace('Module', $module_models_path); // = Module:News
     $classes_loaded = $config->getMetadataDriverImpl()->getAllClassNames();
     Koch_Debug::printR($classes_loaded);
 }