/** * Initializes internal state of Book object. * @see parent::__construct() */ public function __construct() { // Make sure that parent constructor is always invoked, since that // is where any default values for this object are set. parent::__construct(); }
/** * Returns a peer instance associated with this om. * * Since Peer classes are not to have any instance attributes, this method returns the * same instance for all member of this class. The method could therefore * be static, but this would prevent one from overriding the behavior. * * @return BookPeer */ public function getPeer() { if (self::$peer === null) { self::$peer = new BookPeer(); } return self::$peer; }
protected static function buildFieldsList($main_query = false, $mi = 'mi', $format = null, $sort = null, $custom_fields = null) { if ($main_query) { $data_fields_list = array('m.author', 'm.activities', 'm.editor', 'm.book_types', 'm.langs', 'm.publication_date'); } else { $data_fields_list = array(); } $base_fields_list = parent::buildFieldsList($main_query, $mi, $format, $sort, $custom_fields); return array_merge($base_fields_list, $data_fields_list); }