Skip to content

Commit 841ac58

Browse files
committed
add methods to toggle and query debug mode
1 parent 1c5495a commit 841ac58

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
Tiny script to crawl information of a specific application in the Google play/store base on PHP.
44

55
## PHP GooglePlay Methods
6-
76
- `parse`: mostly used internally – but can be used to parse any URL or text for valid Play Store app links and return their packageNames
87
- `parseSearch`: search for apps by given terms
98
- `parseSimilar`: search for what Google Play considers apps similar to the one specified
@@ -14,10 +13,10 @@ Tiny script to crawl information of a specific application in the Google play/st
1413
- `parseCategories`: list available categories
1514
- `parseApplication`: get details for a specific app
1615
- `parsePerms`: retrieve permissions requested by a specific app
17-
16+
- `setDebug`: turn debug mode on or off
17+
- `getDebug`: check whether debug mode is turned on or off
1818

1919
## Using PHP GooglePlay
20-
2120
```php
2221
<?php
2322
require "google-play.php";

google-play.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@ class GooglePlay {
1414
private $input = ''; // content retrieved from remote
1515
private $lastError = '';
1616

17+
/** Turn debug mode on or off
18+
* @method public setDebug
19+
* @param bool debug turn debug mode on (true) or off (false)
20+
*/
21+
public function setDebug($debug) {
22+
$this->debug = (bool) $debug;
23+
}
24+
25+
/** Check whether debug mode is enabled
26+
* @method public getDebug
27+
* @return bool debug whether debug mode is turned on (true) or off (false)
28+
*/
29+
public function getDebug() {
30+
return $this->debug;
31+
}
32+
1733
/** Parse a given RegEx and return the match marked by '(?<content>)'
1834
* @method protected getRegVal
1935
* @param string regEx regular expression to parse

0 commit comments

Comments
 (0)