public function getRequestCredentials()
    {
        if ($this->requestCredentials === null) {
            $this->requestCredentials = function () {
                $credentials = [];

                if (isset($_SERVER['PHP_AUTH_USER'])) {
                    $credentials['login'] = $_SERVER['PHP_AUTH_USER'];
                }

                if (isset($_SERVER['PHP_AUTH_PW'])) {
                    $credentials['password'] = $_SERVER['PHP_AUTH_PW'];
                }

                if (count($credentials) > 0) {
                    return $credentials;
                }
            };
        }

        $credentials = $this->requestCredentials;

        return $credentials();
    }
public function getRequestCredentials()
    {
        if ($this->requestCredentials === null) {
            $this->requestCredentials = function () {
                $credentials = [];

                if (isset($_SERVER['PHP_AUTH_USER'])) {
                    $credentials['login'] = $_SERVER['PHP_AUTH_USER'];
                }

                if (isset($_SERVER['PHP_AUTH_PW'])) {
                    $credentials['password'] = $_SERVER['PHP_AUTH_PW'];
                }

                if (count($credentials) > 0) {
                    return $credentials;
                }
            };
        }

        $credentials = $this->requestCredentials;

        return $credentials();
    }
public function getRequestCredentials ( ) { if ( $ this -> requestCredentials === null ) { $ this -> requestCredentials = function ( ) { $ credentials = [ ] ; if ( isset ( $ _SERVER [ 'PHP_AUTH_USER' ] ) ) { $ credentials [ 'login' ] = $ _SERVER [ 'PHP_AUTH_USER' ] ; } if ( isset ( $ _SERVER [ 'PHP_AUTH_PW' ] ) ) { $ credentials [ 'password' ] = $ _SERVER [ 'PHP_AUTH_PW' ] ; } if ( count ( $ credentials ) > 0 ) { return $ credentials ; } } ; } $ credentials = $ this -> requestCredentials ; return $ credentials ( ) ; }
Returns the request credentials.

@return array
Returns the request credentials .