|
From: <var...@us...> - 2019-07-20 16:37:26
|
Revision: 10129
http://sourceforge.net/p/phpwiki/code/10129
Author: vargenau
Date: 2019-07-20 16:37:25 +0000 (Sat, 20 Jul 2019)
Log Message:
-----------
Use __construct
Modified Paths:
--------------
trunk/lib/pear/Cache/Cache.php
trunk/lib/pear/Cache/Container/db.php
trunk/lib/pear/Cache/Container/dbx.php
trunk/lib/pear/Cache/Container/file.php
trunk/lib/pear/Cache/Container/imgfile.php
trunk/lib/pear/Cache/Container/mdb.php
trunk/lib/pear/Cache/Container/msession.php
trunk/lib/pear/Cache/Container/phplib.php
trunk/lib/pear/Cache/Container/shm.php
trunk/lib/pear/Cache/Error.php
trunk/lib/pear/Cache.php
Modified: trunk/lib/pear/Cache/Cache.php
===================================================================
--- trunk/lib/pear/Cache/Cache.php 2019-07-20 16:34:29 UTC (rev 10128)
+++ trunk/lib/pear/Cache/Cache.php 2019-07-20 16:37:25 UTC (rev 10129)
@@ -126,9 +126,9 @@
* @param string Name of container class
* @param array Array with container class options
*/
- function Cache($container, $container_options = '')
+ function __construct($container, $container_options = '')
{
- $this->PEAR();
+ parent::__construct();
$container = strtolower($container);
$container_class = 'Cache_Container_' . $container;
$container_classfile = 'Cache/Container/' . $container . '.php';
Modified: trunk/lib/pear/Cache/Container/db.php
===================================================================
--- trunk/lib/pear/Cache/Container/db.php 2019-07-20 16:34:29 UTC (rev 10128)
+++ trunk/lib/pear/Cache/Container/db.php 2019-07-20 16:37:25 UTC (rev 10129)
@@ -79,7 +79,7 @@
*/
var $db;
- function Cache_Container_db($options)
+ function __construct($options)
{
if (!is_array($options) || !isset($options['dsn'])) {
return new Cache_Error('No dsn specified!', __FILE__, __LINE__);
Modified: trunk/lib/pear/Cache/Container/dbx.php
===================================================================
--- trunk/lib/pear/Cache/Container/dbx.php 2019-07-20 16:34:29 UTC (rev 10128)
+++ trunk/lib/pear/Cache/Container/dbx.php 2019-07-20 16:37:25 UTC (rev 10129)
@@ -109,7 +109,7 @@
var $persistent = true;
- function Cache_Container_dbx($options)
+ function __construct($options)
{
if (!is_array($options) ) {
return new Cache_Error('No options specified!', __FILE__, __LINE__);
Modified: trunk/lib/pear/Cache/Container/file.php
===================================================================
--- trunk/lib/pear/Cache/Container/file.php 2019-07-20 16:34:29 UTC (rev 10128)
+++ trunk/lib/pear/Cache/Container/file.php 2019-07-20 16:37:25 UTC (rev 10129)
@@ -100,7 +100,7 @@
*
* @param array Config options: ["cache_dir" => ..., "filename_prefix" => ...]
*/
- function Cache_Container_file($options = '')
+ function __construct($options = '')
{
if (is_array($options)) {
$this->setOptions($options, array_merge($this->allowed_options, array('cache_dir', 'filename_prefix', 'max_userdata_linelength')));
Modified: trunk/lib/pear/Cache/Container/imgfile.php
===================================================================
--- trunk/lib/pear/Cache/Container/imgfile.php 2019-07-20 16:34:29 UTC (rev 10128)
+++ trunk/lib/pear/Cache/Container/imgfile.php 2019-07-20 16:37:25 UTC (rev 10129)
@@ -71,7 +71,7 @@
*
* @param array Config options: ["cache_dir" => ..., "filename_prefix" => ...]
*/
- function Cache_Container_file($options = '') {
+ function __construct($options = '') {
if (is_array($options))
$this->setOptions($options, array_merge($this->allowed_options, array('cache_dir', 'filename_prefix')));
Modified: trunk/lib/pear/Cache/Container/mdb.php
===================================================================
--- trunk/lib/pear/Cache/Container/mdb.php 2019-07-20 16:34:29 UTC (rev 10128)
+++ trunk/lib/pear/Cache/Container/mdb.php 2019-07-20 16:37:25 UTC (rev 10129)
@@ -86,7 +86,7 @@
*
* @param mixed Array with connection info or dsn string
*/
- function Cache_Container_mdb($options)
+ function __construct($options)
{
$this->db = &MDB::Connect($options);
if (MDB::isError($this->db)) {
@@ -377,4 +377,4 @@
}
}
-?>
\ No newline at end of file
+?>
Modified: trunk/lib/pear/Cache/Container/msession.php
===================================================================
--- trunk/lib/pear/Cache/Container/msession.php 2019-07-20 16:34:29 UTC (rev 10128)
+++ trunk/lib/pear/Cache/Container/msession.php 2019-07-20 16:37:25 UTC (rev 10129)
@@ -81,7 +81,7 @@
var $ms = null;
- function Cache_Container_msession($options = '')
+ function __construct($options = '')
{
if (is_array($options)) {
$this->setOptions($options, array_merge($this->allowed_options, array('id_length', 'uniq', 'host', 'port', 'connect')));
@@ -245,4 +245,4 @@
} // end func garbageCollection
} // end class file
-?>
\ No newline at end of file
+?>
Modified: trunk/lib/pear/Cache/Container/phplib.php
===================================================================
--- trunk/lib/pear/Cache/Container/phplib.php 2019-07-20 16:34:29 UTC (rev 10128)
+++ trunk/lib/pear/Cache/Container/phplib.php 2019-07-20 16:37:25 UTC (rev 10129)
@@ -116,7 +116,7 @@
* see $local_path for some hints.s
* @see $local_path
*/
- function Cache_Container_phplib($options = '')
+ function __construct($options = '')
{
if (is_array($options)) {
$this->setOptions($options, array_merge($this->allowed_options, array('db_class', 'db_file', 'db_path', 'local_file', 'local_path')));
@@ -261,4 +261,4 @@
}
} // end func garbageCollection
}
-?>
\ No newline at end of file
+?>
Modified: trunk/lib/pear/Cache/Container/shm.php
===================================================================
--- trunk/lib/pear/Cache/Container/shm.php 2019-07-20 16:34:29 UTC (rev 10128)
+++ trunk/lib/pear/Cache/Container/shm.php 2019-07-20 16:37:25 UTC (rev 10129)
@@ -106,7 +106,7 @@
*
* @param array shm_key, sem_key, shm_size, sem_perm, shm_perm
*/
- function Cache_Container_shm($options = '')
+ function __construct($options = '')
{
if (is_array($options)) {
$this->setOptions($options, array_merge($this->allowed_options,
Modified: trunk/lib/pear/Cache/Error.php
===================================================================
--- trunk/lib/pear/Cache/Error.php 2019-07-20 16:34:29 UTC (rev 10128)
+++ trunk/lib/pear/Cache/Error.php 2019-07-20 16:37:25 UTC (rev 10129)
@@ -42,11 +42,11 @@
* @param string file where the error occured
* @param string linenumber where the error occured
*/
- function Cache_Error($msg, $file = __FILE__, $line = __LINE__) {
+ function __construct($msg, $file = __FILE__, $line = __LINE__) {
- $this->PEAR_Error(sprintf("%s [%s on line %d].", $msg, $file, $line));
+ parent::__construct(sprintf("%s [%s on line %d].", $msg, $file, $line));
} // end func Cache_Error
} // end class Cache_Error
-?>
\ No newline at end of file
+?>
Modified: trunk/lib/pear/Cache.php
===================================================================
--- trunk/lib/pear/Cache.php 2019-07-20 16:34:29 UTC (rev 10128)
+++ trunk/lib/pear/Cache.php 2019-07-20 16:37:25 UTC (rev 10129)
@@ -124,9 +124,9 @@
* @param string Name of container class
* @param array Array with container class options
*/
- function Cache($container, $container_options = '')
+ function __construct($container, $container_options = '')
{
- $this->PEAR();
+ parent::__construct();
$container = strtolower($container);
$container_class = 'Cache_Container_' . $container;
$container_classfile = 'Cache/Container/' . $container . '.php';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|