*
* @see DB_DataObject
*/
-
-class Notice_title extends Memcached_DataObject
+class Notice_title extends Managed_DataObject
{
const MAXCHARS = 255;
public $notice_id; // int(4) primary_key not_null
public $title; // varchar(255)
- /**
- * Get an instance by key
- *
- * This is a utility method to get a single instance with a given key value.
- *
- * @param string $k Key to use to lookup (usually 'user_id' for this class)
- * @param mixed $v Value to lookup
- *
- * @return Notice_title object found, or null for no hits
- *
- */
-
- function staticGet($k, $v=null)
- {
- return Memcached_DataObject::staticGet('Notice_title', $k, $v);
- }
-
/**
* return table definition for DB_DataObject
*
*
* @return array array of column definitions
*/
-
function table()
{
return array('notice_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
*
* @return array list of key field names
*/
-
function keys()
{
return array_keys($this->keyTypes());
*
* @return array list mapping field names to key types
*/
-
function keyTypes()
{
return array('notice_id' => 'K');
*
* @return array magic three-false array that stops auto-incrementing.
*/
-
function sequenceKey()
{
return array(false, false, false);
*
* @return string title of the notice, or null if none
*/
-
static function fromNotice($notice)
{
$nt = Notice_title::staticGet('notice_id', $notice->id);