本文整理汇总了PHP中Sample::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Sample::load方法的具体用法?PHP Sample::load怎么用?PHP Sample::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sample
的用法示例。
在下文中一共展示了Sample::load方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Copyright
<?php
/*------------------------------------------------------------------------
# com_citruscart
# ------------------------------------------------------------------------
# author Citruscart Team - Citruscart http://www.citruscart.com
# copyright Copyright (C) 2014 Citruscart.com All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://citruscart.com
# Technical Support: Forum - http://citruscart.com/forum/index.html
# Fork of Tienda
# @license GNU/GPL Based on Tienda by Dioscouri Design http://www.dioscouri.com.
-------------------------------------------------------------------------*/
/** ensure this file is being included by a parent file */
defined('_JEXEC') or die('Restricted access');
Sample::load('SampleModelBase', 'models._base');
class SampleModelConfig extends SampleModelBase
{
}
示例2: Copyright
<?php
/*------------------------------------------------------------------------
# com_citruscart
# ------------------------------------------------------------------------
# author Citruscart Team - Citruscart http://www.citruscart.com
# copyright Copyright (C) 2014 Citruscart.com All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://citruscart.com
# Technical Support: Forum - http://citruscart.com/forum/index.html
# Fork of Tienda
# @license GNU/GPL Based on Tienda by Dioscouri Design http://www.dioscouri.com.
-------------------------------------------------------------------------*/
/** ensure this file is being included by a parent file */
defined('_JEXEC') or die('Restricted access');
Sample::load('SampleTable', 'tables._base');
class SampleTableConfig extends SampleTable
{
function SampleTableConfig(&$db)
{
$tbl_key = 'config_name';
$tbl_suffix = 'config';
$this->set('_suffix', $tbl_suffix);
$name = "sample";
parent::__construct("#__{$name}_{$tbl_suffix}", $tbl_key, $db);
}
function store($updateNulls = true)
{
$k = 'config_id';
if (intval($this->{$k}) > 0) {
$ret = $this->_db->updateObject($this->_tbl, $this, $this->_tbl_key);
示例3: includeSampleModel
/**
* Include a particular Sample Model
* @param $name the name of the mode (ex: products)
*/
protected function includeSampleModel($name)
{
if (strtolower($name) != 'base') {
Sample::load('SampleModel' . ucfirst(strtolower($name)), 'models.' . strtolower($name));
} else {
Sample::load('SampleModelBase', 'models._base');
}
}