initialize() public static method

Initial app setup code.
public static initialize ( )
示例#1
0
 /**
  * Global variables defined:
  *   $nag_shares - TODO
  */
 protected function _init()
 {
     // Set the timezone variable.
     $GLOBALS['registry']->setTimeZone();
     /* 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/'));
     // Create a share instance.
     $GLOBALS['nag_shares'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Share')->create();
     Nag::initialize();
 }
示例#2
0
文件: Base.php 项目: raz0rsdge/horde
 public function testDefaultShareDeletePermission()
 {
     $GLOBALS['conf']['share']['auto_create'] = true;
     Nag::initialize();
     $shares = $GLOBALS['nag_shares']->listShares('*****@*****.**');
     $default = array_pop($shares);
     $this->assertTrue($default->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE));
 }