summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/Collections/TAttributeCollection.php4
-rw-r--r--framework/Collections/TList.php73
-rw-r--r--framework/Collections/TMap.php76
-rw-r--r--framework/Collections/TPagedList.php2
-rw-r--r--framework/I18N/core/TCache_Lite.php7
-rw-r--r--framework/TComponent.php4
-rw-r--r--framework/Util/TCallChain.php4
-rw-r--r--framework/Web/THttpRequest.php2
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackClientSide.php10
-rw-r--r--framework/Web/UI/TClientScriptManager.php6
-rw-r--r--framework/Web/UI/WebControls/TDataGrid.php2
-rw-r--r--framework/Web/UI/WebControls/TDataGridPagerStyle.php4
-rw-r--r--framework/Web/UI/WebControls/TFont.php4
-rw-r--r--framework/Web/UI/WebControls/TListItem.php4
-rw-r--r--framework/Web/UI/WebControls/TPanelStyle.php4
-rw-r--r--framework/Web/UI/WebControls/TStyle.php12
-rw-r--r--framework/Xml/TXmlDocument.php2
-rw-r--r--framework/pradolite.php173
18 files changed, 137 insertions, 256 deletions
diff --git a/framework/Collections/TAttributeCollection.php b/framework/Collections/TAttributeCollection.php
index 00d82a41..eb3cb29e 100644
--- a/framework/Collections/TAttributeCollection.php
+++ b/framework/Collections/TAttributeCollection.php
@@ -50,9 +50,9 @@ class TAttributeCollection extends TMap
* Reimplement in derived classes to add new variables, but remember to also to call the parent
* implementation first.
*/
- protected function __getZappableSleepProps(&$exprops)
+ protected function _getZappableSleepProps(&$exprops)
{
- parent::__getZappableSleepProps($exprops);
+ parent::_getZappableSleepProps($exprops);
if ($this->_caseSensitive===false)
$exprops[] = "\0TAttributeCollection\0_caseSensitive";
}
diff --git a/framework/Collections/TList.php b/framework/Collections/TList.php
index 14fc1c03..6e9e16f9 100644
--- a/framework/Collections/TList.php
+++ b/framework/Collections/TList.php
@@ -406,78 +406,7 @@ class TList extends TComponent implements IteratorAggregate,ArrayAccess,Countabl
* @package System.Collections
* @since 3.0
*/
-class TListIterator implements Iterator
+class TListIterator extends ArrayIterator
{
- /**
- * @var array the data to be iterated through
- */
- private $_d;
- /**
- * @var integer index of the current item
- */
- private $_i;
- /**
- * @var integer count of the data items
- */
- private $_c;
-
- /**
- * Constructor.
- * @param array the data to be iterated through
- */
- public function __construct(&$data)
- {
- $this->_d=&$data;
- $this->_i=0;
- $this->_c=count($this->_d);
- }
-
- /**
- * Rewinds internal array pointer.
- * This method is required by the interface Iterator.
- */
- public function rewind()
- {
- $this->_i=0;
- }
-
- /**
- * Returns the key of the current array item.
- * This method is required by the interface Iterator.
- * @return integer the key of the current array item
- */
- public function key()
- {
- return $this->_i;
- }
-
- /**
- * Returns the current array item.
- * This method is required by the interface Iterator.
- * @return mixed the current array item
- */
- public function current()
- {
- return $this->_d[$this->_i];
- }
-
- /**
- * Moves the internal pointer to the next array item.
- * This method is required by the interface Iterator.
- */
- public function next()
- {
- $this->_i++;
- }
-
- /**
- * Returns whether there is an item at current position.
- * This method is required by the interface Iterator.
- * @return boolean
- */
- public function valid()
- {
- return $this->_i<$this->_c;
- }
}
diff --git a/framework/Collections/TMap.php b/framework/Collections/TMap.php
index 2a18b87d..017f70b8 100644
--- a/framework/Collections/TMap.php
+++ b/framework/Collections/TMap.php
@@ -47,9 +47,9 @@ class TMap extends TComponent implements IteratorAggregate,ArrayAccess,Countable
* Reimplement in derived classes to add new variables, but remember to also to call the parent
* implementation first.
*/
- protected function __getZappableSleepProps(&$exprops)
+ protected function _getZappableSleepProps(&$exprops)
{
- parent::__getZappableSleepProps($exprops);
+ parent::_getZappableSleepProps($exprops);
if ($this->_d===array())
$exprops[] = "\0TMap\0_d";
if ($this->_r===false)
@@ -290,76 +290,6 @@ class TMap extends TComponent implements IteratorAggregate,ArrayAccess,Countable
* @package System.Collections
* @since 3.0
*/
-class TMapIterator implements Iterator
+class TMapIterator extends ArrayIterator
{
- /**
- * @var array the data to be iterated through
- */
- private $_d;
- /**
- * @var array list of keys in the map
- */
- private $_keys;
- /**
- * @var mixed current key
- */
- private $_key;
-
- /**
- * Constructor.
- * @param array the data to be iterated through
- */
- public function __construct(&$data)
- {
- $this->_d=&$data;
- $this->_keys=array_keys($data);
- }
-
- /**
- * Rewinds internal array pointer.
- * This method is required by the interface Iterator.
- */
- public function rewind()
- {
- $this->_key=reset($this->_keys);
- }
-
- /**
- * Returns the key of the current array element.
- * This method is required by the interface Iterator.
- * @return mixed the key of the current array element
- */
- public function key()
- {
- return $this->_key;
- }
-
- /**
- * Returns the current array element.
- * This method is required by the interface Iterator.
- * @return mixed the current array element
- */
- public function current()
- {
- return $this->_d[$this->_key];
- }
-
- /**
- * Moves the internal pointer to the next array element.
- * This method is required by the interface Iterator.
- */
- public function next()
- {
- $this->_key=next($this->_keys);
- }
-
- /**
- * Returns whether there is an element at current position.
- * This method is required by the interface Iterator.
- * @return boolean
- */
- public function valid()
- {
- return $this->_key!==false;
- }
}
diff --git a/framework/Collections/TPagedList.php b/framework/Collections/TPagedList.php
index b7558002..a933b4e3 100644
--- a/framework/Collections/TPagedList.php
+++ b/framework/Collections/TPagedList.php
@@ -295,7 +295,7 @@ class TPagedList extends TList
else
{
$data=$this->toArray();
- return new TListIterator($data);
+ return new ArrayIterator($data);
}
}
diff --git a/framework/I18N/core/TCache_Lite.php b/framework/I18N/core/TCache_Lite.php
index 94061526..b42bf1f9 100644
--- a/framework/I18N/core/TCache_Lite.php
+++ b/framework/I18N/core/TCache_Lite.php
@@ -533,18 +533,11 @@ class TCache_Lite
// because the filesize can be cached by PHP itself...
clearstatcache();
$length = @filesize($this->_file);
- if(version_compare(PHP_VERSION, '5.3.0', 'lt'))
- {
- $mqr = get_magic_quotes_runtime();
- set_magic_quotes_runtime(0);
- }
if ($this->_readControl) {
$hashControl = @fread($fp, 32);
$length = $length - 32;
}
$data = @fread($fp, $length);
- if(isset($mqr))
- set_magic_quotes_runtime($mqr);
if ($this->_fileLocking) @flock($fp, LOCK_UN);
@fclose($fp);
if ($this->_readControl) {
diff --git a/framework/TComponent.php b/framework/TComponent.php
index fbf28a9d..127b68a3 100644
--- a/framework/TComponent.php
+++ b/framework/TComponent.php
@@ -1707,7 +1707,7 @@ class TComponent
$a = (array)$this;
$a = array_keys($a);
$exprops = array();
- $this->__getZappableSleepProps($exprops);
+ $this->_getZappableSleepProps($exprops);
return array_diff($a, $exprops);
}
@@ -1717,7 +1717,7 @@ class TComponent
* Reimplement in derived classes to add new variables, but remember to also to call the parent
* implementation first.
*/
- protected function __getZappableSleepProps(&$exprops)
+ protected function _getZappableSleepProps(&$exprops)
{
if($this->_listeningenabled===false)
$exprops[] = "\0TComponent\0_listeningenabled";
diff --git a/framework/Util/TCallChain.php b/framework/Util/TCallChain.php
index 4e9e23f7..49891641 100644
--- a/framework/Util/TCallChain.php
+++ b/framework/Util/TCallChain.php
@@ -19,7 +19,7 @@
class TCallChain extends TList implements IDynamicMethods
{
/**
- * @var {@link TListIterator} for moving through the chained method calls
+ * @var {@link ArrayIterator} for moving through the chained method calls
*/
private $_iterator=null;
@@ -97,7 +97,7 @@ class TCallChain extends TList implements IDynamicMethods
if(!$this->_iterator)
{
$chain_array=array_reverse($this->toArray());
- $this->_iterator=new TListIterator($chain_array);
+ $this->_iterator=new ArrayIterator($chain_array);
}
if($this->_iterator->valid())
do {
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php
index 2a5b812d..926cfa46 100644
--- a/framework/Web/THttpRequest.php
+++ b/framework/Web/THttpRequest.php
@@ -816,7 +816,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
*/
public function getIterator()
{
- return new TMapIterator($this->_items);
+ return new ArrayIterator($this->_items);
}
/**
diff --git a/framework/Web/UI/ActiveControls/TCallbackClientSide.php b/framework/Web/UI/ActiveControls/TCallbackClientSide.php
index 113b35ce..4cb482ad 100644
--- a/framework/Web/UI/ActiveControls/TCallbackClientSide.php
+++ b/framework/Web/UI/ActiveControls/TCallbackClientSide.php
@@ -240,8 +240,7 @@ class TCallbackClientSide extends TClientSideOptions
*/
public function getHasPriority()
{
- $option = $this->getOption('HasPriority');
- return ($option===null) ? true : $option;
+ return true;
}
/**
@@ -252,9 +251,8 @@ class TCallbackClientSide extends TClientSideOptions
*/
public function setHasPriority($value)
{
- $hasPriority = TPropertyValue::ensureBoolean($value);
- $this->setOption('HasPriority', $hasPriority);
- if(!$hasPriority)
+ // mimic the old behavior
+ if(!$value)
$this->setEnablePageStateUpdate(false);
}
@@ -268,8 +266,6 @@ class TCallbackClientSide extends TClientSideOptions
{
$enabled = TPropertyValue::ensureBoolean($value);
$this->setOption('EnablePageStateUpdate', $enabled);
- if($enabled)
- $this->setHasPriority(true);
}
/**
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php
index c2e73b63..d5335b37 100644
--- a/framework/Web/UI/TClientScriptManager.php
+++ b/framework/Web/UI/TClientScriptManager.php
@@ -480,9 +480,9 @@ class TClientScriptManager extends TApplicationComponent
public function getStyleSheetUrls()
{
$stylesheets = array_values(
- array_map(
- create_function('$e', 'return is_array($e) ? $e[0] : $e;'),
- $this->_styleSheetFiles)
+ array_map(function($e) {
+ return is_array($e) ? $e[0] : $e;
+ }, $this->_styleSheetFiles)
);
foreach(Prado::getApplication()->getAssetManager()->getPublished() as $path=>$url)
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php
index 9403fa45..2f338d22 100644
--- a/framework/Web/UI/WebControls/TDataGrid.php
+++ b/framework/Web/UI/WebControls/TDataGrid.php
@@ -1162,7 +1162,7 @@ class TDataGrid extends TBaseDataList implements INamingContainer
$param=new TDataGridItemEventParameter($item);
if($dataBind)
{
- $item->setDataItem($dataItem);
+ $item->setData($dataItem);
$this->onItemCreated($param);
$this->getControls()->add($item);
$item->dataBind();
diff --git a/framework/Web/UI/WebControls/TDataGridPagerStyle.php b/framework/Web/UI/WebControls/TDataGridPagerStyle.php
index c0e89edf..fc5b8480 100644
--- a/framework/Web/UI/WebControls/TDataGridPagerStyle.php
+++ b/framework/Web/UI/WebControls/TDataGridPagerStyle.php
@@ -38,9 +38,9 @@ class TDataGridPagerStyle extends TPanelStyle
* Reimplement in derived classes to add new variables, but remember to also to call the parent
* implementation first.
*/
- protected function __getZappableSleepProps(&$exprops)
+ protected function _getZappableSleepProps(&$exprops)
{
- parent::__getZappableSleepProps($exprops);
+ parent::_getZappableSleepProps($exprops);
if ($this->_mode===null)
$exprops[] = "\0TDataGridPagerStyle\0_mode";
if ($this->_nextText===null)
diff --git a/framework/Web/UI/WebControls/TFont.php b/framework/Web/UI/WebControls/TFont.php
index 7c1246d1..432532b3 100644
--- a/framework/Web/UI/WebControls/TFont.php
+++ b/framework/Web/UI/WebControls/TFont.php
@@ -59,9 +59,9 @@ class TFont extends TComponent
* Reimplement in derived classes to add new variables, but remember to also to call the parent
* implementation first.
*/
- protected function __getZappableSleepProps(&$exprops)
+ protected function _getZappableSleepProps(&$exprops)
{
- parent::__getZappableSleepProps($exprops);
+ parent::_getZappableSleepProps($exprops);
if ($this->_flags===0)
$exprops[] = "\0TFont\0_flags";
if ($this->_name==='')
diff --git a/framework/Web/UI/WebControls/TListItem.php b/framework/Web/UI/WebControls/TListItem.php
index fbfff80a..0118a917 100644
--- a/framework/Web/UI/WebControls/TListItem.php
+++ b/framework/Web/UI/WebControls/TListItem.php
@@ -67,9 +67,9 @@ class TListItem extends TComponent
* Reimplement in derived classes to add new variables, but remember to also to call the parent
* implementation first.
*/
- protected function __getZappableSleepProps(&$exprops)
+ protected function _getZappableSleepProps(&$exprops)
{
- parent::__getZappableSleepProps($exprops);
+ parent::_getZappableSleepProps($exprops);
if ($this->_attributes===null)
$exprops[] = "\0TListItem\0_attributes";
if($this->_text==='')
diff --git a/framework/Web/UI/WebControls/TPanelStyle.php b/framework/Web/UI/WebControls/TPanelStyle.php
index a7ec88c3..8bb1354b 100644
--- a/framework/Web/UI/WebControls/TPanelStyle.php
+++ b/framework/Web/UI/WebControls/TPanelStyle.php
@@ -51,9 +51,9 @@ class TPanelStyle extends TStyle
* Reimplement in derived classes to add new variables, but remember to also to call the parent
* implementation first.
*/
- protected function __getZappableSleepProps(&$exprops)
+ protected function _getZappableSleepProps(&$exprops)
{
- parent::__getZappableSleepProps($exprops);
+ parent::_getZappableSleepProps($exprops);
if ($this->_backImageUrl===null)
$exprops[] = "\0TPanelStyle\0_backImageUrl";
if ($this->_direction===null)
diff --git a/framework/Web/UI/WebControls/TStyle.php b/framework/Web/UI/WebControls/TStyle.php
index 3fec9b3d..f6d91e9b 100644
--- a/framework/Web/UI/WebControls/TStyle.php
+++ b/framework/Web/UI/WebControls/TStyle.php
@@ -52,9 +52,9 @@ class TStyle extends TComponent
* Reimplement in derived classes to add new variables, but remember to also to call the parent
* implementation first.
*/
- protected function __getZappableSleepProps(&$exprops)
+ protected function _getZappableSleepProps(&$exprops)
{
- parent::__getZappableSleepProps($exprops);
+ parent::_getZappableSleepProps($exprops);
if ($this->_fields===array())
$exprops[] = "\0TStyle\0_fields";
if($this->_font===null)
@@ -489,9 +489,9 @@ class TTableStyle extends TStyle
* Reimplement in derived classes to add new variables, but remember to also to call the parent
* implementation first.
*/
- protected function __getZappableSleepProps(&$exprops)
+ protected function _getZappableSleepProps(&$exprops)
{
- parent::__getZappableSleepProps($exprops);
+ parent::_getZappableSleepProps($exprops);
if ($this->_backImageUrl===null)
$exprops[] = "\0TTableStyle\0_backImageUrl";
if ($this->_horizontalAlign===null)
@@ -740,9 +740,9 @@ class TTableItemStyle extends TStyle
* Reimplement in derived classes to add new variables, but remember to also to call the parent
* implementation first.
*/
- protected function __getZappableSleepProps(&$exprops)
+ protected function _getZappableSleepProps(&$exprops)
{
- parent::__getZappableSleepProps($exprops);
+ parent::_getZappableSleepProps($exprops);
if ($this->_horizontalAlign===null)
$exprops[] = "\0TTableItemStyle\0_horizontalAlign";
if ($this->_verticalAlign===null)
diff --git a/framework/Xml/TXmlDocument.php b/framework/Xml/TXmlDocument.php
index 75122986..92d8961b 100644
--- a/framework/Xml/TXmlDocument.php
+++ b/framework/Xml/TXmlDocument.php
@@ -384,7 +384,7 @@ class TXmlDocument extends TXmlElement
return false;
$this->setEncoding($doc->encoding);
- $this->setVersion($doc->version);
+ $this->setVersion($doc->xmlVersion);
$element=$doc->documentElement;
$this->setTagName($element->tagName);
diff --git a/framework/pradolite.php b/framework/pradolite.php
index bdbf1137..4a6de98d 100644
--- a/framework/pradolite.php
+++ b/framework/pradolite.php
@@ -1,7 +1,7 @@
<?php
/**
* File Name: pradolite.php
- * Last Update: 2015/12/07 15:35:09
+ * Last Update: 2016/03/09 11:34:32
* Generated By: buildscripts/phpbuilder/build.php
*
* This file is used in lieu of prado.php to boost PRADO application performance.
@@ -30,6 +30,7 @@ class PradoBase
public static function initErrorHandlers()
{
set_error_handler(array('PradoBase','phpErrorHandler'));
+ register_shutdown_function(array('PradoBase','phpFatalErrorHandler'));
set_exception_handler(array('PradoBase','exceptionHandler'));
}
public static function autoload($className)
@@ -55,6 +56,16 @@ class PradoBase
if(error_reporting() & $errno)
throw new TPhpErrorException($errno,$errstr,$errfile,$errline);
}
+ public static function phpFatalErrorHandler()
+ {
+ $error = error_get_last();
+ if($error &&
+ TPhpErrorException::isFatalError($error) &&
+ error_reporting() & $error['type'])
+ {
+ self::exceptionHandler(new TPhpErrorException($error['type'],$error['message'],$error['file'],$error['line']));
+ }
+ }
public static function exceptionHandler($exception)
{
if(self::$_application!==null && ($errorHandler=self::$_application->getErrorHandler())!==null)
@@ -696,7 +707,12 @@ class TErrorHandler extends TModule
$trace=$exception->getTrace();
$result=null;
if($exception instanceof TPhpErrorException)
- $result=isset($trace[0]['file'])?$trace[0]:$trace[1];
+ {
+ if(isset($trace[0]['file']))
+ $result=$trace[0];
+ elseif(isset($trace[1]))
+ $result=$trace[1];
+ }
else if($exception instanceof TInvalidOperationException)
{
if(($result=$this->getPropertyAccessTrace($trace,'__get'))===null)
@@ -738,7 +754,7 @@ class TErrorHandler extends TModule
private function addLink($message)
{
$baseUrl='http://pradosoft.github.io/docs/manual/class-';
- return preg_replace('/\b(T[A-Z]\w+)\b/',"<a href=\"$baseUrl/\${1}\" target=\"_blank\">\${1}</a>",$message);
+ return preg_replace('/\b(T[A-Z]\w+)\b/',"<a href=\"$baseUrl\${1}\" target=\"_blank\">\${1}</a>",$message);
}
}
class TList extends TComponent implements IteratorAggregate,ArrayAccess,Countable
@@ -927,37 +943,8 @@ class TList extends TComponent implements IteratorAggregate,ArrayAccess,Countabl
$this->removeAt($offset);
}
}
-class TListIterator implements Iterator
+class TListIterator extends ArrayIterator
{
- private $_d;
- private $_i;
- private $_c;
- public function __construct(&$data)
- {
- $this->_d=&$data;
- $this->_i=0;
- $this->_c=count($this->_d);
- }
- public function rewind()
- {
- $this->_i=0;
- }
- public function key()
- {
- return $this->_i;
- }
- public function current()
- {
- return $this->_d[$this->_i];
- }
- public function next()
- {
- $this->_i++;
- }
- public function valid()
- {
- return $this->_i<$this->_c;
- }
}
abstract class TCache extends TModule implements ICache, ArrayAccess
{
@@ -1604,6 +1591,14 @@ class TMap extends TComponent implements IteratorAggregate,ArrayAccess,Countable
{
private $_d=array();
private $_r=false;
+ protected function _getZappableSleepProps(&$exprops)
+ {
+ parent::_getZappableSleepProps($exprops);
+ if ($this->_d===array())
+ $exprops[] = "\0TMap\0_d";
+ if ($this->_r===false)
+ $exprops[] = "\0TMap\0_r";
+ }
public function __construct($data=null,$readOnly=false)
{
if($data!==null)
@@ -1713,36 +1708,8 @@ class TMap extends TComponent implements IteratorAggregate,ArrayAccess,Countable
$this->remove($offset);
}
}
-class TMapIterator implements Iterator
+class TMapIterator extends ArrayIterator
{
- private $_d;
- private $_keys;
- private $_key;
- public function __construct(&$data)
- {
- $this->_d=&$data;
- $this->_keys=array_keys($data);
- }
- public function rewind()
- {
- $this->_key=reset($this->_keys);
- }
- public function key()
- {
- return $this->_key;
- }
- public function current()
- {
- return $this->_d[$this->_key];
- }
- public function next()
- {
- $this->_key=next($this->_keys);
- }
- public function valid()
- {
- return $this->_key!==false;
- }
}
class TPriorityMap extends TMap
{
@@ -2321,7 +2288,7 @@ class TXmlDocument extends TXmlElement
if($doc->loadXML($string)===false)
return false;
$this->setEncoding($doc->encoding);
- $this->setVersion($doc->version);
+ $this->setVersion($doc->xmlVersion);
$element=$doc->documentElement;
$this->setTagName($element->tagName);
$this->setValue($element->nodeValue);
@@ -3424,7 +3391,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
}
public function getIterator()
{
- return new TMapIterator($this->_items);
+ return new ArrayIterator($this->_items);
}
public function getCount()
{
@@ -4410,6 +4377,12 @@ Prado::using('System.Web.UI.WebControls.*');
class TAttributeCollection extends TMap
{
private $_caseSensitive=false;
+ protected function _getZappableSleepProps(&$exprops)
+ {
+ parent::_getZappableSleepProps($exprops);
+ if ($this->_caseSensitive===false)
+ $exprops[] = "\0TAttributeCollection\0_caseSensitive";
+ }
public function __get($name)
{
return $this->contains($name)?$this->itemAt($name):parent::__get($name);
@@ -4845,13 +4818,19 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
{
if($this->_trackViewState)
{
- $this->_viewState[$key]=$value;
unset($this->_tempState[$key]);
+ if($value===$defaultValue)
+ unset($this->_viewState[$key]);
+ else
+ $this->_viewState[$key]=$value;
}
else
{
unset($this->_viewState[$key]);
- $this->_tempState[$key]=$value;
+ if($value===$defaultValue)
+ unset($this->_tempState[$key]);
+ else
+ $this->_tempState[$key]=$value;
}
}
public function clearViewState($key)
@@ -5369,7 +5348,10 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
foreach($this->_rf[self::RF_CONTROLS] as $control)
{
if($control instanceof TControl)
- $state[$control->_id]=&$control->saveStateRecursive($needViewState);
+ {
+ if(count($tmp = &$control->saveStateRecursive($needViewState)))
+ $state[$control->_id]=$tmp;
+ }
}
}
if($needViewState && !empty($this->_viewState))
@@ -5658,6 +5640,16 @@ class TFont extends TComponent
private $_flags=0;
private $_name='';
private $_size='';
+ protected function _getZappableSleepProps(&$exprops)
+ {
+ parent::_getZappableSleepProps($exprops);
+ if ($this->_flags===0)
+ $exprops[] = "\0TFont\0_flags";
+ if ($this->_name==='')
+ $exprops[] = "\0TFont\0_name";
+ if ($this->_size==='')
+ $exprops[] = "\0TFont\0_size";
+ }
public function getBold()
{
return ($this->_flags & self::IS_BOLD)!==0;
@@ -5840,6 +5832,20 @@ class TStyle extends TComponent
private $_class=null;
private $_customStyle=null;
private $_displayStyle='Fixed';
+ protected function _getZappableSleepProps(&$exprops)
+ {
+ parent::_getZappableSleepProps($exprops);
+ if ($this->_fields===array())
+ $exprops[] = "\0TStyle\0_fields";
+ if($this->_font===null)
+ $exprops[] = "\0TStyle\0_font";
+ if($this->_class===null)
+ $exprops[] = "\0TStyle\0_class";
+ if ($this->_customStyle===null)
+ $exprops[] = "\0TStyle\0_customStyle";
+ if ($this->_displayStyle==='Fixed')
+ $exprops[] = "\0TStyle\0_displayStyle";
+ }
public function __construct($style=null)
{
if($style!==null)
@@ -6062,6 +6068,22 @@ class TTableStyle extends TStyle
private $_cellSpacing=null;
private $_gridLines=null;
private $_borderCollapse=null;
+ protected function _getZappableSleepProps(&$exprops)
+ {
+ parent::_getZappableSleepProps($exprops);
+ if ($this->_backImageUrl===null)
+ $exprops[] = "\0TTableStyle\0_backImageUrl";
+ if ($this->_horizontalAlign===null)
+ $exprops[] = "\0TTableStyle\0_horizontalAlign";
+ if ($this->_cellPadding===null)
+ $exprops[] = "\0TTableStyle\0_cellPadding";
+ if ($this->_cellSpacing===null)
+ $exprops[] = "\0TTableStyle\0_cellSpacing";
+ if ($this->_gridLines===null)
+ $exprops[] = "\0TTableStyle\0_gridLines";
+ if ($this->_borderCollapse===null)
+ $exprops[] = "\0TTableStyle\0_borderCollapse";
+ }
public function reset()
{
$this->_backImageUrl=null;
@@ -6185,6 +6207,16 @@ class TTableItemStyle extends TStyle
private $_horizontalAlign=null;
private $_verticalAlign=null;
private $_wrap=null;
+ protected function _getZappableSleepProps(&$exprops)
+ {
+ parent::_getZappableSleepProps($exprops);
+ if ($this->_horizontalAlign===null)
+ $exprops[] = "\0TTableItemStyle\0_horizontalAlign";
+ if ($this->_verticalAlign===null)
+ $exprops[] = "\0TTableItemStyle\0_verticalAlign";
+ if ($this->_wrap===null)
+ $exprops[] = "\0TTableItemStyle\0_wrap";
+ }
public function reset()
{
parent::reset();
@@ -7172,9 +7204,9 @@ class TClientScriptManager extends TApplicationComponent
public function getStyleSheetUrls()
{
$stylesheets = array_values(
- array_map(
- create_function('$e', 'return is_array($e) ? $e[0] : $e;'),
- $this->_styleSheetFiles)
+ array_map(function($e) {
+ return is_array($e) ? $e[0] : $e;
+ }, $this->_styleSheetFiles)
);
foreach(Prado::getApplication()->getAssetManager()->getPublished() as $path=>$url)
if (substr($url,strlen($url)-4)=='.css')
@@ -7535,6 +7567,7 @@ class TPage extends TTemplateControl
protected function processCallbackRequest($writer)
{
Prado::using('System.Web.UI.ActiveControls.TActivePageAdapter');
+ Prado::using('System.Web.UI.JuiControls.TJuiControlOptions');
$this->setAdapter(new TActivePageAdapter($this));
$callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER);
if(strlen($callbackEventParameter) > 0)