當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。