Pluf Framework

Pluf Framework Commit Details


Date:2009-02-19 08:28:04 (15 years 10 months ago)
Author:Loic d'Anterroches
Branch:develop, master
Commit:e9c9ebb29dfbd3174d5c80d49b6b06a1094742cf
Parents: 687725ab2a690b5a8393d8fce3391955d4228dd9
Message:Added a per request unique id.

With this unique id, defined as a global and as a member of the request object, you can easily log all the
actions relative to a given request together.
Changes:

File differences

src/Pluf.php
3131
3232
3333
34
35
34
3635
3736
3837
3938
4039
4140
41
4242
4343
4444
/**
* Start the Plume Framework.
*
* Load the configuration files. If not configuration file is given
* load the dirname(__FILE__).'/conf/pluf.config.php' config file.
* Load the configuration files.
*
* @param string Configuration file to use
*/
static function start($config)
{
$GLOBALS['_PX_starttime'] = microtime(true);
$GLOBALS['_PX_uniqid'] = uniqid($GLOBALS['_PX_starttime'], true);
Pluf::loadConfig($config);
date_default_timezone_set(Pluf::f('time_zone', 'Europe/Berlin'));
mb_internal_encoding(Pluf::f('encoding', 'UTF-8'));
src/Pluf/HTTP/Request.php
4040
4141
4242
43
4344
4445
4546
......
5657
5758
5859
60
5961
6062
public $remote_addr = '';
public $http_host = '';
public $SERVER = array();
public $uid = '';
function __construct($query)
{
$this->remote_addr = $_SERVER['REMOTE_ADDR'];
$this->http_host = (isset($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : '';
$this->SERVER =& $_SERVER;
$this->uid = $GLOBALS['_PX_uniqid'];
}
}

Archive Download the corresponding diff file

Branches

Tags

Number of commits:
Page rendered in 0.06350s using 13 queries.