Example #1
0
 function init()
 {
     parent::init();
     $oContentField = new AnwContentFieldSettings_radio(self::FIELD_STORAGE);
     $asEnumValues = AnwStorageDriver::getAvailableComponents(AnwComponent::TYPE_STORAGEDRIVER);
     $oContentField->setEnumValuesFromList($asEnumValues);
     $oContentField->setMandatory(true);
     $this->addContentField($oContentField);
     $oContentField = new AnwContentFieldSettings_radio(self::FIELD_SESSIONS);
     $asEnumValues = AnwSessionsDriver::getAvailableComponents(AnwComponent::TYPE_SESSIONSDRIVER);
     $oContentField->setEnumValuesFromList($asEnumValues);
     $oContentField->setMandatory(true);
     $this->addContentField($oContentField);
     $oContentField = new AnwContentFieldSettings_radio(self::FIELD_USERS);
     $asEnumValues = AnwUsersDriver::getAvailableComponents(AnwComponent::TYPE_USERSDRIVER);
     $oContentField->setEnumValuesFromList($asEnumValues);
     $oContentField->setMandatory(true);
     $this->addContentField($oContentField);
     $oContentField = new AnwContentFieldSettings_radio(self::FIELD_ACLS);
     $asEnumValues = AnwAclsDriver::getAvailableComponents(AnwComponent::TYPE_ACLSDRIVER);
     $oContentField->setEnumValuesFromList($asEnumValues);
     $oContentField->setMandatory(true);
     $this->addContentField($oContentField);
 }
Example #2
0
 /**
  * @throws AnwUnexpectedException
  */
 static function loadDriver()
 {
     AnwDebug::startbench("Sessions driver init");
     self::$oDriver = AnwSessionsDriver::loadComponent(AnwComponent::globalCfgDriverSessions());
     self::$oDriver->init();
     if (self::isDriverInternal()) {
         self::debug("Sessions Driver loaded : internal");
     } else {
         if (self::isDriverExternal()) {
             self::debug("Sessions Driver loaded : external");
         } else {
             throw new AnwUnexpectedException("Unknown sessionsdriver type");
         }
     }
     AnwDebug::stopbench("Sessions driver init");
 }