本文整理匯總了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