MediaSearch_Log
[ class tree: MediaSearch_Log ] [ index: MediaSearch_Log ] [ all elements ]

Source for file Cli.php

Documentation is available at Cli.php

  1. <?php
  2. /**
  3.  * MediaSearch
  4.  *
  5.  * LICENSE
  6.  *
  7.  * "THE BEER-WARE LICENSE" (Revision 42):
  8.  * "Sven Strittmatter" <ausserirdisch@sven-space.de> wrote this file.
  9.  * As long as you retain this notice you can do whatever you want with
  10.  * this stuff. If we meet some day, and you think this stuff is worth it,
  11.  * you can buy me a beer in return.
  12.  *
  13.  * $Author$
  14.  * $Revision$
  15.  *
  16.  * @category    MediaSearch
  17.  * @package     MediaSearch_Log
  18.  * @copyright   Copyright (c) 2009 Sven Strittmatter
  19.  */
  20.  
  21. /**
  22.  * @see MediaSearch_Log_Abstract
  23.  */
  24. require_once('MediaSearch/Log/Abstract.php');
  25.  
  26. /**
  27.   * @todo Write apidoc.
  28.   *
  29.   * @category   MediaSearch
  30.   * @package    MediaSearch_Log
  31.   * @copyright  Copyright (c) 2009 Sven Strittmatter
  32.   */
  33.     const TRACE_LELVEL = 47;
  34.     
  35.     public function __construct($logLevel Log::DISABLED{
  36.         $this->setLevel($logLevel);
  37.     }
  38.  
  39.     protected function log($messagearray $variables null{
  40.         if (null !== $variables{
  41.             $message .= " Variables:\n";
  42.  
  43.             foreach ($variables as $variable{
  44.                 $message .= print_r($variabletrue"\n";
  45.             }
  46.         }
  47.  
  48.         echo $message "\n";
  49.     }
  50. }

Documentation generated on Mon, 17 Aug 2009 14:51:49 +0200 by phpDocumentor 1.4.2