Xcache.php
1.58 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
namespace Phalcon\Mvc\Model\MetaData {
/**
* Phalcon\Mvc\Model\MetaData\Xcache
*
* Stores model meta-data in the XCache cache. Data will erased if the web server is restarted
*
* By default meta-data is stored for 48 hours (172800 seconds)
*
* You can query the meta-data by printing xcache_get('$PMM$') or xcache_get('$PMM$my-app-id')
*
*<code>
* $metaData = new Phalcon\Mvc\Model\Metadata\Xcache(array(
* 'prefix' => 'my-app-id',
* 'lifetime' => 86400
* ));
*</code>
*/
class Xcache extends \Phalcon\Mvc\Model\MetaData implements \Phalcon\DI\InjectionAwareInterface, \Phalcon\Mvc\Model\MetaDataInterface {
const MODELS_ATTRIBUTES = 0;
const MODELS_PRIMARY_KEY = 1;
const MODELS_NON_PRIMARY_KEY = 2;
const MODELS_NOT_NULL = 3;
const MODELS_DATA_TYPES = 4;
const MODELS_DATA_TYPES_NUMERIC = 5;
const MODELS_DATE_AT = 6;
const MODELS_DATE_IN = 7;
const MODELS_IDENTITY_COLUMN = 8;
const MODELS_DATA_TYPES_BIND = 9;
const MODELS_AUTOMATIC_DEFAULT_INSERT = 10;
const MODELS_AUTOMATIC_DEFAULT_UPDATE = 11;
const MODELS_COLUMN_MAP = 0;
const MODELS_REVERSE_COLUMN_MAP = 1;
protected $_prefix;
protected $_ttl;
/**
* \Phalcon\Mvc\Model\MetaData\Xcache constructor
*
* @param array $options
*/
public function __construct($options=null){ }
/**
* Reads metadata from XCache
*
* @param string $key
* @return array
*/
public function read($key){ }
/**
* Writes the metadata to XCache
*
* @param string $key
* @param array $data
*/
public function write($key, $data){ }
}
}