diff options
Diffstat (limited to 'framework/Web/UI')
| -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 | 
8 files changed, 41 insertions, 35 deletions
| 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)
 | 
