initialize() публичный статический Метод

Defines the following $GLOBALS (@TODO these should use the injector) mnemo_shares display_notepads
public static initialize ( )
Пример #1
0
 /**
  * Global variables defined:
  *   $mnemo_shares - TODO
  */
 protected function _init()
 {
     /* For now, autoloading the Content_* classes depend on there being a
      * registry entry for the 'content' application that contains at least
      * the fileroot entry. */
     $GLOBALS['injector']->getInstance('Horde_Autoloader')->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Content_/', $GLOBALS['registry']->get('fileroot', 'content') . '/lib/'));
     if (!class_exists('Content_Tagger')) {
         throw new Horde_Exception(_("The Content_Tagger class could not be found. Make sure the Content application is installed."));
     }
     Mnemo::initialize();
 }
Пример #2
0
 public function testDefaultShareDeletePermission()
 {
     $GLOBALS['conf']['share']['auto_create'] = true;
     Mnemo::initialize();
     $shares = $GLOBALS['mnemo_shares']->listShares('*****@*****.**');
     $default = array_pop($shares);
     $this->assertTrue($default->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE));
 }