]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - classes/Unavailable_status_network.php
Merge branch 'master' into testing
[quix0rs-gnu-social.git] / classes / Unavailable_status_network.php
1 <?php
2 /**
3  * Data class for unavailable status networks
4  *
5  * PHP version 5
6  *
7  * @category Data
8  * @package  StatusNet
9  * @author   Evan Prodromou <evan@status.net>
10  * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
11  * @link     http://status.net/
12  *
13  * StatusNet - the distributed open-source microblogging tool
14  * Copyright (C) 2011, StatusNet, Inc.
15  *
16  * This program is free software: you can redistribute it and/or modify
17  * it under the terms of the GNU Affero General Public License as published by
18  * the Free Software Foundation, either version 3 of the License, or
19  * (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the
24  * GNU Affero General Public License for more details.
25  *
26  * You should have received a copy of the GNU Affero General Public License
27  * along with this program. If not, see <http://www.gnu.org/licenses/>.
28  */
29
30 if (!defined('STATUSNET')) {
31     exit(1);
32 }
33
34 /**
35  * Keeps a list of unavailable status network names
36  *
37  * @category Data
38  * @package  StatusNet
39  * @author   Evan Prodromou <evan@status.net>
40  * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
41  * @link     http://status.net/
42  *
43  * @see      Managed_DataObject
44  */
45
46 class Unavailable_status_network extends Managed_DataObject
47 {
48     public $__table = 'unavailable_status_network'; // table name
49
50     public $nickname;              // varchar(64) UUID
51     public $created;               // datetime
52
53     /**
54      * Get an instance by key
55      *
56      * @param string $k Key to use to lookup (usually 'id' for this class)
57      * @param mixed  $v Value to lookup
58      *
59      * @return Happening object found, or null for no hits
60      *
61      */
62     function staticGet($k, $v=null)
63     {
64         return Memcached_DataObject::staticGet('Unavailable_status_network', $k, $v);
65     }
66
67     /**
68      * The One True Thingy that must be defined and declared.
69      */
70     public static function schemaDef()
71     {
72         return array(
73             'description' => 'An unavailable status network nickname',
74             'fields' => array(
75                 'nickname' => array('type' => 'varchar',
76                                     'length' => 64,
77                                     'not null' => true, 'description' => 'nickname not to use'),
78                 'created' => array('type' => 'datetime',
79                                    'not null' => true),
80             ),
81             'primary key' => array('nickname'),
82         );
83     }
84 }