1 | <?php |
||
13 | class Client extends GenericClient |
||
14 | { |
||
15 | const STATUS_OK_REPORT_RECORDED = 'OK_REPORT_RECORDED'; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $serverBaseUri = 'http://rucaptcha.com'; |
||
21 | |||
22 | /** |
||
23 | * Your application ID in Rucaptcha catalog. |
||
24 | * The value `1013` is ID of this library. Set in false if you want to turn off sending any ID. |
||
25 | * @see https://rucaptcha.com/software/view/php-api-client |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $softId = '1013'; |
||
29 | |||
30 | /** |
||
31 | * @inheritdoc |
||
32 | */ |
||
33 | public function sendCaptcha($content, array $extra = []) |
||
40 | |||
41 | /** |
||
42 | * Bulk captcha result. |
||
43 | * |
||
44 | * @param int[] $captchaIds # Captcha task Ids array |
||
45 | * @return string[] # Array $captchaId => $captchaText or false if is not ready |
||
46 | * @throws RuntimeException |
||
47 | */ |
||
48 | public function getCaptchaResultBulk(array $captchaIds) |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | public function getBalance() |
||
81 | |||
82 | /** |
||
83 | * @param $captchaId |
||
84 | * @return bool |
||
85 | * @throws RuntimeException |
||
86 | */ |
||
87 | public function badCaptcha($captchaId) |
||
98 | |||
99 | /** |
||
100 | * @param string|array $paramsList |
||
101 | * @return array |
||
102 | */ |
||
103 | public function getLoad($paramsList = ['waiting', 'load', 'minbid', 'averageRecognitionTime']) |
||
119 | |||
120 | /** |
||
121 | * @return \SimpleXMLElement |
||
122 | */ |
||
123 | public function getLoadXml() |
||
131 | |||
132 | /** |
||
133 | * @param string $captchaId # Captcha task ID |
||
134 | * @return array | false # Solved captcha and cost array or false if captcha is not ready |
||
135 | * @throws RuntimeException |
||
136 | */ |
||
137 | public function getCaptchaResultWithCost($captchaId) |
||
158 | } |
||
159 |