Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.

Using protected keyword instead of private #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions Billogram/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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);

Expand Down
14 changes: 7 additions & 7 deletions Billogram/Api/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down