本文整理汇总了PHP中Mage1ActiveRecord类的典型用法代码示例。如果您正苦于以下问题:PHP Mage1ActiveRecord类的具体用法?PHP Mage1ActiveRecord怎么用?PHP Mage1ActiveRecord使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage1ActiveRecord类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDbConnection
public function getDbConnection()
{
if (self::$db !== null) {
return self::$db;
} else {
self::$db = Yii::app()->mage1;
if (self::$db instanceof CDbConnection) {
self::$db->setActive(true);
return self::$db;
} else {
throw new CDbException(Yii::t('yii', 'Active Record requires a "db" CDbConnection application component.'));
}
}
}
示例2: model
/**
* Returns the static model of the specified AR class.
* Please note that you should have this exact method in all your CActiveRecord descendants!
* @param string $className active record class name.
* @return Mage1CatalogProductBundleSelectionPricePeer the static model class
*/
public static function model($className = __CLASS__)
{
return parent::model($className);
}
开发者ID:imbrj,项目名称:module-ubdatamigration,代码行数:10,代码来源:Mage1CatalogProductBundleSelectionPricePeer.php