本文整理汇总了PHP中ActiveRecord::init方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveRecord::init方法的具体用法?PHP ActiveRecord::init怎么用?PHP ActiveRecord::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActiveRecord
的用法示例。
在下文中一共展示了ActiveRecord::init方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
function setUp()
{
DB::openConnection(Config::instance()->TEST_DB_NAME, "localhost", Config::instance()->TEST_DB_USERNAME, Config::instance()->TEST_DB_PASSWORD, false);
$sql = DB::newDirectSql("CREATE TABLE simple3_table(\n id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id),\n nome VARCHAR(255),\n livello INT,\n properties TEXT);");
$sql->exec();
ActiveRecord::init("Simple3");
}
示例2: init
public function init()
{
/**
* проблема для установки.
*/
/* $this->_attrLabels['confirm_password'] = $this->t('CONFIRM_PASSWORD');
$this->_attrLabels['address'] = $this->t('ADDRESS');
$this->_attrLabels['phone'] = $this->t('PHONE'); */
// $this->_attrLabels['confirm_password'] = $this->t('CONFIRM_PASSWORD');
//$this->_attrLabels['verifyCode'] = $this->t('VERIFY_CODE');
//$this->_attrLabels['new_password'] = $this->t('NEW_PASSWORD');
return parent::init();
}
示例3: setUp
function setUp()
{
DB::openConnection(Config::instance()->TEST_DB_NAME, "localhost", Config::instance()->TEST_DB_USERNAME, Config::instance()->TEST_DB_PASSWORD, false);
$sql1 = DB::newDirectSql("CREATE TABLE test_tab_dipinti(\n id_dipinto INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id_dipinto),\n nome VARCHAR(255),\n id_autore INT NOT NULL,\n periodo INT NOT NULL,\n properties TEXT NOT NULL);");
$sql1->exec();
$sql2 = DB::newDirectSql("CREATE TABLE test_tab_colori_dipinto(\n id_colore_dipinto INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id_colore_dipinto),\n id_dipinto INT NOT NULL,\n id_colore INT NOT NULL);");
$sql2->exec();
$sql3 = DB::newDirectSql("CREATE TABLE test_tab_colori(\n id_colore INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id_colore),\n nome INT NOT NULL,\n rgb VARCHAR(6) NOT NULL);");
$sql3->exec();
$sql4 = DB::newDirectSql("CREATE TABLE test_tab_autori(\n id_autore INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id_autore),\n nome VARCHAR(64) NOT NULL,\n cognome VARCHAR(64) NOT NULL,\n stile VARCHAR(32));");
$sql4->exec();
ActiveRecord::init("TestDipinto");
ActiveRecord::init("TestAutore");
ActiveRecord::init("TestColore");
ActiveRecord::init("TestColoreDipinto");
}
示例4: init
public function init()
{
parent::init();
$this->_attrLabels['payment_methods'] = $this->t('PAYMENT_METHODS');
}
示例5: init
public function init()
{
parent::init();
$this->type = get_called_class();
}
示例6: setUp
public function setUp()
{
DB::openConnection(Config::instance()->TEST_DB_NAME, "localhost", Config::instance()->TEST_DB_USERNAME, Config::instance()->TEST_DB_PASSWORD, false);
ActiveRecord::init("SimpleBis");
}
示例7: __classLoaded
public static function __classLoaded($class_name)
{
ActiveRecord::init(self::__getStaticRawClassName($class_name));
}
示例8: init
function init()
{
parent::init();
Yii::import('application.vendor.Spyc');
}