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


PHP Project::getName方法代码示例

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


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

示例1: storeProjectRssFile

 /**
  * Create new RSS file after project creation
  * @param $project
  * @return bool
  */
 public function storeProjectRssFile(Project $project)
 {
     $fileName = $this->rssDir . $this->pKey . ".rss";
     $rssLog = new Rss_log();
     $rssLog->setPid($project->getId());
     if (!$this->checkFileExists($fileName)) {
         // Create new one RSS file
         $xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"></rss>', null, false);
         $channel = $xml->addChild("channel");
         $channel->addChild("title", $project->getName());
         $channel->addChild("description", $project->getDescription());
         $channel->addChild("link", $this->partnerUrl . $project->getCruid());
         $rssLog->setTitle($project->getName());
         $rssLog->setDescription($project->getDescription());
         $rssLog->setLink($this->partnerUrl . $project->getCruid());
         $rssLog->setType("project create");
     } else {
         // Update existing RSS file
         libxml_use_internal_errors(true);
         try {
             $xml = new SimpleXMLElement($fileName, NULL, TRUE);
         } catch (Exception $er) {
             return false;
         }
         $xml = $this->openRssFile($fileName);
         if ($xml === false) {
             return false;
         }
         unset($xml->channel->title);
         unset($xml->channel->description);
         unset($xml->channel->link);
         $xml->channel->addChild("title", $project->getName());
         $xml->channel->addChild("description", $project->getDescription());
         $xml->channel->addChild("link", $this->partnerUrl . $project->getCruid());
         $rssLog->setTitle($project->getName());
         $rssLog->setDescription($project->getDescription());
         $rssLog->setLink($this->partnerUrl . $project->getCruid());
         $rssLog->setType("project update");
     }
     try {
         $xml->asXML($fileName);
     } catch (Exception $er) {
         return false;
     }
     $rssLog->setR_date(\Carbon\Carbon::Now()->toDateTimeString());
     $this->storeRssLog($rssLog);
     return true;
 }
开发者ID:Faradejus,项目名称:WorkFlow,代码行数:53,代码来源:rss.class.php

示例2: workspace_toxml

 private function workspace_toxml(Project $ws, $activeProjects)
 {
     $parentIds = '';
     $i = 1;
     $pid = $ws->getPID($i);
     while ($pid != $ws->getId() && $pid != 0 && $i <= 10) {
         $coma = $parentIds == '' ? '' : ',';
         if (in_array($pid, $activeProjects)) {
             $parentIds .= $coma . $pid;
         }
         $i++;
         $pid = $ws->getPID($i);
     }
     $this->instance->startElement('workspace');
     $this->instance->startElement('id');
     $this->instance->text($ws->getId());
     $this->instance->endElement();
     $this->instance->startElement('name');
     $this->instance->text($ws->getName());
     $this->instance->endElement();
     $this->instance->startElement('description');
     $this->instance->text($ws->getDescription());
     $this->instance->endElement();
     $this->instance->startElement('parentids');
     $this->instance->text($parentIds);
     $this->instance->endElement();
     $this->instance->endElement();
 }
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:28,代码来源:WorkspaceServices.php

示例3: setProject

 public function setProject(Project $project)
 {
     $this->project = $project;
     $url = parent::getUrl();
     $url->setQueryVar('page', 'project');
     $url->setQueryVar('id', $project->getID());
     $this->setContent($project->getName());
 }
开发者ID:KasaiDot,项目名称:Zero-Fansub-website,代码行数:8,代码来源:ProjectLink.php

示例4: add

 public function add(Project $project)
 {
     $db = $this->connection();
     $sql = "INSERT INTO {$this->dbTable} (" . self::$key . ", " . self::$name . ", " . self::$owner . ") VALUES (?, ?, ?)";
     $params = array($project->getUnique(), $project->getName(), $project->getOwner()->getUnique());
     $query = $db->prepare($sql);
     $query->execute($params);
 }
开发者ID:uf222ba,项目名称:1dv408-HT14,代码行数:8,代码来源:ProjectRepository.php

示例5: show

 public static function show($id)
 {
     // Lists all tasks in project $id
     self::check_logged_in();
     $tasks = Task::listProject($id);
     $project_name = Project::getName($id);
     //Kint::dump($tasks);
     //View::make('project/show.html', array('tasks' => $tasks));
     View::make('project/show.html', array('tasks' => $tasks, 'project_name' => $project_name));
 }
开发者ID:rubinju,项目名称:Todolist,代码行数:10,代码来源:project_controller.php

示例6: bail

 function new_form($params)
 {
     if (!$params['project_id']) {
         bail('Required parameter "project_id" is missing.');
     }
     $project = new Project($params['project_id']);
     $this->options = array('project_id' => $project->id, 'title' => $project->getName());
     $this->data = new Hour();
     $this->data->set(array('staff_id' => Session::getUserId(), 'date' => date('Y-m-d')));
 }
开发者ID:radicaldesigns,项目名称:gtd,代码行数:10,代码来源:HourController.php

示例7: updateProject

 public function updateProject(Project $project)
 {
     $stmt = $this->db->prepare('INSERT OR REPLACE INTO project (slug, name, repository, branch, command, url_pattern) VALUES (:slug, :name, :repository, :branch, :command, :url_pattern)');
     $stmt->bindValue(':slug', $project->getSlug(), SQLITE3_TEXT);
     $stmt->bindValue(':name', $project->getName(), SQLITE3_TEXT);
     $stmt->bindValue(':repository', $project->getRepository(), SQLITE3_TEXT);
     $stmt->bindValue(':branch', $project->getBranch(), SQLITE3_TEXT);
     $stmt->bindValue(':command', $project->getCommand(), SQLITE3_TEXT);
     $stmt->bindValue(':url_pattern', $project->getUrlPattern(), SQLITE3_TEXT);
     if (false === $stmt->execute()) {
         // @codeCoverageIgnoreStart
         throw new \RuntimeException(sprintf('Unable to save project "%s".', $project->getName()));
         // @codeCoverageIgnoreEnd
     }
     // related commits
     $stmt = $this->db->prepare('SELECT sha, author, date, build_date, message, status, output FROM `commit` WHERE slug = :slug ORDER BY build_date DESC LIMIT 100');
     $stmt->bindValue(':slug', $project->getSlug(), SQLITE3_TEXT);
     if (false === ($results = $stmt->execute())) {
         // @codeCoverageIgnoreStart
         throw new \RuntimeException(sprintf('Unable to get latest commit for project "%s".', $project->getName()));
         // @codeCoverageIgnoreEnd
     }
     $commits = array();
     while ($result = $results->fetchArray(\SQLITE3_ASSOC)) {
         $commits[] = $this->createCommit($project, $result);
     }
     $project->setCommits($commits);
     // project building?
     $stmt = $this->db->prepare('SELECT COUNT(*) AS count FROM `commit` WHERE slug = :slug AND status = "building"');
     $stmt->bindValue(':slug', $project->getSlug(), SQLITE3_TEXT);
     $building = false;
     if (false !== ($result = $stmt->execute())) {
         if (false !== ($result = $result->fetchArray(\SQLITE3_ASSOC))) {
             if ($result['count'] > 0) {
                 $building = true;
             }
         }
     }
     $project->setBuilding($building);
 }
开发者ID:rouffj,项目名称:Sismo,代码行数:40,代码来源:Storage.php

示例8: Project

 function test_getName()
 {
     //Arrange
     $name = "Build a shed";
     $motivation = "have storage";
     $due_date = "2015-09-09";
     $priority = 1;
     $test_project = new Project($name, $motivation, $due_date, $priority);
     //Act
     $result = $test_project->getName();
     //Assert
     $this->assertEquals($name, $result);
 }
开发者ID:ashlinaronin,项目名称:lifecoach-chain-of-responsibility,代码行数:13,代码来源:ProjectTest.php

示例9: array

 /**
  * Constructor
  *
  * @param Request $request
  * @return MobileAccessController extends ApplicationController 
  */
 function __construct($request)
 {
     parent::__construct($request);
     $this->disableCategories();
     $project_id = $this->request->get('project_id');
     if ($project_id) {
         $this->active_project = Projects::findById($project_id);
     }
     // if
     if (!instance_of($this->active_project, 'Project')) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     if (!$this->logged_user->isProjectMember($this->active_project)) {
         $this->httpError(HTTP_ERR_FORBIDDEN);
     }
     // if
     if ($this->active_project->getType() == PROJECT_TYPE_SYSTEM) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     $this->project_sections = array();
     $this->project_sections[] = array("name" => "overview", "full_name" => lang("Overview"), "url" => assemble_url('mobile_access_view_project', array('project_id' => $this->active_project->getId())));
     if (module_loaded('discussions') && $this->logged_user->getProjectPermission('discussion', $this->active_project)) {
         $this->project_sections[] = array("name" => "discussions", "full_name" => lang("Discussions"), "url" => assemble_url('mobile_access_view_discussions', array('project_id' => $this->active_project->getId())));
     }
     if (module_loaded('milestones') && $this->logged_user->getProjectPermission('milestone', $this->active_project)) {
         $this->project_sections[] = array("name" => "milestones", "full_name" => lang("Milestones"), "url" => assemble_url('mobile_access_view_milestones', array('project_id' => $this->active_project->getId())));
     }
     if (module_loaded('files') && $this->logged_user->getProjectPermission('file', $this->active_project)) {
         $this->project_sections[] = array("name" => "files", "full_name" => lang("Files"), "url" => assemble_url('mobile_access_view_files', array('project_id' => $this->active_project->getId())));
     }
     if (module_loaded('checklists') && $this->logged_user->getProjectPermission('checklist', $this->active_project)) {
         $this->project_sections[] = array("name" => "checklists", "full_name" => lang("Checklists"), "url" => assemble_url('mobile_access_view_checklists', array('project_id' => $this->active_project->getId())));
     }
     if (module_loaded('pages') && $this->logged_user->getProjectPermission('page', $this->active_project)) {
         $this->project_sections[] = array("name" => "pages", "full_name" => lang("Pages"), "url" => assemble_url('mobile_access_view_pages', array('project_id' => $this->active_project->getId())));
     }
     if (module_loaded('tickets') && $this->logged_user->getProjectPermission('ticket', $this->active_project)) {
         $this->project_sections[] = array("name" => "tickets", "full_name" => lang("Tickets"), "url" => assemble_url('mobile_access_view_tickets', array('project_id' => $this->active_project->getId())));
     }
     if (module_loaded('timetracking') && $this->logged_user->getProjectPermission('timerecord', $this->active_project)) {
         $this->project_sections[] = array("name" => "timetracking", "full_name" => lang("Time"), "url" => assemble_url('mobile_access_view_timerecords', array('project_id' => $this->active_project->getId())));
     }
     if (module_loaded('source') && $this->logged_user->getProjectPermission('repository', $this->active_project)) {
         $this->project_sections[] = array("name" => "source", "full_name" => lang("Repositories"), "url" => assemble_url('mobile_access_view_repositories', array('project_id' => $this->active_project->getId())));
     }
     //if($this->active_project->isLoaded() && $this->enable_categories) {
     $this->addBreadcrumb(lang('Project'), assemble_url('mobile_access_view_project', array("project_id" => $this->active_project->getId())));
     $this->smarty->assign(array("page_title" => $this->active_project->getName(), "active_project" => $this->active_project, "project_sections" => $this->project_sections, "page_breadcrumbs" => $this->breadcrumbs, "active_project_section" => 'overview', "active_category" => $this->active_category));
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:57,代码来源:MobileAccessProjectController.class.php

示例10: ical

 /**
  * Serve iCal data
  *
  * @param void
  * @return null
  */
 function ical()
 {
     if ($this->active_project->isNew()) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     $filter = ProjectUsers::getVisibleTypesFilterByProject($this->logged_user, $this->active_project, get_completable_project_object_types());
     if ($filter) {
         $objects = ProjectObjects::find(array('conditions' => array($filter . ' AND completed_on IS NULL AND state >= ? AND visibility >= ?', STATE_VISIBLE, $this->logged_user->getVisibility()), 'order' => 'priority DESC'));
         render_icalendar($this->active_project->getName() . ' ' . lang('calendar'), $objects);
         die;
     } else {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:22,代码来源:ProjectController.class.php

示例11: buildFiles

 private function buildFiles(\Project $project)
 {
     $translations = $project->getTranslations();
     $builder = new KdybyTranslationBuilder();
     $files = [];
     foreach ($translations as $translation) {
         $mask = '%s.' . $translation->getLocale() . '.neon';
         $dictionaryData = $this->translationFacade->getDictionaryData($translation);
         $outputFiles = $builder->build($mask, $dictionaryData);
         $files = array_merge($files, $outputFiles);
     }
     $zip = new ZipStream(sprintf('%s.zip', $project->getName()));
     foreach ($files as $fileName => $messages) {
         $data = Neon::encode($messages, Neon::BLOCK);
         $zip->addFile($fileName, $data);
     }
     $zip->finish();
 }
开发者ID:bazo,项目名称:translation-ui,代码行数:18,代码来源:ProjectsPresenter.php

示例12: array

    if (@$HTTP_POST_VARS["cat"] == "save") {
        $tpl->assign("result", Display_Column::save());
    }
    $page = 'list_issues';
    $available = Display_Column::getAllColumns($page);
    $selected = Display_Column::getSelectedColumns($prj_id, $page);
    // re-order available array to match rank
    $available_ordered = array();
    foreach ($selected as $field_name => $field_info) {
        $available_ordered[$field_name] = $available[$field_name];
        unset($available[$field_name]);
    }
    if (count($available) > 0) {
        $available_ordered += $available;
    }
    $excluded_roles = array();
    if (!Customer::hasCustomerIntegration($prj_id)) {
        $excluded_roles[] = "customer";
    }
    $user_roles = User::getRoles($excluded_roles);
    $user_roles[9] = "Never Display";
    // generate ranks
    $ranks = array();
    for ($i = 1; $i <= count($available_ordered); $i++) {
        $ranks[$i] = $i;
    }
    $tpl->assign(array("available" => $available_ordered, "selected" => $selected, "user_roles" => $user_roles, "page" => $page, "ranks" => $ranks, "prj_id" => $prj_id, "project_name" => Project::getName($prj_id)));
} else {
    $tpl->assign("show_not_allowed_msg", true);
}
$tpl->displayTemplate();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:column_display.php

示例13: elseif

    }
} elseif (@$_GET['post_form'] == 'yes') {
    // only list those projects that are allowing anonymous reporting of new issues
    $projects = Project::getAnonymousList();
    if (empty($projects)) {
        $tpl->assign('no_projects', '1');
    } else {
        if (!in_array($_GET['project'], array_keys($projects))) {
            $tpl->assign('no_projects', '1');
        } else {
            // get list of custom fields for the selected project
            $options = Project::getAnonymousPostOptions($_GET['project']);
            if (@$options['show_custom_fields'] == 'yes') {
                $tpl->assign('custom_fields', Custom_Field::getListByProject($_GET['project'], 'anonymous_form'));
            }
            $tpl->assign('project_name', Project::getName($_GET['project']));
        }
    }
} else {
    // only list those projects that are allowing anonymous reporting of new issues
    $projects = Project::getAnonymousList();
    if (empty($projects)) {
        $tpl->assign('no_projects', '1');
    } else {
        if (count($projects) == 1) {
            $project_ids = array_keys($projects);
            Auth::redirect('post.php?post_form=yes&project=' . $project_ids[0]);
        } else {
            $tpl->assign('projects', $projects);
        }
    }
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:post.php

示例14: Template_API

include_once APP_INC_PATH . "class.misc.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "class.setup.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "issue_auto_creation");
@($ema_id = $HTTP_POST_VARS["ema_id"] ? $HTTP_POST_VARS["ema_id"] : $HTTP_GET_VARS["ema_id"]);
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator') || $role_id == User::getRoleID('manager')) {
    if ($role_id == User::getRoleID('administrator')) {
        $tpl->assign("show_setup_links", true);
    }
    $prj_id = Email_Account::getProjectID($ema_id);
    if (@$HTTP_POST_VARS["cat"] == "update") {
        @Email_Account::updateIssueAutoCreation($ema_id, $HTTP_POST_VARS['issue_auto_creation'], $HTTP_POST_VARS['options']);
    }
    // load the form fields
    $tpl->assign("info", Email_Account::getDetails($ema_id));
    $tpl->assign("cats", Category::getAssocList($prj_id));
    $tpl->assign("priorities", Priority::getList($prj_id));
    $tpl->assign("users", Project::getUserAssocList($prj_id, 'active'));
    $tpl->assign("options", Email_Account::getIssueAutoCreationOptions($ema_id));
    $tpl->assign("ema_id", $ema_id);
    $tpl->assign("prj_title", Project::getName($prj_id));
    $tpl->assign("uses_customer_integration", Customer::hasCustomerIntegration($prj_id));
} else {
    $tpl->assign("show_not_allowed_msg", true);
}
$tpl->displayTemplate();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:issue_auto_creation.php

示例15: array

 function get_workspace_info(Project $workspace, $defaultParent = 0, $all_ws = null)
 {
     $parent = $defaultParent;
     if (!$all_ws) {
         $all_ws = logged_user()->getWorkspaces(true);
     }
     if (!is_array($all_ws)) {
         $all_ws = array();
     }
     $wsset = array();
     foreach ($all_ws as $w) {
         $wsset[$w->getId()] = true;
     }
     $tempParent = $workspace->getParentId();
     $x = $workspace;
     while ($x instanceof Project && !isset($wsset[$tempParent])) {
         $tempParent = $x->getParentId();
         $x = $x->getParentWorkspace();
     }
     if (!$x instanceof Project) {
         $tempParent = 0;
     }
     $workspace_info = array("id" => $workspace->getId(), "name" => $workspace->getName(), "color" => $workspace->getColor(), "parent" => $tempParent, "realParent" => $workspace->getParentId(), "depth" => $workspace->getDepth());
     if (logged_user()->getPersonalProjectId() == $workspace->getId()) {
         $workspace_info["isPersonal"] = true;
     }
     return $workspace_info;
 }
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:28,代码来源:ProjectController.class.php


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