typehinting, phpdoc, make Kronolith_FreeBusy_View abstract
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 26 Jan 2011 16:36:23 +0000 (11:36 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 26 Jan 2011 18:58:34 +0000 (13:58 -0500)
kronolith/lib/FreeBusy/View.php
kronolith/lib/FreeBusy/View/Day.php
kronolith/lib/FreeBusy/View/Month.php
kronolith/lib/FreeBusy/View/Week.php

index dea3937..16bc7b3 100644 (file)
@@ -10,7 +10,7 @@
  * @author  Jan Schneider <jan@horde.org>
  * @package Kronolith
  */
-class Kronolith_FreeBusy_View
+abstract class Kronolith_FreeBusy_View
 {
     protected $_requiredMembers = array();
     protected $_optionalMembers = array();
@@ -72,7 +72,7 @@ class Kronolith_FreeBusy_View
      *
      * @return string  The html of the rendered fb view.
      */
-    public function render($day = null)
+    public function render(Horde_Date $day = null)
     {
         global $prefs;
 
@@ -352,4 +352,8 @@ class Kronolith_FreeBusy_View
         return $blocks;
     }
 
+    abstract protected function _title();
+    abstract protected function _hours();
+    abstract protected function _render(Horde_Date $day = null);
+
 }
index bbd2a94..907d6b8 100644 (file)
@@ -49,7 +49,7 @@ class Kronolith_FreeBusy_View_Day extends Kronolith_FreeBusy_View
         return $hours_html;
     }
 
-    protected function _render($day = null)
+    protected function _render(Horde_Date $day = null)
     {
         $this->_start = new Horde_Date($day);
         $this->_start->hour = $this->_startHour;
index 4759a75..de8fe49 100644 (file)
@@ -93,7 +93,7 @@ class Kronolith_FreeBusy_View_Month extends Kronolith_FreeBusy_View
         return $hours_html;
     }
 
-    protected function _render($day = null)
+    protected function _render(Horde_Date $day = null)
     {
         $this->_start = new Horde_Date($day);
         $this->_start->mday = 1;
index 4c7e429..4e22410 100644 (file)
@@ -88,7 +88,7 @@ class Kronolith_FreeBusy_View_Week extends Kronolith_FreeBusy_View
         return $hours_html;
     }
 
-    protected function _render($day = null)
+    protected function _render(Horde_Date $day = null)
     {
         $this->_start = new Horde_Date(Date_Calc::beginOfWeek($day->mday, $day->month, $day->year, '%Y%m%d000000'));
         $this->_end = new Horde_Date($this->_start);