本文整理汇总了PHP中VF_Schema::setConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP VF_Schema::setConfig方法的具体用法?PHP VF_Schema::setConfig怎么用?PHP VF_Schema::setConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VF_Schema
的用法示例。
在下文中一共展示了VF_Schema::setConfig方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSchema
function getSchema()
{
$schema = new VF_Schema();
if (!is_null($this->getConfig())) {
$schema->setConfig($this->getConfig());
}
return $schema;
}
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:8,代码来源:Elite_Vafsitemap_Model_Url_Rewrite_Slug.php
示例2: getSchema
function getSchema()
{
if (isset($this->schema)) {
return $this->schema;
}
$schema = new VF_Schema();
$schema->setConfig($this->getConfig());
return $this->schema = $schema;
}
示例3: save
function save()
{
if (!(int) $this->product_id)
{
throw new Exception('Trying to insert a mapping with no product ID');
}
$schema = new VF_Schema;
$schema->setConfig($this->getConfig());
$levels = $schema->getLevels();
$select = $this->getReadAdapter()->select()
->from($schema->mappingsTable(), array('id'));
foreach ($this->vehicle->toValueArray() as $level => $id)
{
$select->where($this->inflect($level) . '_id = ?', $id);
}
$select->where('entity_id = ?', $this->product_id);
$id = (int) $select->query()->fetchColumn();
if (0 !== $id)
{
return $id;
}
$columns = '';
$values = '';
foreach ($levels as $level)
{
$columns .= '`' . $this->inflect($level) . '_id`,';
$values .= $this->inflect($this->vehicle->getLevel($level)->getId());
$values .= ',';
}
$query = sprintf(
'
INSERT INTO
`'.$schema->mappingsTable().'`
(
' . $columns . '
`entity_id`
)
VALUES
(
' . $values . '
%d
)
',
(int) $this->product_id
);
$r = $this->query($query);
return $this->getReadAdapter()->lastInsertId();
}
示例4: getSchema
protected function getSchema()
{
$schema = new VF_Schema();
$schema->setConfig($this->getCOnfig());
/** @todo potential linux bug needs regression test */
return $schema;
}
示例5: getSchema
function getSchema()
{
$schema = new VF_Schema();
$schema->setConfig($this->getConfig());
return $schema;
}
示例6: getDefaultLevel
function getDefaultLevel()
{
$schema = new VF_Schema();
$schema->setConfig($this->getConfig());
return $schema->getRootLevel();
}
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:6,代码来源:Elite_Vaf_Adminhtml_Block_Definitions.php