本文整理汇总了PHP中AuthManager::checkAdminAccess方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthManager::checkAdminAccess方法的具体用法?PHP AuthManager::checkAdminAccess怎么用?PHP AuthManager::checkAdminAccess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AuthManager
的用法示例。
在下文中一共展示了AuthManager::checkAdminAccess方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveGallery
/**
* Сохранение картинок галлерей в БД
*/
public function saveGallery($gallery, $name, array $images)
{
AuthManager::checkAdminAccess();
$cnt = $this->getCnt('select count(1) as cnt from ps_gallery where v_dir=?', $gallery);
if ($cnt == 0) {
$this->insert('insert into ps_gallery (v_dir, v_name) VALUES (?, ?)', array($gallery, $name));
} else {
$this->update('update ps_gallery set v_name=? where v_dir=?', array($name, $gallery));
}
$this->update('delete from ps_gallery_images where v_dir=?', $gallery);
$order = 0;
foreach ($images as $img) {
$this->saveImg($gallery, $img, ++$order);
}
}
示例2: inst
/** @return AdminFoldedManager */
public static function inst()
{
AuthManager::checkAdminAccess();
return parent::inst();
}
示例3: getNotConfirmemMsgsCnt
public function getNotConfirmemMsgsCnt($threadId = null)
{
AuthManager::checkAdminAccess();
$threadId = is_numeric($threadId) ? $this->validateThreadId($threadId) : null;
return $this->BEAN->getNotConfirmemMsgsCntDb($threadId);
}
示例4: __construct
protected function __construct()
{
//Разрешаем работать с классом только администратору
AuthManager::checkAdminAccess();
//Мы должны находиться не в продакшене
PsDefines::assertProductionOff(__CLASS__);
$this->LOGGER = PsLogger::inst(__CLASS__);
$this->BEAN = TESTBean::inst();
}
示例5: deleteLocalImg
public function deleteLocalImg($file)
{
AuthManager::checkAdminAccess();
GalleryBean::inst()->deleteLocalImg($this->gallery, $file);
$this->DM->getDirItem(null, $file)->remove();
}
示例6: assertAdminCanDo
private function assertAdminCanDo($__FUNCTION__, $ident)
{
$this->LOGGER->info('{} вызвана для {}', $__FUNCTION__, $ident);
AuthManager::checkAdminAccess();
}
示例7: getAll
public static final function getAll()
{
if (!is_array(self::$insts)) {
//Только админ может загружать все аудиты
AuthManager::checkAdminAccess();
//Инициализируем коллекцию
self::$insts = array();
foreach (Classes::getDirClassNames(__DIR__, 'impl', __CLASS__) as $className) {
$inst = $className::inst();
self::$insts[$inst->getProcessCode()] = $inst;
}
ksort(self::$insts);
}
return self::$insts;
}