コード例 #1
0
 /**
  * Return default handler objects for supported tasks.
  * @param string $handler_type Specific functionality required.
  * @param OBJECT_RENDERER_OPTIONS $options
  * @return object
  * @access private
  */
 protected function _default_handler_for($handler_type, $options = null)
 {
     switch ($handler_type) {
         case Handler_navigator:
             include_once 'albums/gui/picture_navigator.php';
             return new PICTURE_NAVIGATOR($this);
         case Handler_print_renderer:
         case Handler_html_renderer:
         case Handler_text_renderer:
             include_once 'albums/gui/picture_renderer.php';
             return new PICTURE_RENDERER($this->app, $options);
         case Handler_commands:
             include_once 'albums/cmd/picture_commands.php';
             return new PICTURE_COMMANDS($this);
         case Handler_history_item:
             include_once 'albums/obj/album_history_items.php';
             return new PICTURE_HISTORY_ITEM($this->app);
         case Handler_location:
             include_once 'albums/gui/picture_renderer.php';
             return new PICTURE_LOCATION_RENDERER($this->context);
         default:
             return parent::_default_handler_for($handler_type, $options);
     }
 }
コード例 #2
0
 /**
  * Return default handler objects for supported tasks.
  * @param string $handler_type Specific functionality required.
  * @param object $options
  * @return object
  * @access private
  */
 protected function _default_handler_for($handler_type, $options = null)
 {
     switch ($handler_type) {
         case Handler_navigator:
             include_once 'albums/gui/journal_navigator.php';
             return new JOURNAL_NAVIGATOR($this, $options);
         case Handler_print_renderer:
         case Handler_html_renderer:
         case Handler_text_renderer:
             include_once 'albums/gui/journal_renderer.php';
             return new JOURNAL_RENDERER($this->app, $options);
         case Handler_commands:
             include_once 'albums/cmd/journal_commands.php';
             return new JOURNAL_COMMANDS($this);
         case Handler_history_item:
             include_once 'albums/obj/album_history_items.php';
             return new JOURNAL_HISTORY_ITEM($this->app);
         case Handler_associated_data:
             include_once 'albums/gui/journal_renderer.php';
             return new JOURNAL_ASSOCIATED_DATA_RENDERER($this->app, $options);
         default:
             return parent::_default_handler_for($handler_type, $options);
     }
 }