Change private properties to protected

This commit is contained in:
Frederic Guillot
2016-01-13 21:02:32 -05:00
parent 2d85e0fab7
commit f9c676cf81
10 changed files with 36 additions and 34 deletions

View File

@@ -15,10 +15,10 @@ class Client
/** /**
* LDAP resource * LDAP resource
* *
* @access private * @access protected
* @var resource * @var resource
*/ */
private $ldap; protected $ldap;
/** /**
* Establish LDAP connection * Establish LDAP connection

View File

@@ -13,10 +13,10 @@ class Entries
/** /**
* LDAP entries * LDAP entries
* *
* @access private * @access protected
* @var array * @var array
*/ */
private $entries = array(); protected $entries = array();
/** /**
* Constructor * Constructor

View File

@@ -13,10 +13,10 @@ class Entry
/** /**
* LDAP entry * LDAP entry
* *
* @access private * @access protected
* @var array * @var array
*/ */
private $entry = array(); protected $entry = array();
/** /**
* Constructor * Constructor

View File

@@ -16,10 +16,10 @@ class Group
/** /**
* Query * Query
* *
* @access private * @access protected
* @var Query * @var Query
*/ */
private $query; protected $query;
/** /**
* Constructor * Constructor
@@ -43,7 +43,8 @@ class Group
*/ */
public static function getGroups(Client $client, $query) public static function getGroups(Client $client, $query)
{ {
$self = new self(new Query($client)); $className = get_called_class();
$self = new $className(new Query($client));
return $self->find($query); return $self->find($query);
} }

View File

@@ -13,18 +13,18 @@ class Query
/** /**
* LDAP client * LDAP client
* *
* @access private * @access protected
* @var Client * @var Client
*/ */
private $client = null; protected $client = null;
/** /**
* Query result * Query result
* *
* @access private * @access protected
* @var array * @var array
*/ */
private $entries = array(); protected $entries = array();
/** /**
* Constructor * Constructor

View File

@@ -17,10 +17,10 @@ class User
/** /**
* Query * Query
* *
* @access private * @access protected
* @var Query * @var Query
*/ */
private $query; protected $query;
/** /**
* Constructor * Constructor
@@ -44,7 +44,8 @@ class User
*/ */
public static function getUser(Client $client, $username) public static function getUser(Client $client, $username)
{ {
$self = new self(new Query($client)); $className = get_called_class();
$self = new $className(new Query($client));
return $self->find($self->getLdapUserPattern($username)); return $self->find($self->getLdapUserPattern($username));
} }

View File

@@ -15,10 +15,10 @@ class DatabaseUserProvider implements UserProviderInterface
/** /**
* User properties * User properties
* *
* @access private * @access protected
* @var array * @var array
*/ */
private $user = array(); protected $user = array();
/** /**
* Constructor * Constructor

View File

@@ -15,50 +15,50 @@ class LdapUserProvider implements UserProviderInterface
/** /**
* LDAP DN * LDAP DN
* *
* @access private * @access protected
* @var string * @var string
*/ */
private $dn; protected $dn;
/** /**
* LDAP username * LDAP username
* *
* @access private * @access protected
* @var string * @var string
*/ */
private $username; protected $username;
/** /**
* User name * User name
* *
* @access private * @access protected
* @var string * @var string
*/ */
private $name; protected $name;
/** /**
* Email * Email
* *
* @access private * @access protected
* @var string * @var string
*/ */
private $email; protected $email;
/** /**
* User role * User role
* *
* @access private * @access protected
* @var string * @var string
*/ */
private $role; protected $role;
/** /**
* Group LDAP DNs * Group LDAP DNs
* *
* @access private * @access protected
* @var string[] * @var string[]
*/ */
private $groupIds; protected $groupIds;
/** /**
* Constructor * Constructor

View File

@@ -23,10 +23,10 @@ abstract class OAuthUserProvider implements UserProviderInterface
/** /**
* User properties * User properties
* *
* @access private * @access protected
* @var array * @var array
*/ */
private $user = array(); protected $user = array();
/** /**
* Constructor * Constructor

View File

@@ -16,10 +16,10 @@ class ReverseProxyUserProvider implements UserProviderInterface
/** /**
* Username * Username
* *
* @access private * @access protected
* @var string * @var string
*/ */
private $username = ''; protected $username = '';
/** /**
* Constructor * Constructor