]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - classes/Status_network_tag.php
Merge branch 'master' into testing
[quix0rs-gnu-social.git] / classes / Status_network_tag.php
1 <?php
2 /*
3  * StatusNet - the distributed open-source microblogging tool
4  * Copyright (C) 2008, 2009, 2010 StatusNet, Inc.
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Affero General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU Affero General Public License for more details.
15  *
16  * You should have received a copy of the GNU Affero General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19
20 if (!defined('STATUSNET')) { exit(1); }
21
22 class Status_network_tag extends Safe_DataObject
23 {
24     ###START_AUTOCODE
25     /* the code below is auto generated do not remove the above tag */
26
27     public $__table = 'status_network_tag';                      // table name
28     public $site_id;                  // int(4)  primary_key not_null
29     public $tag;                      // varchar(64)  primary_key not_null 
30     public $created;                 // datetime()   not_null
31
32
33     function __construct()
34     {
35         global $config;
36         global $_DB_DATAOBJECT;
37         
38         $sn = new Status_network();
39         $sn->_connect();
40
41         $config['db']['table_'. $this->__table] = $sn->_database;
42
43         $this->_connect();
44     }
45
46
47     /* Static get */
48     function staticGet($k,$v=null)
49     {
50         $i = DB_DataObject::staticGet('Status_network_tag',$k,$v);
51
52         // Don't use local process cache; if we're fetching multiple
53         // times it's because we're reloading it in a long-running
54         // process; we need a fresh copy!
55         global $_DB_DATAOBJECT;
56         unset($_DB_DATAOBJECT['CACHE']['status_network_tag']);
57         return $i;
58     }
59
60     /* the code above is auto generated do not remove the tag below */
61     ###END_AUTOCODE
62
63
64
65     function pkeyGet($kv)
66     {
67         return Memcached_DataObject::pkeyGet('Status_network_tag', $kv);
68     }
69 }