Joomla Platform  13.1
Documentation des API du framework Joomla Platform
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
w3c.php
Aller à la documentation de ce fichier.
1 <?php
2 /**
3  * @package Joomla.Platform
4  * @subpackage Log
5  *
6  * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
7  * @license GNU General Public License version 2 or later; see LICENSE
8  */
9 
10 defined('JPATH_PLATFORM') or die;
11 
12 /**
13  * Joomla! W3c Logging class
14  *
15  * This class is designed to build log files based on the W3c specification
16  * at: http://www.w3.org/TR/WD-logfile.html
17  *
18  * @package Joomla.Platform
19  * @subpackage Log
20  * @since 11.1
21  */
23 {
24  /**
25  * @var string The format which each entry follows in the log file. All fields must be
26  * named in all caps and be within curly brackets eg. {FOOBAR}.
27  * @since 11.1
28  */
29  protected $format = '{DATE} {TIME} {PRIORITY} {CLIENTIP} {CATEGORY} {MESSAGE}';
30 
31  /**
32  * Constructor.
33  *
34  * @param array &$options Log object options.
35  *
36  * @since 11.1
37  */
38  public function __construct(array &$options)
39  {
40  // The name of the text file defaults to 'error.w3c.php' if not explicitly given.
41  if (empty($options['text_file']))
42  {
43  $options['text_file'] = 'error.w3c.php';
44  }
45 
46  // Call the parent constructor.
47  parent::__construct($options);
48  }
49 }