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


PHP Project::isError方法代码示例

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


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

示例1: array

 function __construct(Project $project, $url, $feedback, MailBuilder $mail_builder)
 {
     parent::__construct();
     $this->project = $project;
     $this->_url = $url;
     $this->_listeners = array();
     $this->_feedback = $feedback;
     $this->_item_factory = $this->_getItemFactory();
     $this->notifications = array();
     $this->mail_builder = $mail_builder;
     if ($project && !$project->isError()) {
         $this->_group_name = $project->getPublicName();
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:Docman_NotificationsManager.class.php

示例2: checkIfProjectIsValid

 private function checkIfProjectIsValid(Project $project)
 {
     if ($project->isError()) {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_git', 'view_admin_template_invalid_project'));
         return;
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:GitActions.class.php

示例3: isSearchEntryAvailable

 private function isSearchEntryAvailable(Project $project = null)
 {
     if ($project && !$project->isError()) {
         return $project->usesService(self::SERVICE_SHORTNAME);
     }
     return false;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:mediawikiPlugin.class.php

示例4: isSearchEntryAvailable

 private function isSearchEntryAvailable(Project $project = null)
 {
     if ($project && !$project->isError()) {
         return $project->usesService('plugin_phpwiki');
     }
     return false;
 }
开发者ID:ranjanasim,项目名称:tuleap,代码行数:7,代码来源:phpwikiPlugin.class.php

示例5: userCanAccessProject

 /**
  * Ensure given user can access given project
  *
  * @param PFUser  $user
  * @param Project $project
  * @return boolean
  * @throws Project_AccessProjectNotFoundException
  * @throws Project_AccessDeletedException
  * @throws Project_AccessRestrictedException
  * @throws Project_AccessPrivateException
  */
 public function userCanAccessProject(PFUser $user, Project $project)
 {
     if ($project->isError()) {
         throw new Project_AccessProjectNotFoundException();
     } elseif ($user->isSuperUser()) {
         return true;
     } elseif (!$project->isActive()) {
         throw new Project_AccessDeletedException($project);
     } elseif ($user->isMember($project->getID())) {
         return true;
     } elseif ($this->getPermissionsOverriderManager()->doesOverriderAllowUserToAccessProject($user, $project)) {
         return true;
     } elseif ($user->isRestricted()) {
         if (!$project->allowsRestricted() || !$this->restrictedUserCanAccessUrl($user, $this->getUrl(), $_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'])) {
             throw new Project_AccessRestrictedException();
         }
         return true;
     } elseif ($project->isPublic()) {
         return true;
     } elseif ($this->userHasBeenDelegatedAccess($user)) {
         return true;
     }
     throw new Project_AccessPrivateException();
 }
开发者ID:sunmoonone,项目名称:tuleap,代码行数:35,代码来源:URLVerification.class.php

示例6: getTemplatesAvailableForParentProjects

 /**
  * Get All templates for projects higher in hierarchy. Does not include
  * templates for project itself.
  *
  * @param Project $project
  * @return Git_Driver_Gerrit_Template_Template[]
  */
 public function getTemplatesAvailableForParentProjects(Project $project)
 {
     if ($project->isError()) {
         return array();
     }
     $templates = array();
     $project_manager = ProjectManager::instance();
     $projects = $project_manager->getAllParentsProjects($project->getId());
     foreach ($projects as $project) {
         $templates = array_merge($templates, $this->getAllTemplatesOfProject($project));
     }
     return $templates;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:20,代码来源:TemplateFactory.class.php

示例7: userCanAccessProject

 /**
  * Ensure given user can access given project
  *
  * @param PFUser  $user
  * @param Project $project
  * @return boolean
  * @throws Project_AccessProjectNotFoundException
  * @throws Project_AccessDeletedException
  * @throws Project_AccessRestrictedException
  * @throws Project_AccessPrivateException
  */
 public function userCanAccessProject(PFUser $user, Project $project)
 {
     if ($project->isError()) {
         throw new Project_AccessProjectNotFoundException();
     } elseif ($user->isSuperUser()) {
         return true;
     } elseif (!$project->isActive()) {
         throw new Project_AccessDeletedException($project);
     } elseif ($user->isMember($project->getID())) {
         return true;
     } elseif ($user->isRestricted() && !$this->canRestrictedUserAccess($user, $project)) {
         throw new Project_AccessRestrictedException();
     } elseif ($project->isPublic()) {
         return true;
     } elseif ($this->userHasBeenDelegatedAccess($user)) {
         return true;
     }
     throw new Project_AccessPrivateException();
 }
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:30,代码来源:URLVerification.class.php


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