Ldap\Connection: Rename to LdapConnection

refs #8954
This commit is contained in:
Johannes Meyer 2015-06-24 09:05:29 +02:00
parent 7921e62a0c
commit c3ad7b211a
9 changed files with 29 additions and 29 deletions

View File

@ -7,7 +7,7 @@ use Exception;
use Icinga\Web\Form;
use Icinga\Data\ConfigObject;
use Icinga\Data\ResourceFactory;
use Icinga\Protocol\Ldap\Connection;
use Icinga\Protocol\Ldap\LdapConnection;
/**
* Form class for adding/modifying ldap resources
@ -27,7 +27,7 @@ class LdapResourceForm extends Form
*/
public function createElements(array $formData)
{
$defaultPort = ! array_key_exists('encryption', $formData) || $formData['encryption'] !== Connection::LDAPS
$defaultPort = ! array_key_exists('encryption', $formData) || $formData['encryption'] !== LdapConnection::LDAPS
? 389
: 636;
@ -75,9 +75,9 @@ class LdapResourceForm extends Form
. ' none for unencrypted communication'
),
'multiOptions' => array(
'none' => $this->translate('None', 'resource.ldap.encryption'),
Connection::STARTTLS => 'STARTTLS',
Connection::LDAPS => 'LDAPS'
'none' => $this->translate('None', 'resource.ldap.encryption'),
LdapConnection::STARTTLS => 'STARTTLS',
LdapConnection::LDAPS => 'LDAPS'
)
)
);

View File

@ -8,7 +8,7 @@ use Icinga\Authentication\User\UserBackend;
use Icinga\Authentication\UserGroup\LdapUserGroupBackend;
use Icinga\Data\ConfigObject;
use Icinga\Data\ResourceFactory;
use Icinga\Protocol\Ldap\Connection;
use Icinga\Protocol\Ldap\LdapConnection;
use Icinga\Web\Form;
use Icinga\Web\Notification;
@ -286,11 +286,11 @@ class LdapUserGroupBackendForm extends Form
/**
* Return the names of all configured LDAP user backends
*
* @param Connection $resource
* @param LdapConnection $resource
*
* @return array
*/
protected function getLdapUserBackendNames(Connection $resource)
protected function getLdapUserBackendNames(LdapConnection $resource)
{
$names = array();
foreach (Config::app('authentication') as $name => $config) {

View File

@ -8,7 +8,7 @@ use Icinga\Util\ConfigAwareFactory;
use Icinga\Exception\ConfigurationError;
use Icinga\Data\Db\DbConnection;
use Icinga\Protocol\Livestatus\Connection as LivestatusConnection;
use Icinga\Protocol\Ldap\Connection as LdapConnection;
use Icinga\Protocol\Ldap\LdapConnection;
use Icinga\Protocol\File\FileReader;
/**

View File

@ -9,7 +9,7 @@ use Icinga\Protocol\Dns;
class Discovery {
/**
* @var Connection
* @var LdapConnection
*/
private $connection;
@ -21,9 +21,9 @@ class Discovery {
private $discovered = false;
/**
* @param Connection $conn The ldap connection to use for the discovery
* @param LdapConnection $conn The ldap connection to use for the discovery
*/
public function __construct(Connection $conn)
public function __construct(LdapConnection $conn)
{
$this->connection = $conn;
}
@ -147,7 +147,7 @@ class Discovery {
*/
public static function discover($host, $port)
{
$conn = new Connection(new ConfigObject(array(
$conn = new LdapConnection(new ConfigObject(array(
'hostname' => $host,
'port' => $port
)));

View File

@ -16,7 +16,7 @@ use Icinga\Protocol\Ldap\Exception as LdapException;
/**
* Encapsulate LDAP connections and query creation
*/
class Connection implements Selectable
class LdapConnection implements Selectable
{
/**
* Indicates that the target object cannot be found

View File

@ -14,7 +14,7 @@ namespace Icinga\Protocol\Ldap;
class Node extends Root
{
/**
* @var Connection
* @var LdapConnection
*/
protected $connection;

View File

@ -22,7 +22,7 @@ class Root
protected $rdn;
/**
* @var Connection
* @var LdapConnection
*/
protected $connection;
@ -37,9 +37,9 @@ class Root
protected $props = array();
/**
* @param Connection $connection
* @param LdapConnection $connection
*/
protected function __construct(Connection $connection)
protected function __construct(LdapConnection $connection)
{
$this->connection = $connection;
}
@ -53,10 +53,10 @@ class Root
}
/**
* @param Connection $connection
* @param LdapConnection $connection
* @return Root
*/
public static function forConnection(Connection $connection)
public static function forConnection(LdapConnection $connection)
{
$root = new Root($connection);
return $root;
@ -177,17 +177,17 @@ class Root
}
/**
* @param Connection $connection
* @param LdapConnection $connection
* @return $this
*/
public function setConnection(Connection $connection)
public function setConnection(LdapConnection $connection)
{
$this->connection = $connection;
return $this;
}
/**
* @return Connection
* @return LdapConnection
*/
public function getConnection()
{

View File

@ -3,7 +3,7 @@
namespace Icinga\Repository;
use Icinga\Protocol\Ldap\Connection;
use Icinga\Protocol\Ldap\LdapConnection;
/**
* Abstract base class for concrete LDAP repository implementations
@ -18,7 +18,7 @@ abstract class LdapRepository extends Repository
/**
* The datasource being used
*
* @var Connection
* @var LdapConnection
*/
protected $ds;
@ -40,9 +40,9 @@ abstract class LdapRepository extends Repository
/**
* Create a new LDAP repository object
*
* @param Connection $ds The data source to use
* @param LdapConnection $ds The data source to use
*/
public function __construct(Connection $ds)
public function __construct(LdapConnection $ds)
{
parent::__construct($ds);
}

View File

@ -5,7 +5,7 @@ namespace Tests\Icinga\Protocol\Ldap;
use Icinga\Data\ConfigObject;
use Icinga\Test\BaseTestCase;
use Icinga\Protocol\Ldap\Connection;
use Icinga\Protocol\Ldap\LdapConnection;
class QueryTest extends BaseTestCase
{
@ -20,7 +20,7 @@ class QueryTest extends BaseTestCase
)
);
$connection = new Connection($config);
$connection = new LdapConnection($config);
return $connection->select();
}