This file contains hidden or 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 | |
/* | |
* If you get any part of this process wrong, Google gives the really helpful error message "invalid JWT provided". | |
* | |
* Mozilla (Firefox) gives a slightly just-as-useful error: | |
* { | |
* "code": 401, "errno": 109, "error": "Unauthorized", | |
* "more_info": "http://autopush.readthedocs.io/en/latest/http.html#error-codes", | |
* "message": "Request did not validate Invalid Authorization Header" |
This file contains hidden or 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 | |
class BinarySearchTree { | |
private $_root; | |
public function __construct() { | |
// setup sentinal node | |
$this->_root = new BinarySearchNode(null); | |
} | |
public function getRoot() { | |
return $this->hasNode() ? $this->_root->right : null; |