当前位置: 首页>>代码示例>>PHP>>正文


PHP unknown::delete方法代码示例

本文整理汇总了PHP中unknown::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown::delete方法的具体用法?PHP unknown::delete怎么用?PHP unknown::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unknown的用法示例。


在下文中一共展示了unknown::delete方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete

 /**
  * 删除数据
  * @param string $table
  * @param unknown $whereCondition
  * @param unknown $placeholders
  * @param unknown $dataTypes
  */
 public function delete($table = '', $whereCondition = array(), $placeholders = array(), $dataTypes = array())
 {
     return $this->connectionWrite->delete($table, $whereCondition, $placeholders, $dataTypes);
 }
开发者ID:noikiy,项目名称:public,代码行数:11,代码来源:BalanceDbBase.php

示例2: delete

 /**
  * 销毁memcache缓存项
  * @see Star_Cache_Interface::delete()
  */
 public function delete($key)
 {
     return $this->memcache->delete($key);
 }
开发者ID:hwsyy,项目名称:php-management-system,代码行数:8,代码来源:Memcache.php

示例3: index

    /**
     * Render index form for ACLs
     *
     * @return null
     */
    function index()
    {
        $acl_app = phpgw::get_var('acl_app', 'string');
        $start = phpgw::get_var('start', 'int');
        $query = phpgw::get_var('query', 'string');
        $s_groups = phpgw::get_var('s_groups', 'int');
        $s_users = phpgw::get_var('s_users', 'int');
        $owner = phpgw::get_var('owner', 'int');
        $acl_app_not_passed = false;
        if (!$acl_app) {
            $acl_app = 'preferences';
            $acl_app_not_passed = true;
        } else {
            $GLOBALS['phpgw']->translation->add_app($acl_app);
        }
        $GLOBALS['phpgw_info']['flags']['currentapp'] = $acl_app;
        if ($acl_app_not_passed) {
            if (is_object($GLOBALS['phpgw']->log)) {
                $GLOBALS['phpgw']->log->message(array('text' => 'F-BadmenuactionVariable, failed to pass acl_app.', 'line' => __LINE__, 'file' => __FILE__));
                $GLOBALS['phpgw']->log->commit();
            }
        }
        if (isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) && $GLOBALS['phpgw_info']['server']['deny_user_grants_access'] && !isset($GLOBALS['phpgw_info']['user']['apps']['admin'])) {
            echo '<center><b>' . lang('Access not permitted') . '</b></center>';
            $GLOBALS['phpgw']->common->phpgw_exit(true);
        }
        if (!isset($GLOBALS['phpgw_info']['user']['apps']['admin']) || !$owner) {
            $owner = $GLOBALS['phpgw_info']['user']['account_id'];
        }
        $acct = createObject('phpgwapi.accounts', $owner);
        $groups = $acct->get_list('groups');
        $users = $acct->get_list('accounts');
        $owner_name = $acct->id2name($owner);
        // get owner name for title
        $is_group = $acct->get_type($owner);
        if ($is_group == 'g') {
            $owner_name = lang('Group (%1)', $owner_name);
        }
        unset($acct);
        $this->acl = createObject('phpgwapi.acl', (int) $owner);
        $errors = '';
        if (phpgw::get_var('submit', 'bool', 'POST')) {
            $processed = $_POST['processed'];
            $to_remove = unserialize($processed);
            foreach ($to_remove as $entry) {
                $this->acl->delete($acl_app, (int) $entry);
            }
            /* Group records */
            $group_variable = phpgw::get_var("g_{$acl_app}", 'string', 'POST');
            if (!$group_variable) {
                $group_variable = array();
            }
            $totalacl = array();
            foreach ($group_variable as $rowinfo) {
                list($group_id, $rights) = explode('_', $rowinfo, 2);
                $totalacl[(int) $group_id] += (int) $rights;
            }
            /* User records */
            $user_variable = phpgw::get_var("u_{$acl_app}", 'string', 'POST');
            if (!$user_variable) {
                $user_variable = array();
            }
            foreach ($user_variable as $rowinfo) {
                list($user_id, $rights) = explode('_', $rowinfo, 2);
                $totalacl[(int) $user_id] += (int) $rights;
            }
            // Update all the ACLs at once
            foreach ($totalacl as $id => $rights) {
                if ($is_group) {
                    /* Don't allow group-grants to grant private */
                    $rights &= ~phpgwapi_acl::PRIV;
                }
                $this->acl->add($acl_app, $id, $rights);
            }
            if ($this->acl->save_repository('preferences')) {
                $errors = lang('Grants have been updated');
            } else {
                $errors = lang('ERROR: Grants have not been updated');
            }
        }
        $processed = array();
        $total = 0;
        $maxm = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
        $totalentries = count($groups) + count($users);
        if ($totalentries < $maxm) {
            $maxm = $totalentries;
        }
        $GLOBALS['phpgw_info']['flags']['app_header'] = lang('%1 - Preferences', lang($acl_app)) . ' - ' . lang('acl') . ": {$owner_name}";
        $GLOBALS['phpgw']->common->phpgw_header();
        echo parse_navbar();
        $this->template->set_root($GLOBALS['phpgw']->common->get_tpl_dir($acl_app));
        $templates = array('preferences' => 'preference_acl.tpl', 'row_colspan' => 'preference_colspan.tpl', 'acl_row' => 'preference_acl_row.tpl');
        $this->template->set_file($templates);
        $common_hidden_vars = <<<HTML
\t\t\t\t<input type="hidden" name="s_groups" value="{$s_groups}">
//.........这里部分代码省略.........
开发者ID:HaakonME,项目名称:porticoestate,代码行数:101,代码来源:class.uiaclprefs.inc.php

示例4: delete

 /**
  * 
  * 
  * @param $cat_id
  * @param $subs
  * @return unknown
  */
 function delete($cat_id, $subs)
 {
     return $this->cats->delete($cat_id, $subs);
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:11,代码来源:class.bocategories.inc.php

示例5: foreach

 /**
  * Flush a single url
  *
  * @param unknown $url
  * @param unknown $cache
  * @param unknown $mobile_groups
  * @param unknown $referrer_groups
  * @param unknown $encryptions
  * @param unknown $compressions
  */
 function _flush_url($url, $cache, $mobile_groups, $referrer_groups, $encryptions, $compressions)
 {
     foreach ($mobile_groups as $mobile_group) {
         foreach ($referrer_groups as $referrer_group) {
             foreach ($encryptions as $encryption) {
                 foreach ($compressions as $compression) {
                     $page_keys = array();
                     $page_keys[] = $this->_get_page_key($mobile_group, $referrer_group, $encryption, $compression, false, $url);
                     $page_keys = apply_filters('w3tc_pagecache_flush_url_keys', $page_keys);
                     foreach ($page_keys as $page_key) {
                         $cache->delete($page_key);
                     }
                 }
             }
         }
     }
 }
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:27,代码来源:PgCache_Flush.php


注:本文中的unknown::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。