Skip to content

Commit b57f835

Browse files
committed
Documentation fix
1 parent 02423b9 commit b57f835

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

lib/ShopifyAPI.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ abstract class ShopifyAPI
4646

4747
/**
4848
* The base URL of the API Resource (excluding the '.json' extension).
49+
*
4950
* Example : https://myshop.myshopify.com/admin/products
5051
*
5152
* @var string
@@ -61,6 +62,7 @@ abstract class ShopifyAPI
6162

6263
/**
6364
* List of child Resource names / classes
65+
*
6466
* If any array item has an associative key => value pair, value will be considered as the resource name
6567
* (by which it will be called) and key will be the associated class name.
6668
*
@@ -84,12 +86,17 @@ abstract class ShopifyAPI
8486

8587
/**
8688
* List of custom GET / POST / PUT / DELETE actions
89+
*
8790
* Custom actions can be used without calling the get(), post(), put(), delete() methods directly
8891
* @example: ['enable', 'disable', 'remove','default' => 'makeDefault']
8992
* Methods can be called like enable(), disable(), remove(), makeDefault() etc.
90-
* If any array item has an associative key => value pair, value will be considered as the method name and key will be the associated path to be used with the action.
93+
* If any array item has an associative key => value pair, value will be considered as the method name
94+
* and key will be the associated path to be used with the action.
9195
*
92-
* @var array
96+
* @var array $customGetActions
97+
* @var array $customPostActions
98+
* @var array $customPutActions
99+
* @var array $customDeleteActions
93100
*/
94101
protected $customGetActions = array();
95102
protected $customPostActions = array();
@@ -98,6 +105,7 @@ abstract class ShopifyAPI
98105

99106
/**
100107
* The ID of the resource
108+
*
101109
* If provided, the actions will be called against that specific resource ID
102110
*
103111
* @var integer
@@ -125,6 +133,7 @@ public function __construct($config, $id = null)
125133

126134
/**
127135
* Return ShopifyAPI instance for the child resource.
136+
*
128137
* @example $shopify->Product($productID)->Image->get(); //Here Product is the parent resource and Image is a child resource
129138
* Called like an object properties (without parenthesis)
130139
*
@@ -139,6 +148,7 @@ public function __get($childName)
139148

140149
/**
141150
* Return ShopifyAPI instance for the child resource or call a custom action for the resource
151+
*
142152
* @example $shopify->Product($productID)->Image($imageID)->get(); //Here Product is the parent resource and Image is a child resource
143153
* Called like an object method (with parenthesis) optionally with the resource ID as the first argument
144154
* @example $shopify->Discount($discountID)->enable(); //Calls custom action enable() on Discount resource
@@ -240,6 +250,7 @@ public function getResourceName()
240250

241251
/**
242252
* Get the resource key to be used for while sending data to the API
253+
*
243254
* Normally its the same as $resourceKey, when it's different, the specific resource class will override this function
244255
*
245256
* @return string
@@ -251,6 +262,7 @@ public function getResourcePostKey()
251262

252263
/**
253264
* Get the pluralized version of the resource key
265+
*
254266
* Normally its the same as $resourceKey appended with 's', when it's different, the specific resource class will override this function
255267
*
256268
* @return string
@@ -262,6 +274,7 @@ protected function pluralizeKey()
262274

263275
/**
264276
* Get the resource path to be used to generate the api url
277+
*
265278
* Normally its the same as the pluralized version of the resource key,
266279
* when it's different, the specific resource class will override this function
267280
*
@@ -450,6 +463,8 @@ public function prepareRequest($dataArray = array())
450463
* @param array $dataArray
451464
* @param string $dataKey
452465
*
466+
* @internal
467+
*
453468
* @return array
454469
*/
455470
protected function wrapData($dataArray, $dataKey = null)
@@ -464,6 +479,8 @@ protected function wrapData($dataArray, $dataKey = null)
464479
*
465480
* @param array $array
466481
*
482+
* @internal
483+
*
467484
* @return string
468485
*/
469486
protected function castString($array)

0 commit comments

Comments
 (0)