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


PHP Folder::__construct方法代码示例

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


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

示例1: Group

 /**
  * @param integer $folder_id
  */
 function __construct($folder_id)
 {
     global $user;
     if (is_numeric($folder_id)) {
         parent::__construct($folder_id);
         $this->group_folder = new FolderIsGroupFolder_Access($folder_id);
         $this->group_id = $this->group_folder->get_group_id();
         $group = new Group($this->group_id);
         if ($group->is_user_in_group($user->get_user_id()) == true) {
             if ($this->read_access == false) {
                 $this->data_entity_permission->set_read_permission();
                 if ($this->data_entity_permission->is_access(1)) {
                     $this->read_access = true;
                 }
             }
             if ($this->write_access == false) {
                 $this->data_entity_permission->set_write_permission();
                 if ($this->data_entity_permission->is_access(2)) {
                     $this->write_access = true;
                 }
             }
         }
     } else {
         parent::__construct(null);
         $this->group_folder = null;
         $this->group_id = null;
     }
 }
开发者ID:suxinde2009,项目名称:www,代码行数:31,代码来源:group_folder.class.php

示例2: OrganisationUnit

 /**
  * @param integer $folder_id
  */
 function __construct($folder_id)
 {
     if (is_numeric($folder_id)) {
         global $user;
         parent::__construct($folder_id);
         $this->organisation_unit_folder = new FolderIsOrganisationUnitFolder_Access($folder_id);
         $this->organisation_unit_id = $this->organisation_unit_folder->get_organisation_unit_id();
         $organisation_unit = new OrganisationUnit($this->organisation_unit_id);
         if ($organisation_unit->is_user_in_organisation_unit($user->get_user_id()) == true or $organisation_unit->is_leader_in_organisation_unit($user->get_user_id()) == true or $organisation_unit->is_owner_in_organisation_unit($user->get_user_id()) == true or $organisation_unit->is_quality_manager_in_organisation_unit($user->get_user_id()) == true) {
             if ($this->read_access == false) {
                 $this->data_entity_permission->set_read_permission();
                 if ($this->data_entity_permission->is_access(1)) {
                     $this->read_access = true;
                 }
             }
             if ($this->write_access == false) {
                 $this->data_entity_permission->set_write_permission();
                 if ($this->data_entity_permission->is_access(2)) {
                     $this->write_access = true;
                 }
             }
         }
     } else {
         parent::__construct(null);
         $this->organisation_unit_folder = null;
         $this->organisation_unit_id = null;
     }
 }
开发者ID:suxinde2009,项目名称:www,代码行数:31,代码来源:organisation_unit_folder.class.php

示例3: __construct

 /**
  * TemporaryFolder constructor.
  */
 public function __construct()
 {
     $path = TMP;
     $path .= Security::hash(mt_rand() . microtime(), 'md5');
     //$mode = '0775'; // ε(     v ゚ω゚) <パーミッションいくつが適切だ?
     $mode = false;
     // とりあえずデフォルトのまま
     register_shutdown_function(array($this, 'delete'));
     parent::__construct($path, true, $mode);
 }
开发者ID:s-nakajima,项目名称:files,代码行数:13,代码来源:TemporaryFolder.php

示例4:

 /**
  * @param integer $folder_id
  */
 function __construct($folder_id)
 {
     if (is_numeric($folder_id)) {
         parent::__construct($folder_id);
         $this->user_folder = new FolderIsUserFolder_Access($folder_id);
         $this->user_id = $this->user_folder->get_user_id();
     } else {
         parent::__construct(null);
         $this->user_folder = null;
         $this->user_id = null;
     }
 }
开发者ID:suxinde2009,项目名称:www,代码行数:15,代码来源:user_folder.class.php

示例5:

 /**
  * @param integer $folder_id
  */
 function __construct($folder_id)
 {
     if (is_numeric($folder_id)) {
         parent::__construct($folder_id);
         $this->data_entity_permission->set_read_permission();
         if ($this->data_entity_permission->is_access(1)) {
             $this->read_access = true;
         }
     } else {
         parent::__construct(null);
     }
 }
开发者ID:suxinde2009,项目名称:www,代码行数:15,代码来源:system_folder.class.php

示例6:

 /**
  * @param integer $folder_id
  */
 function __construct($folder_id)
 {
     if (is_numeric($folder_id)) {
         parent::__construct($folder_id);
         $this->project_status_folder = new ProjectStatusHasFolder_Access($folder_id);
         $this->project_status_id = $this->project_status_folder->get_project_status_id();
         $this->project_id = $this->project_status_folder->get_project_id();
     } else {
         parent::__construct(null);
         $this->project_status_folder = null;
         $this->project_status_id = null;
         $this->project_id = null;
     }
 }
开发者ID:suxinde2009,项目名称:www,代码行数:17,代码来源:project_status_folder.class.php

示例7: SampleSecurity

 /**
  * @param integer $folder_id
  */
 function __construct($folder_id)
 {
     global $user;
     if (is_numeric($folder_id)) {
         parent::__construct($folder_id);
         $this->sample_folder = new SampleHasFolder_Access($folder_id);
         $this->sample_id = $this->sample_folder->get_sample_id();
         if ($this->sample_id) {
             $sample_security = new SampleSecurity($this->sample_id);
             if ($this->get_automatic == false) {
                 $permission_bin = decbin($this->get_permission());
                 $permission_bin = str_pad($permission_bin, 16, "0", STR_PAD_LEFT);
                 $permission_bin = strrev($permission_bin);
             }
             // Read-Access
             if ($this->get_automatic() == true) {
                 if ($sample_security->is_access(1, false)) {
                     $this->read_access = true;
                 } else {
                     $this->read_access = false;
                 }
             } else {
                 if ($permission_bin[8] == "1" and $sample_security->is_access(1, false)) {
                     $this->read_access = true;
                 } else {
                     $this->read_access = false;
                 }
             }
             // Write-Access
             if ($this->get_automatic() == true) {
                 if ($sample_security->is_access(2, false)) {
                     $this->write_access = true;
                 } else {
                     $this->write_access = false;
                 }
             } else {
                 if ($permission_bin[9] == "1" and $sample_security->is_access(2, false)) {
                     $this->write_access = true;
                 } else {
                     $this->write_access = false;
                 }
             }
             // Delete-Access
             if ($user->is_admin() == true) {
                 if ($sample_security->is_access(5, false)) {
                     $this->delete_access = true;
                 } else {
                     $this->delete_access = false;
                 }
             } else {
                 if ($permission_bin[10] == "1" and $user->is_admin() == true) {
                     $this->delete_access = true;
                 } else {
                     $this->delete_access = false;
                 }
             }
             // Control-Access
             if ($user->is_admin() == true) {
                 if ($sample_security->is_access(7, false)) {
                     $this->control_access = true;
                 } else {
                     $this->control_access = false;
                 }
             } else {
                 if ($permission_bin[11] == "1" and $user->is_admin() == true) {
                     $this->control_access = true;
                 } else {
                     $this->control_access = false;
                 }
             }
         }
     } else {
         parent::__construct(null);
         $this->sample_folder = null;
         $this->sample_id = null;
     }
 }
开发者ID:suxinde2009,项目名称:www,代码行数:80,代码来源:sample_folder.class.php

示例8: ProjectSecurity

 /**
  * @param integer $folder_id
  */
 function __construct($folder_id)
 {
     if (is_numeric($folder_id)) {
         parent::__construct($folder_id);
         $this->project_folder = new ProjectHasFolder_Access($folder_id);
         $this->project_id = $this->project_folder->get_project_id();
         if ($this->project_id) {
             $project_security = new ProjectSecurity($this->project_id);
             if ($this->get_automatic == false) {
                 $permission_bin = decbin($this->get_permission());
                 $permission_bin = str_pad($permission_bin, 16, "0", STR_PAD_LEFT);
                 $permission_bin = strrev($permission_bin);
             }
             if ($this->read_access == false) {
                 if ($this->get_automatic() == true) {
                     if ($project_security->is_access(1, false) or $project_security->is_access(2, false)) {
                         $this->read_access = true;
                     }
                 } else {
                     if ($permission_bin[8] == "1" and ($project_security->is_access(1, false) or $project_security->is_access(2, false))) {
                         $this->read_access = true;
                     }
                 }
             }
             if ($this->write_access == false) {
                 if ($this->get_automatic() == true) {
                     if ($project_security->is_access(3, false) or $project_security->is_access(4, false)) {
                         $this->write_access = true;
                     }
                 } else {
                     if ($permission_bin[9] == "1" and ($project_security->is_access(3, false) or $project_security->is_access(4, false))) {
                         $this->write_access = true;
                     }
                 }
             }
             if ($this->delete_access == false) {
                 if ($this->get_automatic() == true) {
                     if ($project_security->is_access(5, false)) {
                         $this->delete_access = true;
                     }
                 } else {
                     if ($permission_bin[10] == "1" and $project_security->is_access(5, false)) {
                         $this->delete_access = true;
                     }
                 }
             }
             if ($this->control_access == false) {
                 if ($this->get_automatic() == true) {
                     if ($project_security->is_access(7, false)) {
                         $this->control_access = true;
                     }
                 } else {
                     if ($permission_bin[11] == "1" and $project_security->is_access(7, false)) {
                         $this->control_access = true;
                     }
                 }
             }
         }
     } else {
         parent::__construct(null);
         $this->project_folder = null;
         $this->project_id = null;
     }
 }
开发者ID:suxinde2009,项目名称:www,代码行数:67,代码来源:project_folder.class.php


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