You are here

protected function Logger::logCall in Module Object Oriented Programming API 7.2

Same name and namespace in other branches
  1. 6.2 component/decorator/moopapi.logger.inc \Logger::logCall()
  2. 6.2 component/decorator/logger/moopapi.logger.inc \Logger::logCall()
  3. 6 component/decorator/moopapi.logger.inc \Logger::logCall()
  4. 6 component/decorator/logger/moopapi.logger.inc \Logger::logCall()
  5. 7 component/decorator/logger/moopapi.logger.inc \Logger::logCall()

File

component/decorator/logger/moopapi.logger.inc, line 52

Class

Logger
Logger.

Code

protected function logCall($method, $arguments) {
  $app = $this->original;
  $class = get_class($app);
  $this
    ->log("!class::!method(!args) <=", array(
    '!class' => $class,
    '!method' => $method,
    '!args' => print_r($arguments, TRUE),
  ));
  $return = call_user_func_array(array(
    $app,
    $method,
  ), $arguments);
  $this
    ->log("!class::!method(!args) return !return", array(
    '!class' => $class,
    '!method' => $method,
    '!args' => print_r($arguments, TRUE),
    '!return' => print_r($return, TRUE),
  ));
  return $return;
}