Location: PHPKode > projects > Pygalle > admin/tables/contact.php
<?php
/**
 * @package		Pygalle
 * @copyright	Copyright (C) 2009 Erik Finnegan. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * @author 		hide@address.com
 * Joomla! and Pygalle EVE Corporate Intranet are free software.
 * This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */

// Check to ensure this file is within the rest of the framework
defined( '_JEXEC' ) or die( 'Restricted access' );

pyimport( 'tables.table');

/**
 * This class wraps the standard joomla contact model.
 * It extends the regular JTable model by the ability to handle 
 * multiple contact objects.
 * 
 * It handles its table rows by the user_id column (=josId) !
 */
class PyTableContact extends PyTable {
	
	/** @var unique id **/
	var $id                 = 0;

	var $published 			= 0;
	/** @var int */
	var $checked_out 		= 0;
	/** @var datetime */
	var $checked_out_time 	= 0;
	/** @var int */
	var $ordering 			= null;
	/** @var string */
	var $params 				= null;
	/** @var int A link to a registered user */
	var $user_id 			= null;
	/** @var int A link to a category */
	var $catid 				= null;
	/** @var int */
	var $access 				= null;
	/** @var string Mobile phone number(s) */
	var $mobile 				= null;

	function __construct( &$dbo)
	{
		parent::__construct( '#__contact_details', 'id', $dbo );
		$this->setForeignKey( 'user_id');
	}
	
	function &getInstance( array $config) {
		return PyTable::getInstance( 'contact', $config);
	}
	
	/**
	 * Get all contacts with mobile numbers set
	 * @return array 
	 */
	function getPilotsWithMobileNumbers() {
		$result = $this->getEntriesWithColumnNotEmpty( 'mobile');
		
		return $result;
	}
}
?>
Return current item: Pygalle