-
Notifications
You must be signed in to change notification settings - Fork 1
/
bitly_app_model.php
52 lines (47 loc) · 1.19 KB
/
bitly_app_model.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* Bitly Plugin App Model
*
* Configures all models in the plugin with respect to the datasource and table
*
* @author Neil Crookes <[email protected]>
* @link http://www.neilcrookes.com
* @copyright (c) 2010 Neil Crookes
* @license MIT License - http://www.opensource.org/licenses/mit-license.php
*/
class BitlyAppModel extends AppModel {
/**
* The datasource all models in this plugin use
*
* @var string
*/
var $useDbConfig = 'bitly';
/**
* The models in the plugin get data from the web service, so they don't need
* a table.
*
* @var string
*/
var $useTable = false;
/**
* The methods in the models affect this request property which is then used
* in the datasource. The request property value set in each of the methods is
* in the format of HttpSocket::request.
*
* @var array
*/
var $request = array();
/**
* Overloads the Model::find() method. Resets request array in between calls
* to Model::find()
*
* @param string $type
* @param array $options
* @return mixed
*/
public function find($type, $options = array()) {
$this->request = array();
return parent::find($type, $options);
}
}
?>