Requests_Auth_Basic::__construct( array|null $args = null )

Constructor


Parameters

$args array|null Optional
Array of user and password. Must have exactly two elements

Default: null


Top ↑

Source

File: wp-includes/Requests/Auth/Basic.php. View all references

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;
	}
}


Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.