本文整理汇总了PHP中Access::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Access::create方法的具体用法?PHP Access::create怎么用?PHP Access::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Access
的用法示例。
在下文中一共展示了Access::create方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteAcesso
public function deleteAcesso($delete)
{
try {
$transaction = $this->beginTransaction();
if (is_array($delete)) {
foreach ($delete as $id) {
Access::create($id)->delete();
}
} else {
Access::create($delete)->delete();
}
$transaction->commit();
} catch (Exception $e) {
$transaction->rollback();
throw new EModelException('Error');
}
}
示例2: List
break;
case 'add_host':
// Make sure we've got a valid form submission
if (!Core::form_verify('add_acl', 'post')) {
UI::access_denied();
exit;
}
Access::create($_POST);
// Create Additional stuff based on the type
if ($_POST['addtype'] == 'stream' || $_POST['addtype'] == 'all') {
$_POST['type'] = 'stream';
Access::create($_POST);
}
if ($_POST['addtype'] == 'all') {
$_POST['type'] = 'interface';
Access::create($_POST);
}
if (!Error::occurred()) {
$url = AmpConfig::get('web_path') . '/admin/access.php';
show_confirmation(T_('Added'), T_('Your new Access Control List(s) have been created'), $url);
} else {
$action = 'show_add_' . $_POST['type'];
require_once AmpConfig::get('prefix') . '/templates/show_add_access.inc.php';
}
break;
case 'update_record':
if (!Core::form_verify('edit_acl')) {
UI::access_denied();
exit;
}
$access = new Access($_REQUEST['access_id']);
示例3: formObject
public function formObject()
{
$this->data->Access = Access::create($this->data->id)->getData();
$this->render();
}