diff --git a/Billogram/Api.php b/Billogram/Api.php index fd85bcc..9906cf2 100644 --- a/Billogram/Api.php +++ b/Billogram/Api.php @@ -61,19 +61,19 @@ class Api const API_URL_BASE = "https://billogram.com/api/v2"; const USER_AGENT = "Billogram API PHP Library/1.11"; - private $authUser; - private $authKey; - private $apiBase; - private $userAgent; - private $extraHeaders; - - private $itemsConnector; - private $customersConnector; - private $billogramConnector; - private $settingsConnector; - private $logotypeConnector; - private $reportsConnector; - private $creditorsConnector; + protected $authUser; + protected $authKey; + protected $apiBase; + protected $userAgent; + protected $extraHeaders; + + protected $itemsConnector; + protected $customersConnector; + protected $billogramConnector; + protected $settingsConnector; + protected $logotypeConnector; + protected $reportsConnector; + protected $creditorsConnector; /** * Create a Billogram API connection object @@ -107,7 +107,7 @@ public function __construct( * de-encoded data. * */ - private function checkApiResponse($response, $expectContentType = null) + protected function checkApiResponse($response, $expectContentType = null) { if (!$response->ok || $expectContentType == null) $expectContentType = 'application/json'; @@ -206,7 +206,7 @@ private function checkApiResponse($response, $expectContentType = null) * object with statusCode, status, content and the received headers. * */ - private function httpRequest( + protected function httpRequest( $url, $request, $data = array(), @@ -280,7 +280,7 @@ private function httpRequest( * Returns an Authorization header to be used for the httpRequest method. * */ - private function authHeader() + protected function authHeader() { $auth = base64_encode($this->authUser . ":" . $this->authKey); diff --git a/Billogram/Api/Query.php b/Billogram/Api/Query.php index 884adf0..ac18aad 100644 --- a/Billogram/Api/Query.php +++ b/Billogram/Api/Query.php @@ -44,12 +44,12 @@ */ class Query { - private $typeClass; - private $filter = array(); - private $countCached = null; - private $pageSize = 100; - private $order = array(); - private $api; + protected $typeClass; + protected $filter = array(); + protected $countCached = null; + protected $pageSize = 100; + protected $order = array(); + protected $api; /** * Initiated with the Billogram API object and the parent model as @@ -71,7 +71,7 @@ public function __construct($api, $typeClass) * @param int $pageNumber * @return mixed */ - private function makeQuery($pageNumber = 1) + protected function makeQuery($pageNumber = 1) { $params = array( 'page_size' => $this->pageSize,