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


PHP ACL::initializeFromRow方法代码示例

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


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

示例1: selectByPath

 function selectByPath($path)
 {
     $dbq = new DB();
     $dbq->db_connect();
     $query = "SELECT acl_id, user_id, sage_acl.path_id, delete_path, write_path, read_path,\n                  rename_path, delete_file, write_file, read_file, rename_file, sage_path.pathname\n                  FROM sage_acl, sage_path\n                  WHERE sage_acl.path_id = sage_path.path_id\r\n                  AND sage_path.pathname = '{$path}'";
     $acls = $dbq->db_select($query);
     for ($i = 0; $i < count($acls); $i++) {
         $acl = new ACL();
         $acl->initializeFromRow($acls[$i]);
         $this->list[] = $acl;
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:sage,代码行数:13,代码来源:acl.inc.php

示例2: getACLByPath

 function getACLByPath($path)
 {
     $retacl = new ACL();
     if ($this->is_su == "1") {
         $retacl->acl_id = 1;
         $retacl->delete_path = "1";
         $retacl->write_path = "1";
         $retacl->read_path = "1";
         $retacl->rename_path = "1";
         $retacl->delete_file = "1";
         $retacl->write_file = "1";
         $retacl->read_file = "1";
         $retacl->rename_file = "1";
         return $retacl;
     }
     $done = false;
     $acllist = new ACLList();
     $curacls = array();
     $currentUserId = $this->user_id;
     while (!$done) {
         $currentUser = new User();
         if (!$currentUser->selectById($currentUserId)) {
             $done = true;
         } else {
             if ($acllist->selectByUserIdAndPath($currentUser->user_id, $path)) {
                 $curacls = $acllist->list;
             }
             if (count($curacls) == 0) {
                 $currentUserId = $currentUser->user_id_parent;
             } else {
                 $done = true;
                 $retacl->initializeFromRow($curacls[0]);
             }
         }
     }
     return $retacl;
 }
开发者ID:BackupTheBerlios,项目名称:sage,代码行数:37,代码来源:user.inc.php


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