本文整理汇总了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);
}