Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_FailoverTransport
  • Swift_LoadBalancedTransport
  • Swift_MailTransport
  • Swift_Plugins_Loggers_ArrayLogger
  • Swift_Plugins_Loggers_EchoLogger
  • Swift_SendmailTransport
  • Swift_SmtpTransport
  • Swift_Transport_AbstractSmtpTransport
  • Swift_Transport_Esmtp_Auth_CramMd5Authenticator
  • Swift_Transport_Esmtp_Auth_LoginAuthenticator
  • Swift_Transport_Esmtp_Auth_PlainAuthenticator
  • Swift_Transport_Esmtp_AuthHandler
  • Swift_Transport_EsmtpTransport
  • Swift_Transport_FailoverTransport
  • Swift_Transport_LoadBalancedTransport
  • Swift_Transport_MailTransport
  • Swift_Transport_SendmailTransport
  • Swift_Transport_SimpleMailInvoker
  • Swift_Transport_StreamBuffer

Interfaces

  • Swift_Plugins_Logger
  • Swift_Plugins_Pop_Pop3Exception
  • Swift_Transport
  • Swift_Transport_Esmtp_Authenticator
  • Swift_Transport_EsmtpHandler
  • Swift_Transport_IoBuffer
  • Swift_Transport_MailInvoker
  • Swift_Transport_SmtpAgent
  • Swift_TransportException
  • Overview
  • Package
  • Function
  • Todo
  • Download
 1: <?php
 2: /**
 3:  * This file contains the file and vis adv debug class.
 4:  *
 5:  * @package Core
 6:  * @subpackage Debug
 7:  * @version SVN Revision $Rev:$
 8:  *
 9:  * @author Rudi Bieller
10:  * @copyright four for business AG <www.4fb.de>
11:  * @license http://www.contenido.org/license/LIZENZ.txt
12:  * @link http://www.4fb.de
13:  * @link http://www.contenido.org
14:  */
15: 
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17: 
18: /**
19:  * Debug object to write info to a file and to show info on screen.
20:  * In case you cannot output directly to screen when debugging a live system,
21:  * this object writes
22:  * the info to a file located in /data/logs/debug.log.
23:  *
24:  * @package Core
25:  * @subpackage Debug
26:  */
27: class cDebugFileAndVisAdv extends cDebugVisibleAdv {
28: 
29:     /**
30:      * Singleton instance
31:      *
32:      * @var cDebugFileAndVisAdv
33:      * @todo should be private
34:      */
35:     protected static $_instance;
36: 
37:     /**
38:      *
39:      * @var array
40:      */
41:     private $_aItems;
42: 
43:     /**
44:      *
45:      * @var string
46:      */
47:     private $_filePathName;
48: 
49:     /**
50:      * Return singleton instance.
51:      *
52:      * @return cDebugFileAndVisAdv
53:      */
54:     public static function getInstance() {
55:         if (self::$_instance == NULL) {
56:             self::$_instance = new cDebugFileAndVisAdv();
57:         }
58:         return self::$_instance;
59:     }
60: 
61:     /**
62:      * Constructor
63:      */
64:     private function __construct() {
65:         global $cfg;
66:         $this->_aItems = array();
67:         $this->_filePathName = $cfg['path']['contenido_logs'] . 'debug.log';
68:     }
69: 
70:     /**
71:      * (non-PHPdoc)
72:      *
73:      * @see cDebugVisibleAdv::out()
74:      */
75:     public function out($msg) {
76:         parent::out($msg);
77: 
78:         $sDate = date('Y-m-d H:i:s');
79:         cFileHandler::write($this->_filePathName, $sDate . ": " . $msg . "\n", true);
80:     }
81: 
82:     /**
83:      * (non-PHPdoc)
84:      *
85:      * @see cDebugVisibleAdv::show()
86:      */
87:     public function show($mVariable, $sVariableDescription = '', $bExit = false) {
88:         parent::show($mVariable, $sVariableDescription, $bExit);
89: 
90:         if (is_writeable($this->_filePathName)) {
91:             $sDate = date('Y-m-d H:i:s');
92:             $sContent = '#################### ' . $sDate . ' ####################' . "\n" . $sVariableDescription . "\n" . print_r($mVariable, true) . "\n" . '#################### /' . $sDate . ' ###################' . "\n\n";
93:             cFileHandler::write($this->_filePathName, $sContent, true);
94:         }
95:     }
96: }
97: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen