Example #1
0
 /**
  * "Listen" to changes in the given resource manager.
  * Called to make sure that changes in a resource manager have paths
  * updated to reflect page settings. The {@link THEMED_PAGE} uses these
  * settings to adjust icon paths according to theme.
  * @see add_icon_alias()
  * @param RESOURCE_MANAGER $resource_manager
  */
 public function add_as_icon_listener_to($resource_manager)
 {
     include_once 'webcore/sys/callback.php';
     $resource_manager->add_listener(new CALLBACK_METHOD('_on_alias_changed', $this));
 }
 protected function _execute()
 {
     $env_res = new RESOURCE_MANAGER();
     $env_res->root_url = 'http://earthli.com';
     $page_res = new RESOURCE_MANAGER();
     $page_res->root_url = '/site_root/home/users/~bob/';
     $page_res->inherit_resources_from($env_res);
     $page_res->set_path('root', '/');
     $page_res->set_path('resources', '{root}/resources');
     $page_res->set_path('pictures', '{resources}/pictures');
     $page_res->set_path('external', '/external/software');
     $page_res->set_path('attachments', 'attachments');
     $page_res->set_path('entry_attachments', '{attachments}/entry');
     $page_res->set_path('logs', '/var/log');
     $page_res->set_forced_root('logs', false);
     $page_res->set_extension('pictures', 'png');
     $page_res->set_extension('external', 'zip');
     $app_res = new RESOURCE_MANAGER();
     $app_res->inherit_resources_from($page_res);
     $app_res->root_url = 'albums/';
     $this->_check_basic_aliases($app_res);
     $this->_check_basic_aliases($page_res);
     $this->_check_force_root_override($page_res, $app_res);
     $this->_check_force_root_default($env_res, $page_res, $app_res);
 }
Example #3
0
 public function __construct()
 {
     parent::__construct();
     $this->classes = new OBJECT_FACTORY();
     $this->_initialize_class_registry();
 }