diff options
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/Services/TPageService.php | 8 | ||||
-rw-r--r-- | framework/Web/THttpRequest.php | 2 | ||||
-rw-r--r-- | framework/Web/THttpResponse.php | 12 | ||||
-rw-r--r-- | framework/Web/UI/TAssetManager.php | 7 | ||||
-rw-r--r-- | framework/Web/UI/TControl.php | 6 | ||||
-rw-r--r-- | framework/Web/UI/TForm.php | 1 | ||||
-rw-r--r-- | framework/Web/UI/TPage.php | 48 | ||||
-rw-r--r-- | framework/Web/UI/TPageStatePersister.php | 4 | ||||
-rw-r--r-- | framework/Web/UI/TTemplateControl.php | 4 | ||||
-rw-r--r-- | framework/Web/UI/TTemplateManager.php | 4 | ||||
-rw-r--r-- | framework/Web/UI/TThemeManager.php | 2 |
11 files changed, 52 insertions, 46 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index 8f12c650..65549159 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -146,7 +146,7 @@ class TPageService extends TService */
public function init($config)
{
- Prado::coreLog("Initializing TPageService");
+ Prado::trace("Initializing TPageService",'System.Web.Services.TPageService');
$application=$this->getApplication();
$application->setPageService($this);
@@ -251,7 +251,7 @@ class TPageService extends TService // load modules specified in page directory config
foreach($pageConfig->getModules() as $id=>$moduleConfig)
{
- Prado::coreLog("Loading module $id");
+ Prado::trace("Loading module $id ({$moduleConfig[0]})",'System.Web.Services.TPageService');
$module=Prado::createComponent($moduleConfig[0]);
$application->setModule($id,$module);
foreach($moduleConfig[1] as $name=>$value)
@@ -427,7 +427,7 @@ class TPageService extends TService */
public function run()
{
- Prado::coreLog("Running page service");
+ Prado::trace("Running page service",'System.Web.Services.TPageService');
$page=null;
$path=$this->_basePath.'/'.strtr($this->_pagePath,'.','/');
if(is_file($path.self::PAGE_FILE_EXT))
@@ -614,7 +614,7 @@ class TPageConfiguration extends TComponent */
private function loadFromFile($fname,$page)
{
- Prado::coreLog("Loading $page with file $fname");
+ Prado::trace("Loading $page with file $fname",'System.Web.Services.TPageService');
if(empty($fname) || !is_file($fname))
return;
$dom=new TXmlDocument;
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php index bb2eb7b4..9e8b7a04 100644 --- a/framework/Web/THttpRequest.php +++ b/framework/Web/THttpRequest.php @@ -363,6 +363,7 @@ class THttpRequest extends TModule */
protected function resolveRequest()
{
+ Prado::trace("Resolving request from ".$_SERVER['REMOTE_ADDR'],'System.Web.THttpRequest');
$this->_requestResolved=true;
foreach($this->_services as $id)
{
@@ -373,7 +374,6 @@ class THttpRequest extends TModule break;
}
}
- Prado::coreLog("Resolving request {$this->_serviceID}={$this->_serviceParam}");
}
/**
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php index cf44d19d..ea41ab16 100644 --- a/framework/Web/THttpResponse.php +++ b/framework/Web/THttpResponse.php @@ -32,9 +32,9 @@ * where {@link getCacheExpire CacheExpire}, {@link getCacheControl CacheControl}
* and {@link getBufferOutput BufferOutput} are configurable properties of THttpResponse.
*
- * When sending headers the Charset set in {@link TGlobalization::getCharset()}
+ * When sending headers the Charset set in {@link TGlobalization::getCharset()}
* is use when Charset is null or empty in THttpResponse.
- *
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
* @package System.Web
@@ -145,7 +145,7 @@ class THttpResponse extends TModule implements ITextWriter {
return $this->_contentType;
}
-
+
/**
* @return string output charset.
*/
@@ -278,7 +278,7 @@ class THttpResponse extends TModule implements ITextWriter $this->appendHeader($header);
if($this->_bufferOutput)
ob_flush();
- Prado::coreLog("Flushing output $header");
+ Prado::trace("Flushing output $header",'System.Web.THttpResponse');
}
/**
@@ -286,7 +286,7 @@ class THttpResponse extends TModule implements ITextWriter */
protected function getContentTypeHeader()
{
- $app = $this->getApplication()->getGlobalization();
+ $app = $this->getApplication()->getGlobalization();
$charset = $this->getCharset();
if(empty($charset))
$charset = !is_null($app) ? $app->getCharset() : 'UTF-8';
@@ -301,7 +301,7 @@ class THttpResponse extends TModule implements ITextWriter {
if($this->_bufferOutput)
ob_clean();
- Prado::coreLog("Clearing output");
+ Prado::trace("Clearing output",'System.Web.THttpResponse');
}
/**
diff --git a/framework/Web/UI/TAssetManager.php b/framework/Web/UI/TAssetManager.php index 1ff0f47a..94b1bc55 100644 --- a/framework/Web/UI/TAssetManager.php +++ b/framework/Web/UI/TAssetManager.php @@ -141,7 +141,6 @@ class TAssetManager extends TModule */
public function publishFilePath($path,$checkTimestamp=false)
{
- Prado::coreLog("Publishing file $path");
if(isset($this->_published[$path]))
return $this->_published[$path];
else if(($fullpath=realpath($path))===false)
@@ -155,7 +154,10 @@ class TAssetManager extends TModule if(!is_dir($this->_basePath.'/'.$dir))
@mkdir($this->_basePath.'/'.$dir);
if(!is_file($file) || @filemtime($file)<@filemtime($fullpath))
+ {
+ Prado::trace("Publishing file $fullpath",'System.Web.UI.TAssetManager');
@copy($fullpath,$file);
+ }
}
$this->_published[$path]=$this->_baseUrl.'/'.$dir.'/'.basename($fullpath);
return $this->_published[$path];
@@ -164,7 +166,10 @@ class TAssetManager extends TModule {
$dir=$this->hash($fullpath);
if(!is_dir($this->_basePath.'/'.$dir) || $checkTimestamp || $this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE)
+ {
+ Prado::trace("Publishing directory $fullpath",'System.Web.UI.TAssetManager');
$this->copyDirectory($fullpath,$this->_basePath.'/'.$dir);
+ }
$this->_published[$path]=$this->_baseUrl.'/'.$dir;
return $this->_published[$path];
}
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 3ba79478..225b6b32 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -683,11 +683,11 @@ class TControl extends TComponent */
public function dataBind()
{
- Prado::coreLog("Data bind properties");
+ Prado::trace("Data bind properties",'System.Web.UI.TControl');
$this->dataBindProperties();
- Prado::coreLog("onDataBinding()");
+ Prado::trace("onDataBinding()",'System.Web.UI.TControl');
$this->onDataBinding(null);
- Prado::coreLog("dataBindChildren()");
+ Prado::trace("dataBindChildren()",'System.Web.UI.TControl');
$this->dataBindChildren();
}
diff --git a/framework/Web/UI/TForm.php b/framework/Web/UI/TForm.php index 28c6c3aa..4cb97911 100644 --- a/framework/Web/UI/TForm.php +++ b/framework/Web/UI/TForm.php @@ -53,7 +53,6 @@ class TForm extends TControl */
protected function render($writer)
{
- Prado::coreLog("Rendering form ".$this->getName());
$this->addAttributesToRender($writer);
$writer->renderBeginTag('form');
$page=$this->getPage();
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 2269079b..9808e143 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -117,9 +117,11 @@ class TPage extends TTemplateControl */
public function __construct($initProperties=null)
{
+ Prado::trace('Constructing page','System.Web.UI.TPage');
$this->setPage($this);
if(is_array($initProperties))
{
+ Prado::trace('Initializing page properties specified in configurations','System.Web.UI.TPage');
foreach($initProperties as $name=>$value)
$this->setSubProperty($name,$value);
}
@@ -133,59 +135,59 @@ class TPage extends TTemplateControl */
public function run($writer)
{
- Prado::coreLog("Running page life cycles");
+ Prado::trace("Running page life cycles",'System.Web.UI.TPage');
$this->determinePostBackMode();
-
- Prado::coreLog("Page onPreInit()");
+
+ Prado::trace("Page onPreInit()",'System.Web.UI.TPage');
$this->onPreInit(null);
- Prado::coreLog("Page initRecursive()");
+ Prado::trace("Page initRecursive()",'System.Web.UI.TPage');
$this->initRecursive();
- Prado::coreLog("Page onInitComplete()");
+ Prado::trace("Page onInitComplete()",'System.Web.UI.TPage');
$this->onInitComplete(null);
if($this->getIsPostBack())
{
$this->_restPostData=new TMap;
- Prado::coreLog("Page loadPageState()");
+ Prado::trace("Page loadPageState()",'System.Web.UI.TPage');
$this->loadPageState();
- Prado::coreLog("Page processPostData()");
+ Prado::trace("Page processPostData()",'System.Web.UI.TPage');
$this->processPostData($this->_postData,true);
- Prado::coreLog("Page onPreLoad()");
+ Prado::trace("Page onPreLoad()",'System.Web.UI.TPage');
$this->onPreLoad(null);
- Prado::coreLog("Page loadRecursive()");
+ Prado::trace("Page loadRecursive()",'System.Web.UI.TPage');
$this->loadRecursive();
- Prado::coreLog("Page processPostData()");
+ Prado::trace("Page processPostData()",'System.Web.UI.TPage');
$this->processPostData($this->_restPostData,false);
- Prado::coreLog("Page raiseChangedEvents()");
+ Prado::trace("Page raiseChangedEvents()",'System.Web.UI.TPage');
$this->raiseChangedEvents();
- Prado::coreLog("Page raisePostBackEvent()");
+ Prado::trace("Page raisePostBackEvent()",'System.Web.UI.TPage');
$this->raisePostBackEvent();
- Prado::coreLog("Page onLoadComplete()");
+ Prado::trace("Page onLoadComplete()",'System.Web.UI.TPage');
$this->onLoadComplete(null);
}
else
{
- Prado::coreLog("Page onPreLoad()");
+ Prado::trace("Page onPreLoad()",'System.Web.UI.TPage');
$this->onPreLoad(null);
- Prado::coreLog("Page loadRecursive()");
+ Prado::trace("Page loadRecursive()",'System.Web.UI.TPage');
$this->loadRecursive();
- Prado::coreLog("Page onLoadComplete()");
+ Prado::trace("Page onLoadComplete()",'System.Web.UI.TPage');
$this->onLoadComplete(null);
}
- Prado::coreLog("Page preRenderRecursive()");
+ Prado::trace("Page preRenderRecursive()",'System.Web.UI.TPage');
$this->preRenderRecursive();
- Prado::coreLog("Page onPreRenderComplete()");
+ Prado::trace("Page onPreRenderComplete()",'System.Web.UI.TPage');
$this->onPreRenderComplete(null);
- Prado::coreLog("Page savePageState()");
+ Prado::trace("Page savePageState()",'System.Web.UI.TPage');
$this->savePageState();
- Prado::coreLog("Page onSaveStateComplete()");
+ Prado::trace("Page onSaveStateComplete()",'System.Web.UI.TPage');
$this->onSaveStateComplete(null);
- Prado::coreLog("Page renderControl()");
+ Prado::trace("Page renderControl()",'System.Web.UI.TPage');
$this->renderControl($writer);
- Prado::coreLog("Page unloadRecursive()");
+ Prado::trace("Page unloadRecursive()",'System.Web.UI.TPage');
$this->unloadRecursive();
}
@@ -284,7 +286,7 @@ class TPage extends TTemplateControl $this->_validated=true;
if($this->_validators && $this->_validators->getCount())
{
- Prado::coreLog("Page validate");
+ Prado::trace("Page validate",'System.Web.UI.TPage');
if($validationGroup==='')
{
foreach($this->_validators as $validator)
diff --git a/framework/Web/UI/TPageStatePersister.php b/framework/Web/UI/TPageStatePersister.php index 2711041a..bc65f74a 100644 --- a/framework/Web/UI/TPageStatePersister.php +++ b/framework/Web/UI/TPageStatePersister.php @@ -52,7 +52,7 @@ class TPageStatePersister extends TModule implements IStatePersister */
public function save($state)
{
- Prado::coreLog("Saving state");
+ Prado::trace("Saving state",'System.Web.UI.TPageStatePersister');
$data=Prado::serialize($state);
$hmac=$this->computeHMAC($data,$this->getPrivateKey());
if(extension_loaded('zlib'))
@@ -69,7 +69,7 @@ class TPageStatePersister extends TModule implements IStatePersister */
public function load()
{
- Prado::coreLog("Loading state");
+ Prado::trace("Loading state",'System.Web.UI.TPageStatePersister');
$str=base64_decode($this->getApplication()->getRequest()->getItems()->itemAt(TPage::FIELD_PAGESTATE));
if($str==='')
return null;
diff --git a/framework/Web/UI/TTemplateControl.php b/framework/Web/UI/TTemplateControl.php index a25a2e41..93951718 100644 --- a/framework/Web/UI/TTemplateControl.php +++ b/framework/Web/UI/TTemplateControl.php @@ -101,9 +101,9 @@ class TTemplateControl extends TControl implements INamingContainer */
protected function loadTemplate()
{
- Prado::coreLog("Loading template ".get_class($this));
+ Prado::trace("Loading template ".get_class($this),'System.Web.UI.TTemplateControl');
$template=$this->getService()->getTemplateManager()->getTemplateByClassName(get_class($this));
- self::$_template[get_class($this)]=$template;
+ self::$_template[get_class($this)]=$template;
return $template;
}
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index df708e50..d03a15d6 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -60,7 +60,7 @@ class TTemplateManager extends TModule public function getTemplateByClassName($className)
{
$class=new ReflectionClass($className);
- $tplFile=dirname($class->getFileName()).'/'.$className.self::TEMPLATE_FILE_EXT;
+ $tplFile=dirname($class->getFileName()).'/'.$className.self::TEMPLATE_FILE_EXT;
return $this->getTemplateByFileName($tplFile);
}
@@ -72,7 +72,7 @@ class TTemplateManager extends TModule {
if(!is_null($fileName=$this->getLocalizedTemplate($fileName)))
{
- Prado::coreLog("Loading template $fileName");
+ Prado::trace("Loading template $fileName",'System.Web.UI.TTemplateManager');
if(($cache=$this->getApplication()->getCache())===null)
return new TTemplate(file_get_contents($fileName),dirname($fileName),$fileName);
else
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php index 73745254..0c61321d 100644 --- a/framework/Web/UI/TThemeManager.php +++ b/framework/Web/UI/TThemeManager.php @@ -313,7 +313,7 @@ class TTheme extends TComponent {
foreach($this->_skins[$type][$id] as $name=>$value)
{
- Prado::coreLog("Applying skin $name to $type");
+ Prado::trace("Applying skin $name to $type",'System.Web.UI.TThemeManager');
if(is_array($value))
{
if($value[0]===TTemplate::CONFIG_EXPRESSION)
|