Requests_Auth_Basic::__construct() public WP 1.0
Constructor
{} It's a method of the class: Requests_Auth_Basic{}
No Hooks.
Return
Null. Nothing.
Usage
$Requests_Auth_Basic = new Requests_Auth_Basic(); $Requests_Auth_Basic->__construct( $args );
- $args(array/null)
- Array of user and password. Must have exactly two elements
Default: null
Code of Requests_Auth_Basic::__construct() Requests Auth Basic:: construct WP 5.6
public function __construct($args = null) {
if (is_array($args)) {
if (count($args) !== 2) {
throw new Requests_Exception('Invalid number of arguments', 'authbasicbadargs');
}
list($this->user, $this->pass) = $args;
}
}