/** * Constructor */ public function __construct($token, $baseUrl) { parent::__construct($token, $baseUrl); // API Endpoints $this->projects = new Endpoints\Projects($this); $this->users = new Endpoints\Users($this); $this->milestones = new Endpoints\Milestones($this); $this->tasks = new Endpoints\Tasks($this); $this->userStories = new Endpoints\UserStories($this); }
/** * API constructor. * @param array $options */ public function __construct($options = array()) { $defaultOptions = array('x' => false, 'vvv' => false); $this->cronOptions = array_merge($defaultOptions, $options); if ($this->cronOptions['x']) { $this->API_URL = 'http://localhost:8080'; } $this->vvv('Cronalytics API constructed', $this->cronOptions); $this->vvv('default headers', $this->getDefaultHeaders()); parent::__construct(); }