summaryrefslogtreecommitdiff
path: root/framework/Util
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Util')
-rw-r--r--framework/Util/TBehavior.php1
-rw-r--r--framework/Util/TCallChain.php35
-rw-r--r--framework/Util/TClassBehavior.php3
-rw-r--r--framework/Util/TDataFieldAccessor.php6
-rw-r--r--framework/Util/TDateTimeStamp.php8
-rw-r--r--framework/Util/TLogRouter.php23
-rw-r--r--framework/Util/TLogger.php12
-rw-r--r--framework/Util/TParameterModule.php4
-rw-r--r--framework/Util/TRpcClient.php9
-rw-r--r--framework/Util/TSimpleDateFormatter.php8
-rw-r--r--framework/Util/TVarDumper.php4
11 files changed, 44 insertions, 69 deletions
diff --git a/framework/Util/TBehavior.php b/framework/Util/TBehavior.php
index 951a758f..56a81a87 100644
--- a/framework/Util/TBehavior.php
+++ b/framework/Util/TBehavior.php
@@ -11,7 +11,6 @@
/**
* TBehavior is a convenient base class for behavior classes.
* @author Qiang Xue <qiang.xue@gmail.com>
- * @version $Id: TBehaviour.php 3211 2012-10-31 02:35:01Z javalizard@gmail.com $
* @package System.Util
* @since 3.2.3
*/
diff --git a/framework/Util/TCallChain.php b/framework/Util/TCallChain.php
index 9d6144b3..a6d99a61 100644
--- a/framework/Util/TCallChain.php
+++ b/framework/Util/TCallChain.php
@@ -4,16 +4,15 @@
*
* @author Brad Anderson <javalizard@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2008-2013 Pradosoft
+ * @copyright Copyright &copy; 2008-2014 Pradosoft
* @license http://www.pradosoft.com/license/
*/
/**
* TCallChain is a recursive event calling mechanism. This class implements
* the {@link IDynamicMethods} class so that any 'dy' event calls can be caught
- * and patched through to the intended recipient
+ * and patched through to the intended recipient
* @author Brad Anderson <javalizard@gmail.com>
- * @version $Id: TCallChain.php 564 2009-01-21 22:07:10Z javalizard $
* @package System.Util
* @since 3.2.3
*/
@@ -23,12 +22,12 @@ class TCallChain extends TList implements IDynamicMethods
* @var {@link TListIterator} for moving through the chained method calls
*/
private $_iterator=null;
-
+
/**
* @var string the method name of the call chain
*/
private $_method=null;
-
+
/**
* This initializes the list and the name of the method to be called
* @param string the name of the function call
@@ -37,11 +36,11 @@ class TCallChain extends TList implements IDynamicMethods
$this->_method=$method;
parent::__construct();
}
-
-
+
+
/**
* This initializes the list and the name of the method to be called
- * @param string|array this is a callable function as a string or array with
+ * @param string|array this is a callable function as a string or array with
* the object and method name as string
* @param array The array of arguments to the function call chain
*/
@@ -49,12 +48,12 @@ class TCallChain extends TList implements IDynamicMethods
{
$this->add(array($method,$args));
}
-
+
/**
* This method calls the next Callable in the list. All of the method arguments
- * coming into this method are substituted into the original method argument of
+ * coming into this method are substituted into the original method argument of
* call in the chain.
- *
+ *
* If the original method call has these parameters
* <code>
* $originalobject->dyExampleMethod('param1', 'param2', 'param3')
@@ -71,7 +70,7 @@ class TCallChain extends TList implements IDynamicMethods
* list in 'dy' event calls is always the object containing the behavior. This modifies
* the parameter replacement mechanism slightly to leave the object containing the behavior
* alone and only replacing the other parameters in the argument list. As per {@link __call},
- * any calls to a 'dy' event do not need the object containing the behavior as the addition of
+ * any calls to a 'dy' event do not need the object containing the behavior as the addition of
* the object to the argument list as the first element is automatic for IClassBehaviors.
*
* The last parameter of the method parameter list for any callable in the call chain
@@ -87,14 +86,14 @@ class TCallChain extends TList implements IDynamicMethods
*
* When there are no handlers or no handlers left, it returns the first parameter of the
* argument list.
- *
+ *
*/
public function call()
{
$args=func_get_args();
if($this->getCount()===0)
return isset($args[0])?$args[0]:null;
-
+
if(!$this->_iterator)
{
$chain_array=array_reverse($this->toArray());
@@ -115,12 +114,12 @@ class TCallChain extends TList implements IDynamicMethods
$result = $args[0];
return $result;
}
-
-
+
+
/**
* This catches all the unpatched dynamic events. When the method call matches the
- * call chain method, it passes the arguments to the original __call (of the dynamic
- * event being unspecified in TCallChain) and funnels into the method {@link call},
+ * call chain method, it passes the arguments to the original __call (of the dynamic
+ * event being unspecified in TCallChain) and funnels into the method {@link call},
* so the next dynamic event handler can be called.
* If the original method call has these parameters
* <code>
diff --git a/framework/Util/TClassBehavior.php b/framework/Util/TClassBehavior.php
index 9d29dbf4..03ea0c57 100644
--- a/framework/Util/TClassBehavior.php
+++ b/framework/Util/TClassBehavior.php
@@ -11,7 +11,6 @@
/**
* TClassBehavior is a convenient base class for whole class behaviors.
* @author Brad Anderson <javalizard@gmail.com>
- * @version $Id: TClassBehavior.php 564 2009-01-21 22:07:10Z javalizard $
* @package System.Util
* @since 3.2.3
*/
@@ -25,7 +24,7 @@ class TClassBehavior extends TComponent implements IClassBehavior
public function attach($component)
{
}
-
+
/**
* Detaches the behavior object from the component.
* @param TComponent the component that this behavior is to be detached from.
diff --git a/framework/Util/TDataFieldAccessor.php b/framework/Util/TDataFieldAccessor.php
index ae9df57b..1bead02e 100644
--- a/framework/Util/TDataFieldAccessor.php
+++ b/framework/Util/TDataFieldAccessor.php
@@ -4,9 +4,8 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id: TDataFieldAccessor.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
*/
@@ -26,7 +25,6 @@
* then field 'MyValue.MySubValue' will return that method call result.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @version $Id: TDataFieldAccessor.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.0
*/
@@ -36,7 +34,7 @@ class TDataFieldAccessor
* Evaluates the data value at the specified field.
* - If the data is an array, then the field is treated as an array index
* and the corresponding element value is returned; the field name can also include
- * dots to access subarrays. For example a field named 'MyField.MySubField' will
+ * dots to access subarrays. For example a field named 'MyField.MySubField' will
* first try to access $data['MyField.MySubField'], then try $data['MyField']['MySubField'].
* - If the data is a TMap or TList object, then the field is treated as a key
* into the map or list, and the corresponding value is returned.
diff --git a/framework/Util/TDateTimeStamp.php b/framework/Util/TDateTimeStamp.php
index 7a995b00..fcbd573f 100644
--- a/framework/Util/TDateTimeStamp.php
+++ b/framework/Util/TDateTimeStamp.php
@@ -4,9 +4,8 @@
* @author Fabio Bas ctrlaltca[AT]gmail[DOT]com
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id: TDateTimeStamp.php 3246 2013-01-07 21:07:38Z ctrlaltca $
* @package System.Util
*/
@@ -20,7 +19,6 @@
* julian dates anymore.
*
* @author Fabio Bas ctrlaltca[AT]gmail[DOT]com
- * @version $Id: TDateTimeStamp.php 3246 2013-01-07 21:07:38Z ctrlaltca $
* @package System.Util
* @since 3.0.4
* @deprecated since 3.2.1
@@ -194,8 +192,8 @@ class TDateTimeStamp
$dt = new DateTime();
if($is_gmt)
$dt->setTimeZone(new DateTimeZone('UTC'));
- $dt->setDate($year!==false ? $year : date('Y'),
- $mon!==false ? $mon : date('m'),
+ $dt->setDate($year!==false ? $year : date('Y'),
+ $mon!==false ? $mon : date('m'),
$day!==false ? $day : date('d'));
$dt->setTime($hr, $min, $sec);
return (int) $dt->format('U');
diff --git a/framework/Util/TLogRouter.php b/framework/Util/TLogRouter.php
index 32273c0c..4682e9ef 100644
--- a/framework/Util/TLogRouter.php
+++ b/framework/Util/TLogRouter.php
@@ -4,9 +4,8 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id: TLogRouter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
*/
@@ -29,14 +28,13 @@ Prado::using('System.Data.TDbConnection');
* </code>
* PHP configuration style:
* <code>
- *
+ *
* </code>
* You can specify multiple routes with different filtering conditions and different
* targets, even if the routes are of the same type.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Carl G. Mathisen <carlgmathisen@gmail.com>
- * @version $Id: TLogRouter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.0
*/
@@ -128,8 +126,8 @@ class TLogRouter extends TModule
/**
* Adds a TLogRoute instance to the log router.
- *
- * @param TLogRoute $route
+ *
+ * @param TLogRoute $route
* @throws TInvalidDataTypeException if the route object is invalid
*/
public function addRoute($route)
@@ -190,7 +188,6 @@ class TLogRouter extends TModule
* satisfying both filter conditions will they be returned.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @version $Id: TLogRouter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.0
*/
@@ -322,7 +319,7 @@ abstract class TLogRoute extends TApplicationComponent
*/
protected function formatLogMessage($message,$level,$category,$time)
{
- return @gmdate('M d H:i:s',$time).' ['.$this->getLevelName($level).'] ['.$category.'] '.$message."\n";
+ return @date('M d H:i:s',$time).' ['.$this->getLevelName($level).'] ['.$category.'] '.$message."\n";
}
/**
@@ -363,7 +360,6 @@ abstract class TLogRoute extends TApplicationComponent
* specifies how many files to be kept.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @version $Id: TLogRouter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.0
*/
@@ -503,7 +499,6 @@ class TFileLogRoute extends TLogRoute
* {@link setSentFrom SentFrom} address.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @version $Id: TLogRouter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.0
*/
@@ -629,7 +624,6 @@ class TEmailLogRoute extends TLogRoute
* TBrowserLogRoute prints selected log messages in the response.
*
* @author Xiang Wei Zhuo <weizhuo[at]gmail[dot]com>
- * @version $Id: TLogRouter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.0
*/
@@ -639,7 +633,7 @@ class TBrowserLogRoute extends TLogRoute
* @var string css class for indentifying the table structure in the dom tree
*/
private $_cssClass=null;
-
+
public function processLogs($logs)
{
if(empty($logs) || $this->getApplication()->getMode()==='Performance') return;
@@ -664,7 +658,7 @@ class TBrowserLogRoute extends TLogRoute
}
$response->write($this->renderFooter());
}
-
+
/**
* @param string the css class of the control
*/
@@ -816,7 +810,6 @@ EOD;
* </code>
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @version $Id: TLogRouter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.1.2
*/
@@ -1022,7 +1015,6 @@ class TDbLogRoute extends TLogRoute
* {@link http://www.getfirebug.com/ FireBug Website}
*
* @author Enrico Stahn <mail@enricostahn.com>, Christophe Boulain <Christophe.Boulain@gmail.com>
- * @version $Id: TLogRouter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.1.2
*/
@@ -1099,7 +1091,6 @@ EOD;
* {@link http://www.firephp.org/ FirePHP Website}
*
* @author Yves Berkholz <godzilla80[at]gmx[dot]net>
- * @version $Id: TLogRouter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.1.5
*/
diff --git a/framework/Util/TLogger.php b/framework/Util/TLogger.php
index 74fa22bf..6fd12ccf 100644
--- a/framework/Util/TLogger.php
+++ b/framework/Util/TLogger.php
@@ -4,9 +4,8 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id: TLogger.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
*/
@@ -18,7 +17,6 @@
* log categories, and by control.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @version $Id: TLogger.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.0
*/
@@ -82,14 +80,14 @@ class TLogger extends TComponent
* Messages may be filtered by log levels and/or categories and/or control client ids and/or timestamp.
* A level filter is specified by an integer, whose bits indicate the levels interested.
* For example, (TLogger::INFO | TLogger::WARNING) specifies INFO and WARNING levels.
- * A category filter is specified by an array of categories to filter.
+ * A category filter is specified by an array of categories to filter.
* A message whose category name starts with any filtering category
* will be returned. For example, a category filter array('System.Web','System.IO')
* will return messages under categories such as 'System.Web', 'System.IO',
* 'System.Web.UI', 'System.Web.UI.WebControls', etc.
* A control client id filter is specified by an array of control client id
* A message whose control client id starts with any filtering naming panels
- * will be returned. For example, a category filter array('ctl0_body_header',
+ * will be returned. For example, a category filter array('ctl0_body_header',
* 'ctl0_body_content_sidebar')
* will return messages under categories such as 'ctl0_body_header', 'ctl0_body_content_sidebar',
* 'ctl0_body_header_title', 'ctl0_body_content_sidebar_savebutton', etc.
@@ -135,14 +133,14 @@ class TLogger extends TComponent
* Messages may be filtered by log levels and/or categories and/or control client ids and/or timestamp.
* A level filter is specified by an integer, whose bits indicate the levels interested.
* For example, (TLogger::INFO | TLogger::WARNING) specifies INFO and WARNING levels.
- * A category filter is specified by an array of categories to filter.
+ * A category filter is specified by an array of categories to filter.
* A message whose category name starts with any filtering category
* will be deleted. For example, a category filter array('System.Web','System.IO')
* will delete messages under categories such as 'System.Web', 'System.IO',
* 'System.Web.UI', 'System.Web.UI.WebControls', etc.
* A control client id filter is specified by an array of control client id
* A message whose control client id starts with any filtering naming panels
- * will be deleted. For example, a category filter array('ctl0_body_header',
+ * will be deleted. For example, a category filter array('ctl0_body_header',
* 'ctl0_body_content_sidebar')
* will delete messages under categories such as 'ctl0_body_header', 'ctl0_body_content_sidebar',
* 'ctl0_body_header_title', 'ctl0_body_content_sidebar_savebutton', etc.
diff --git a/framework/Util/TParameterModule.php b/framework/Util/TParameterModule.php
index 5b345b4e..84616c63 100644
--- a/framework/Util/TParameterModule.php
+++ b/framework/Util/TParameterModule.php
@@ -4,9 +4,8 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id: TParameterModule.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
*/
@@ -41,7 +40,6 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Carl G. Mathisen <carlgmathisen@gmail.com>
- * @version $Id: TParameterModule.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.0
*/
diff --git a/framework/Util/TRpcClient.php b/framework/Util/TRpcClient.php
index fbfb528a..91b27b52 100644
--- a/framework/Util/TRpcClient.php
+++ b/framework/Util/TRpcClient.php
@@ -5,7 +5,6 @@
* @link http://www.pradosoft.com/
* @copyright 2010 Bigpoint GmbH
* @license http://www.pradosoft.com/license/
- * @version $Id: TRpcClient.php 137 2010-03-27 22:13:36Z rrogge $
* @since 3.2
* @package System.Util
*/
@@ -158,7 +157,7 @@ class TRpcClient extends TApplicationComponent
* @package System.Util
* @since 3.2
*/
-
+
class TRpcClientTypesEnumerable extends TEnumerable
{
const JSON = 'TJsonRpcClient';
@@ -176,7 +175,7 @@ class TRpcClientTypesEnumerable extends TEnumerable
* @package System.Util
* @since 3.2
*/
-
+
class TRpcClientRequestException extends TApplicationException
{
}
@@ -184,7 +183,7 @@ class TRpcClientRequestException extends TApplicationException
/**
* TRpcClientResponseException class
*
- * This Exception is fired when the
+ * This Exception is fired when the
*
* @author Robin J. Rogge <rrogge@bigpoint.net>
* @version $Id$
@@ -323,7 +322,7 @@ class TXmlRpcClient extends TRpcClient
// skip response handling if the request was just a notification request
if($this->isNotification)
return true;
-
+
// decode response
if(($_response = xmlrpc_decode($_response)) === null)
throw new TRpcClientResponseException('Empty response received');
diff --git a/framework/Util/TSimpleDateFormatter.php b/framework/Util/TSimpleDateFormatter.php
index 295a2d60..18e71529 100644
--- a/framework/Util/TSimpleDateFormatter.php
+++ b/framework/Util/TSimpleDateFormatter.php
@@ -4,9 +4,8 @@
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id: TSimpleDateFormatter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
*/
@@ -40,7 +39,6 @@
* </code>
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
- * @version $Id: TSimpleDateFormatter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.0
*/
@@ -177,7 +175,7 @@ class TSimpleDateFormatter
if(is_numeric($value))
return $s->getDate($value);
else
- return $s->parseDate($value);
+ return $s->parseDate($value);
}
/**
@@ -302,7 +300,7 @@ class TSimpleDateFormatter
if(!$defaultToCurrentTime && ($month === null || $day === null || $year === null))
return null;
else
- {
+ {
if(empty($year)) {
$year = date('Y');
}
diff --git a/framework/Util/TVarDumper.php b/framework/Util/TVarDumper.php
index f49a1274..c89b205a 100644
--- a/framework/Util/TVarDumper.php
+++ b/framework/Util/TVarDumper.php
@@ -4,9 +4,8 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id: TVarDumper.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
*/
@@ -24,7 +23,6 @@
* </code>
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @version $Id: TVarDumper.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Util
* @since 3.0
*/