From 06efcc8d6adfdef9ed81052c54c37c0a8f6cc416 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sat, 24 Jan 2009 20:29:58 -0500 Subject: [PATCH] Rename FreeBusy.php to View.php so it can be autoloaded. Update Imple.php for PHP5 - fix some paths etc... --- kronolith/lib/FreeBusy/{FreeBusy.php => View.php} | 2 +- kronolith/lib/Imple.php | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) rename kronolith/lib/FreeBusy/{FreeBusy.php => View.php} (99%) diff --git a/kronolith/lib/FreeBusy/FreeBusy.php b/kronolith/lib/FreeBusy/View.php similarity index 99% rename from kronolith/lib/FreeBusy/FreeBusy.php rename to kronolith/lib/FreeBusy/View.php index b9181cceb..c05fa41d2 100644 --- a/kronolith/lib/FreeBusy/FreeBusy.php +++ b/kronolith/lib/FreeBusy/View.php @@ -173,7 +173,7 @@ class Kronolith_FreeBusy_View { function factory($view) { $driver = basename($view); - require_once dirname(__FILE__) . '/FBView/' . $driver . '.php'; + require_once dirname(__FILE__) . '/View/' . $driver . '.php'; $class = 'Kronolith_FreeBusy_View_' . $driver; if (class_exists($class)) { return new $class($user, $params); diff --git a/kronolith/lib/Imple.php b/kronolith/lib/Imple.php index a7691874b..50062f8e6 100644 --- a/kronolith/lib/Imple.php +++ b/kronolith/lib/Imple.php @@ -8,14 +8,15 @@ * @author Michael Slusarz * @package Kronolith */ -class Kronolith_Imple { +class Kronolith_Imple +{ /** * Parameters needed by the subclasses. * * @var array */ - var $_params = array(); + protected $_params = array(); /** * Attempts to return a concrete Imple instance based on $imple. @@ -28,7 +29,7 @@ class Kronolith_Imple { * @return mixed The newly created concrete Imple instance, or false on * error. */ - function factory($imple, $params = array()) + public static function factory($imple, $params = array()) { $imple = basename($imple); if (!$imple) { @@ -51,7 +52,7 @@ class Kronolith_Imple { * * @param array $params Any parameters needed by the class. */ - function Imple($params) + public function __construct($params) { $this->_params = $params; $this->attach(); @@ -60,7 +61,7 @@ class Kronolith_Imple { /** * Attach the Imple object to a javascript event. */ - function attach() + public function attach() { Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('effects.js', 'horde', true); @@ -71,7 +72,7 @@ class Kronolith_Imple { * * @param TODO */ - function handle($args) + public function handle($args) { } @@ -80,7 +81,7 @@ class Kronolith_Imple { * * @return string The HTML code. */ - function html() + public function html() { } @@ -91,7 +92,7 @@ class Kronolith_Imple { * * @return string The random ID string. */ - function _randomid() + public function _randomid() { return 'imple_' . uniqid(mt_rand()); } -- 2.11.0