Move User_LDAP and User_Proxy to PSR-4

This commit is contained in:
Joas Schilling 2016-05-12 11:01:29 +02:00
parent cbba55a26c
commit b7fa527791
No known key found for this signature in database
GPG Key ID: 70A0B324C41C0946
19 changed files with 33 additions and 33 deletions

View File

@ -46,10 +46,10 @@ if(count($configPrefixes) === 1) {
$ldapAccess->setUserMapper(new OCA\User_LDAP\Mapping\UserMapping($dbc));
$ldapAccess->setGroupMapper(new OCA\User_LDAP\Mapping\GroupMapping($dbc));
$userBackend = new OCA\user_ldap\USER_LDAP($ldapAccess, $ocConfig);
$userBackend = new OCA\User_LDAP\User_LDAP($ldapAccess, $ocConfig);
$groupBackend = new \OCA\User_LDAP\Group_LDAP($ldapAccess);
} else if(count($configPrefixes) > 1) {
$userBackend = new OCA\user_ldap\User_Proxy(
$userBackend = new OCA\User_LDAP\User_Proxy(
$configPrefixes, $ldapWrapper, $ocConfig
);
$groupBackend = new OCA\User_LDAP\Group_Proxy($configPrefixes, $ldapWrapper);

View File

@ -23,7 +23,7 @@
use OCA\user_ldap\lib\Helper;
use OCA\user_ldap\lib\LDAP;
use OCA\user_ldap\User_Proxy;
use OCA\User_LDAP\User_Proxy;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\lib\User\DeletedUsersIndex;

View File

@ -31,10 +31,10 @@ use Symfony\Component\Console\Output\OutputInterface;
use OCA\User_LDAP\lib\User\DeletedUsersIndex;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\user_ldap\lib\Helper as LDAPHelper;
use OCA\user_ldap\User_Proxy;
use OCA\User_LDAP\User_Proxy;
class CheckUser extends Command {
/** @var \OCA\user_ldap\User_Proxy */
/** @var \OCA\User_LDAP\User_Proxy */
protected $backend;
/** @var \OCA\User_LDAP\lib\Helper */

View File

@ -28,7 +28,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use OCA\user_ldap\User_Proxy;
use OCA\User_LDAP\User_Proxy;
use OCA\User_LDAP\Group_Proxy;
use OCA\user_ldap\lib\Helper;
use OCA\user_ldap\lib\LDAP;

View File

@ -24,7 +24,7 @@ namespace OCA\User_LDAP\Jobs;
use \OC\BackgroundJob\TimedJob;
use \OCA\user_ldap\User_LDAP;
use \OCA\user_ldap\User_Proxy;
use \OCA\User_LDAP\User_Proxy;
use \OCA\user_ldap\lib\Helper;
use \OCA\user_ldap\lib\LDAP;
use \OCA\user_ldap\lib\user\DeletedUsersIndex;

View File

@ -29,7 +29,7 @@
*
*/
namespace OCA\user_ldap;
namespace OCA\User_LDAP;
use OC\User\NoUserException;
use OCA\user_ldap\lib\BackendUtility;
@ -38,7 +38,7 @@ use OCA\user_ldap\lib\user\OfflineUser;
use OCA\User_LDAP\lib\User\User;
use OCP\IConfig;
class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserInterface {
class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserInterface {
/** @var string[] $homesToKill */
protected $homesToKill = array();

View File

@ -24,7 +24,7 @@
*
*/
namespace OCA\user_ldap;
namespace OCA\User_LDAP;
use OCA\user_ldap\lib\ILDAPWrapper;
use OCA\User_LDAP\lib\User\User;

View File

@ -27,7 +27,7 @@
namespace OCA\user_ldap\lib;
use OCA\user_ldap\User_Proxy;
use OCA\User_LDAP\User_Proxy;
class Helper {

View File

@ -25,9 +25,9 @@
*
*/
namespace OCA\user_ldap\tests;
namespace OCA\User_LDAP\Tests;
use \OCA\user_ldap\USER_LDAP as UserLDAP;
use OCA\User_LDAP\User_LDAP as UserLDAP;
use \OCA\user_ldap\lib\Access;
use \OCA\user_ldap\lib\Connection;
use \OCA\user_ldap\lib\ILDAPWrapper;
@ -37,9 +37,9 @@ use \OCA\user_ldap\lib\ILDAPWrapper;
*
* @group DB
*
* @package OCA\user_ldap\tests
* @package OCA\User_LDAP\Tests
*/
class Test_User_Ldap_Direct extends \Test\TestCase {
class User_LDAPTest extends \Test\TestCase {
protected $backend;
protected $access;
protected $configMock;

View File

@ -24,7 +24,7 @@ namespace OCA\user_ldap\tests\integration\lib;
use OCA\user_ldap\lib\user\Manager as LDAPUserManager;
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\user_ldap\USER_LDAP;
use OCA\User_LDAP\User_LDAP;
require_once __DIR__ . '/../../../../../lib/base.php';
@ -32,7 +32,7 @@ class IntegrationBackupServer extends AbstractIntegrationTest {
/** @var UserMapping */
protected $mapping;
/** @var USER_LDAP */
/** @var User_LDAP */
protected $backend;
/**

View File

@ -24,7 +24,7 @@ namespace OCA\user_ldap\tests\integration\lib;
use OCA\user_ldap\lib\user\Manager as LDAPUserManager;
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\user_ldap\USER_LDAP;
use OCA\User_LDAP\User_LDAP;
require_once __DIR__ . '/../../../../../lib/base.php';
@ -32,7 +32,7 @@ class IntegrationConnect extends AbstractIntegrationTest {
/** @var UserMapping */
protected $mapping;
/** @var USER_LDAP */
/** @var User_LDAP */
protected $backend;
/** @var string */

View File

@ -24,7 +24,7 @@ namespace OCA\user_ldap\tests\integration\lib;
use OCA\user_ldap\lib\user\Manager as LDAPUserManager;
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\user_ldap\USER_LDAP;
use OCA\User_LDAP\User_LDAP;
require_once __DIR__ . '/../../../../../lib/base.php';

View File

@ -24,7 +24,7 @@ namespace OCA\user_ldap\tests\integration\lib;
use OCA\user_ldap\lib\user\Manager as LDAPUserManager;
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\user_ldap\USER_LDAP;
use OCA\User_LDAP\User_LDAP;
require_once __DIR__ . '/../../../../../lib/base.php';
@ -32,7 +32,7 @@ class IntegrationTestUserHome extends AbstractIntegrationTest {
/** @var UserMapping */
protected $mapping;
/** @var USER_LDAP */
/** @var User_LDAP */
protected $backend;
/**
@ -46,7 +46,7 @@ class IntegrationTestUserHome extends AbstractIntegrationTest {
$this->mapping = new UserMapping(\OC::$server->getDatabaseConnection());
$this->mapping->clear();
$this->access->setUserMapper($this->mapping);
$this->backend = new \OCA\user_ldap\USER_LDAP($this->access, \OC::$server->getConfig());
$this->backend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig());
}
/**

View File

@ -24,7 +24,7 @@ namespace OCA\user_ldap\tests\integration\lib;
use OCA\user_ldap\lib\user\Manager as LDAPUserManager;
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\user_ldap\USER_LDAP;
use OCA\User_LDAP\User_LDAP;
require_once __DIR__ . '/../../../../../lib/base.php';
@ -32,7 +32,7 @@ class IntegrationTestPaging extends AbstractIntegrationTest {
/** @var UserMapping */
protected $mapping;
/** @var USER_LDAP */
/** @var User_LDAP */
protected $backend;
/**
@ -43,7 +43,7 @@ class IntegrationTestPaging extends AbstractIntegrationTest {
require(__DIR__ . '/../setup-scripts/createExplicitUsers.php');
parent::init();
$this->backend = new \OCA\user_ldap\USER_LDAP($this->access, \OC::$server->getConfig());
$this->backend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig());
}
/**

View File

@ -24,7 +24,7 @@ namespace OCA\user_ldap\tests\integration\lib;
use OCA\user_ldap\lib\user\Manager as LDAPUserManager;
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\user_ldap\USER_LDAP;
use OCA\User_LDAP\User_LDAP;
require_once __DIR__ . '/../../../../../lib/base.php';
@ -32,7 +32,7 @@ class IntegrationTestUserHome extends AbstractIntegrationTest {
/** @var UserMapping */
protected $mapping;
/** @var USER_LDAP */
/** @var User_LDAP */
protected $backend;
/**
@ -46,7 +46,7 @@ class IntegrationTestUserHome extends AbstractIntegrationTest {
$this->mapping = new UserMapping(\OC::$server->getDatabaseConnection());
$this->mapping->clear();
$this->access->setUserMapper($this->mapping);
$this->backend = new \OCA\user_ldap\USER_LDAP($this->access, \OC::$server->getConfig());
$this->backend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig());
}
/**

View File

@ -40,7 +40,7 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest {
$this->mapping = new UserMapping(\OC::$server->getDatabaseConnection());
$this->mapping->clear();
$this->access->setUserMapper($this->mapping);
$userBackend = new OCA\user_ldap\USER_LDAP($this->access, \OC::$server->getConfig());
$userBackend = new OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig());
\OC_User::useBackend($userBackend);
}

View File

@ -38,7 +38,7 @@ class IntegrationTestUserDisplayName extends AbstractIntegrationTest {
$this->mapping = new UserMapping(\OC::$server->getDatabaseConnection());
$this->mapping->clear();
$this->access->setUserMapper($this->mapping);
$userBackend = new OCA\user_ldap\USER_LDAP($this->access, \OC::$server->getConfig());
$userBackend = new OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig());
\OC_User::useBackend($userBackend);
}

View File

@ -26,7 +26,7 @@ class Test_CleanUp extends \PHPUnit_Framework_TestCase {
public function getMocks() {
$mocks = array();
$mocks['userBackend'] =
$this->getMockBuilder('\OCA\user_ldap\User_Proxy')
$this->getMockBuilder('\OCA\User_LDAP\User_Proxy')
->disableOriginalConstructor()
->getMock();
$mocks['deletedUsersIndex'] =

View File

@ -27,7 +27,7 @@ namespace OCA\user_ldap\tests;
use \OCA\user_ldap\lib\Wizard;
// use \OCA\user_ldap\USER_LDAP as UserLDAP;
// use \OCA\user_ldap\User_LDAP as UserLDAP;
// use \OCA\user_ldap\lib\Access;
// use \OCA\user_ldap\lib\Configuration;
// use \OCA\user_ldap\lib\ILDAPWrapper;