Sindbad~EG File Manager

Current Path : /var/www/ispania.gr/components/com_rsdirectory/models/
Upload File :
Current File : /var/www/ispania.gr/components/com_rsdirectory/models/transaction.php

<?php
/**
 * @package	RSDirectory!
 * @copyright	(c) 2013 - 2021 RSJoomla!
 * @link		https://www.rsjoomla.com
 * @license	GNU General Public License http://www.gnu.org/licenses/gpl-3.0.en.html
 */

// No direct access.
defined('_JEXEC') or die('Restricted access');

/**
 * Transaction model.
 */
class RSDirectoryModelTransaction extends JModelItem
{
    protected $document;
    /**
     * Model context string.
     *
     * @var string
     */
    protected $_context = 'com_rsdirectory.transaction';
        
    /**
     * Method to get a table object, load it if necessary.
     * 
     * @access public
     * 
     * @param string $type
     * @param string $prefix
     * @param array $config
     * 
     * @return object
     */
    public function getTable( $type = 'Transaction', $prefix = 'RSDirectoryTable', $config = array() )
    {
		JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_rsdirectory/tables');
			
		return JTable::getInstance($type, $prefix, $config);
    }
        
    /**
     * Method to get a single record.
     *
     * @access public
     *
     * @param int $pk The id of the primary key.
     *
     * @return mixed Object on success, false on failure.
     */
    public function getItem($pk = null)
    {
		// Get the id of the primary key.
		$pk = $pk ? $pk : JFactory::getApplication()->input->getInt('id');
			
		$table = $this->getTable();
		$table->load( array( 'id' => $pk, 'user_id' => JFactory::getUser()->id ) );
			
		return $table->id ? $table : null;
    }
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists