<?php
/**
*
* Example for testing a model of "comments" on nodes.
*
* @category Solar
*
* @package Mock_Solar
*
* @author Paul M. Jones <hide@address.com>
*
* @license http://opensource.org/licenses/bsd-license.php BSD
*
* @version $Id: Comments.php 4489 2010-03-02 15:34:14Z pmjones $
*
*/
class Mock_Solar_Model_Comments extends Solar_Sql_Model
{
/**
*
* Establish state of this object prior to _setup().
*
* @return void
*
*/
protected function _preSetup()
{
// chain to parent
parent::_preSetup();
// use metadata generated from make-model
$metadata = Solar::factory('Mock_Solar_Model_Comments_Metadata');
$this->_table_name = $metadata->table_name;
$this->_table_cols = $metadata->table_cols;
$this->_index_info = $metadata->index_info;
}
/**
*
* Model-specific setup.
*
* @return void
*
*/
protected function _setup()
{
parent::_setup();
$this->_belongsTo('node');
}
}