本文整理汇总了PHP中Version::factory方法的典型用法代码示例。如果您正苦于以下问题:PHP Version::factory方法的具体用法?PHP Version::factory怎么用?PHP Version::factory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Version
的用法示例。
在下文中一共展示了Version::factory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handle_item_after_delete
/**
* overwrite after delete handler to go though multiple deleted items
* @param type $data
*/
public function handle_item_after_delete($data)
{
foreach ($data->deleted as $model) {
// delete collections
$this->delete_collections($model);
// delete alias
$this->delete_alias($model);
// delete version
if ($this->_settings->get('version') == TRUE) {
Version::factory($model)->delete();
}
}
}
开发者ID:yubinchen18,项目名称:A-basic-website-project-for-a-company-using-the-MVC-pattern-in-Kohana-framework,代码行数:17,代码来源:Branch.php
示例2: handle_item_after_copy
/**
* copy alias
*/
public function handle_item_after_copy($data)
{
// get copy
$copy = $data->copy;
// create new alias
if ($this->_settings->get('alias.global') == TRUE || $this->_settings->get('alias.module') == TRUE) {
$this->create_alias($copy, $copy->alias);
}
// create version fo copy
if ($this->_settings->get('version') == TRUE) {
Version::factory($copy)->commit();
}
}
开发者ID:yubinchen18,项目名称:A-basic-website-project-for-a-company-using-the-MVC-pattern-in-Kohana-framework,代码行数:16,代码来源:Item.php