Skip to content

Commit

Permalink
Fix namespace conflict and single instance validation
Browse files Browse the repository at this point in the history
refs #3761
  • Loading branch information
Johannes Meyer committed Oct 10, 2013
1 parent c0cf7f3 commit 3ddc56d
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 45 deletions.
4 changes: 2 additions & 2 deletions library/Icinga/Application/ApplicationBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ protected function __construct($configDir)

Benchmark::measure('Bootstrap, autoloader registered');

Icinga::setApp($this);
$this->configDir = realpath($configDir);
}

Expand Down Expand Up @@ -264,6 +263,7 @@ public static function start($configDir)
$application->stopApplication(Logger::getQueue());
}

Icinga::setApp($application);
return $application;
}

Expand Down Expand Up @@ -300,7 +300,7 @@ public function stopApplication(array $errors = array())
*/
public function setupAutoloader()
{
require $this->libDir. '/Icinga/Application/Loader.php';
require_once $this->libDir. '/Icinga/Application/Loader.php';

$this->loader = new Loader();
$this->loader->registerNamespace('Icinga', $this->libDir. '/Icinga');
Expand Down
2 changes: 0 additions & 2 deletions library/Icinga/Application/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@

namespace Icinga\Application;

use Icinga\Protocol\Ldap\Exception;
use \Zend_Config;
use \Zend_Log;
use \Zend_Log_Filter_Priority;
use \Zend_Log_Writer_Abstract;
use \Zend_Log_Exception;
use \Icinga\Exception\ConfigurationError;

Expand Down
37 changes: 0 additions & 37 deletions library/Icinga/Protocol/Ldap/Exception.php

This file was deleted.

2 changes: 2 additions & 0 deletions library/Icinga/Protocol/Ldap/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Icinga\Protocol\Ldap;

use \Exception;

/**
* Search class
*
Expand Down
2 changes: 2 additions & 0 deletions library/Icinga/Protocol/Ldap/Root.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

namespace Icinga\Protocol\Ldap;

use \Exception;

/**
* This class is a special node object, representing your connections root node
*
Expand Down
4 changes: 2 additions & 2 deletions library/Icinga/User/Preferences/IniStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
namespace Icinga\User\Preferences;

use Icinga\Application\Logger;
use Icinga\Protocol\Ldap\Exception;
use \Exception;
use \SplObserver;
use \SplSubject;
use \Icinga\User;
Expand Down Expand Up @@ -98,7 +98,7 @@ public function __construct($configPath = null)
* Setter for config directory
*
* @param string $configPath
* @throws \Icinga\Exception\ConfigurationError
* @throws ConfigurationError
*/
public function setConfigPath($configPath)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
require_once BaseTestCase::$libDir . '/Exception/ProgrammingError.php';
require_once BaseTestCase::$libDir . '/Util/ConfigAwareFactory.php';
require_once BaseTestCase::$libDir . '/Authentication/UserBackend.php';
require_once BaseTestCase::$libDir . '/Protocol/Ldap/Exception.php';
require_once BaseTestCase::$libDir . '/Application/DbAdapterFactory.php';
require_once BaseTestCase::$libDir . '/Application/Config.php';
require_once BaseTestCase::$libDir . '/Authentication/Credential.php';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
require_once(realpath(__DIR__ . '/CommandPipeLoader.php'));
CommandPipeLoader::requireLibrary();

use \Exception;
use Zend_Config;
use PHPUnit_Framework_TestCase;
use Icinga\Protocol\Commandpipe\Comment;
use Icinga\Protocol\Commandpipe\Commandpipe as Commandpipe;
use Icinga\Protocol\Commandpipe\PropertyModifier as MONFLAG;
use Icinga\Protocol\Ldap\Exception;
use Icinga\Module\Monitoring\Command\AcknowledgeCommand;
use Icinga\Module\Monitoring\Command\AddCommentCommand;
use Icinga\Module\Monitoring\Command\ScheduleDowntimeCommand;
Expand Down

0 comments on commit 3ddc56d

Please sign in to comment.