/pdf/code/trunk/administrator/components/com_artofpdf/tables/pdf.php
PHP | 126 lines | 38 code | 19 blank | 69 comment | 3 complexity | 64ea5fbf600eceb7e4ad9e95e379ebbb MD5 | raw file
- <?php
- /**
- * @version $Id: pdf.php 288 2010-09-27 21:45:36Z eddieajau $
- * @package NewLifeInIT
- * @subpackage com_artofpdf
- * @copyright Copyright 2010 New Life in IT Pty Ltd. All rights reserved.
- * @license GNU General Public License version 2 or later.
- * @link http://www.theartofjoomla.com
- */
- // No direct access
- defined('_JEXEC') or die;
- /**
- * @package NewLifeInIT
- * @subpackage com_artofpdf
- * @since 1.0
- */
- class ArtofPdfTablePdf extends JTable
- {
- /**
- * @var int
- */
- public $id = null;
- /**
- * @var varchar
- */
- public $title = null;
- /**
- * @var varchar
- */
- public $subject = null;
- /**
- * @var varchar
- */
- public $keywords = null;
- /**
- * @var varchar
- */
- public $style = null;
- /**
- * @var varchar
- */
- public $data = null;
- /**
- * @var varchar
- */
- public $params = null;
- /**
- * @var int
- */
- public $published = null;
- /**
- * @var int
- */
- public $access = null;
- /**
- * @var datetime
- */
- public $build_time = null;
- /*
- * Constructor
- *
- * @param object Database object
- *
- * @return ArtofTablePdfs
- * @since 1.0
- */
- function __construct(&$db)
- {
- parent::__construct('#__artof_pdfs', 'id', $db);
- }
- /**
- * Binds a named array/hash to this object
- *
- * Can be overloaded/supplemented by the child class
- *
- * @param mixed $from An associative array or object
- * @param mixed $ignore An array or space separated list of fields not to bind
- *
- * @return boolean
- * @since 1.0
- */
- public function bind($from, $ignore = array())
- {
- if (!($result = parent::bind($from, $ignore))) {
- return $result;
- }
- if (is_array($this->params)) {
- $this->params = json_encode($this->params);
- }
- return $result;
- }
- /*
- * Check the internal data for of the object.
- *
- * @return boolean
- * @since 1.0
- */
- function check()
- {
- $this->title = trim($this->title);
- if (empty($this->title)) {
- $this->setError('COM_ARTOFPDF_ERROR_NO_TITLE');
- return false;
- }
- return true;
- }
- }