Horde_Kolab_Server_Integration_Scenario::prepareKolabServerConfiguration PHP Méthode

prepareKolabServerConfiguration() public méthode

Prepare the server configuration for the given environment.
public prepareKolabServerConfiguration ( string $environment ) : null
$environment string The name of the environment.
Résultat null
    public function prepareKolabServerConfiguration($environment)
    {
        switch ($environment) {
            case self::ENVIRONMENT_MOCK:
                /** Prepare a Kolab test server */
                $config = new stdClass();
                $config->driver = 'test';
                $config->params = array('basedn' => 'dc=example,dc=org', 'hashtype' => 'plain');
                $this->world['injector'][$environment]->setInstance('Horde_Kolab_Server_Config', $config);
                break;
            default:
                throw new Horde_Exception('Not implemented!');
        }
    }

Usage Example

Exemple #1
0
 /**
  * Prepare the server configuration for the given environment.
  *
  * @param string $environment The name of the environment.
  *
  * @return NULL
  */
 public function prepareKolabServerConfiguration($environment)
 {
     switch ($environment) {
         case self::ENVIRONMENT_FILE:
             /** Prepare a Kolab test server */
             $config = new stdClass();
             $config->driver = 'file';
             $config->params = array('file' => Horde::getTempFile('fileTest'), 'basedn' => 'dc=example,dc=org', 'hashtype' => 'plain');
             $this->world['injector'][$environment]->setInstance('Horde_Kolab_Server_Config', $config);
             break;
         default:
             return parent::prepareKolabServerConfiguration($environment);
     }
 }