/var/www/hkosl.com/securexpert/vendor/dapphp/securimage/StorageAdapter/AdapterInterface.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php

namespace Securimage\StorageAdapter;

interface 
AdapterInterface
{
    
/**
     * Store a captcha
     *
     * @return bool true if saved, false otherwise
     */
    
public function store($captchaId$captchaInfo);

    
/**
     * Store captcha audio data to the adapter
     *
     * @param string $captchaId  The captcha ID to save audio data for
     * @param string $audioData  The binary audio data tos save
     * @return bool  true if data saved, false otherwise
     */
    
public function storeAudioData($captchaId$audioData);

    
/**
     * Fetch a captcha and data
     *
     * @param string $captchaId The captcha ID to fetch info for
     * @param int    $what      What info to retrieve (e.g. code, image data, all)
     * @return mixed false on failure, captcha info otherwise
     */
    
public function get($captchaId$what null);

    
/**
     * Delete captcha data from the store
     *
     * @return bool true if deleted (or doesn't exist), false otherwise
     */
    
public function delete($captchaId);
}