本文整理匯總了PHP中JModelLegacy::getTable方法的典型用法代碼示例。如果您正苦於以下問題:PHP JModelLegacy::getTable方法的具體用法?PHP JModelLegacy::getTable怎麽用?PHP JModelLegacy::getTable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JModelLegacy
的用法示例。
在下文中一共展示了JModelLegacy::getTable方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testGetTable
/**
* Tests the getTable method.
*
* @expectedException Exception
* @todo Implement actual testing for an instantiated JTable class.
*
* @since 12.3
*
* @return void
*/
public function testGetTable()
{
// Try to get a non-existent table
$this->fixture->getTable();
}
示例2: getTable
/**
* Method to get a table object, load it if necessary.
*
* @param string $name The table name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $options Configuration array for model. Optional.
*
* @return JTable A JTable object
*/
public function getTable($name = '', $prefix = 'K2Table', $options = array())
{
require_once JPATH_ADMINISTRATOR . '/components/com_k2/tables/table.php';
K2Table::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_k2/tables');
return parent::getTable($name, $prefix, $options);
}
示例3: testGetTableReturnsJtableObject
/**
* Tests the getTable method.
*
* @since 12.3
*
* @return void
*
* @testdox getTable() returns JTable object
*/
public function testGetTableReturnsJtableObject()
{
$this->assertInstanceOf('JTableAsset', $this->fixture->getTable('Asset', 'JTable'));
}
示例4: getTable
/**
* Method to get a table object, load it if necessary.
*
* @param string $name The table name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $options Configuration array for model. Optional.
*
* @return JTable A JTable object
*
* @since 12.2
* @throws Exception
*/
public function getTable($name = 'Authentications', $prefix = 'Hs_usersTable', $options = array())
{
return parent::getTable($name, $prefix, $options);
}