Created
July 17, 2012 19:29
-
-
Save bakura10/3131450 to your computer and use it in GitHub Desktop.
Common\Authentication\Options\Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Common\Authentication\Options; | |
use Zend\Stdlib\AbstractOptions; | |
class Configuration extends AbstractOptions | |
{ | |
/** | |
* Entity's class name | |
* | |
* @var string | |
*/ | |
protected $identityClass; | |
/** | |
* Callable function to use in order to restrict what to store in the storage adapter | |
* | |
* @var mixed | |
*/ | |
protected $identityCallable; | |
/** | |
* Callable function to check if a credential is valid | |
* | |
* @var mixed | |
*/ | |
protected $credentialCallable; | |
/** | |
* Property to use for the identity | |
* | |
* @var string | |
*/ | |
protected $identityProperty = 'username'; | |
/** | |
* Property to use for the credential | |
* | |
* @var string | |
*/ | |
protected $credentialProperty = 'password'; | |
/** | |
* @param string $identityClass | |
* @return Configuration | |
*/ | |
public function setIdentityClass($identityClass) | |
{ | |
$this->identityClass = $identityClass; | |
return $this; | |
} | |
/** | |
* @return string | |
*/ | |
public function getIdentityClass() | |
{ | |
return $this->identityClass; | |
} | |
/** | |
* @param mixed $identityCallable | |
* @return Configuration | |
*/ | |
public function setIdentityCallable($identityCallable) | |
{ | |
$this->identityCallable = $identityCallable; | |
return $this; | |
} | |
/** | |
* @return mixed | |
*/ | |
public function getIdentityCallable() | |
{ | |
return $this->identityCallable; | |
} | |
/** | |
* @param mixed $credentialCallable | |
* @return Configuration | |
*/ | |
public function setCredentialCallable($credentialCallable) | |
{ | |
$this->credentialCallable = $credentialCallable; | |
return $this; | |
} | |
/** | |
* @return mixed | |
*/ | |
public function getCredentialCallable() | |
{ | |
return $this->credentialCallable; | |
} | |
/** | |
* @param string $identityProperty | |
* @return Configuration | |
*/ | |
public function setIdentityProperty($identityProperty) | |
{ | |
$this->identityProperty = $identityProperty; | |
return $this; | |
} | |
/** | |
* @return string | |
*/ | |
public function getIdentityProperty() | |
{ | |
return $this->identityProperty; | |
} | |
/** | |
* @param string $credentialProperty | |
* @return Configuration | |
*/ | |
public function setCredentialProperty($credentialProperty) | |
{ | |
$this->credentialProperty = $credentialProperty; | |
return $this; | |
} | |
/** | |
* @return string | |
*/ | |
public function getCredentialProperty() | |
{ | |
return $this->credentialProperty; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment