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


PHP Project::getDescription方法代码示例

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


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

 public function InsertNewProject(Project $p = null)
 {
     if ($p == null || !$p instanceof Project) {
         return null;
     }
     $props = array("UserID," => $p->getUserID(), "ClientID," => $p->getClientID(), "Title," => $p->getTitle(), "Description," => $p->getDescription(), "TotalWorkHours," => $p->getTotalWorkHours(), "TotalEstimateHours," => $p->getTotalEstimateHours(), "DateCreated" => $p->getDateCreated());
     foreach ($props as $k => $v) {
         if ($v != null) {
             if ($k == "DateCreated") {
                 $_props[$k] = "'" . $v . "'";
             } else {
                 if (gettype($v) == "string") {
                     $_props[$k] = "'" . $v . "', ";
                 } else {
                     $_props[$k] = "{$v}, ";
                 }
             }
         }
     }
     $this->_dbAdapt->IStatement($this->dbTbl, $_props);
     $tmp = $this->_dbAdapt->getLnk();
     $tmp->query($this->_dbAdapt->getQry());
     unset($tmp);
     return true;
 }
开发者ID:B4RN3SCODE,项目名称:ASPM,代码行数:25,代码来源:ProjectServiceAdapter.php

示例3: 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

示例4: exportProjectInfo

 private function exportProjectInfo(Project $project, SimpleXMLElement $project_node)
 {
     $access_value = $project->isPublic() ? Project::ACCESS_PUBLIC : Project::ACCESS_PRIVATE;
     $project_node->addAttribute('unix-name', $project->getUnixName());
     $project_node->addAttribute('full-name', $project->getPublicName());
     $project_node->addAttribute('description', $project->getDescription());
     $project_node->addAttribute('access', $access_value);
     $project_node->addChild('long-description', '');
     $services_node = $project_node->addChild('services');
     foreach ($project->getServices() as $service) {
         $service_node = $services_node->addChild('service');
         $service_node->addAttribute('shortname', $service->getShortName());
         $service_node->addAttribute('enabled', $service->isUsed());
     }
 }
开发者ID:ansarbek,项目名称:tuleap,代码行数:15,代码来源:ProjectXMLExporter.class.php

示例5: printDescription

 /**
  * Print the project description, if any
  */
 public static function printDescription(Project $project)
 {
     if ($project->getDescription() !== null) {
         self::$out->write($project->getDescription() . PHP_EOL);
     }
 }
开发者ID:hkilter,项目名称:OpenSupplyChains,代码行数:9,代码来源:phing.php

示例6: array

require './header.php';
$cards = fRecordSet::build('Card', array('uid=' => $_GET['cardid']));
if ($cards->count() == 0) {
    fURL::redirect("/kiosk/addcard.php?cardid=" . $_GET['cardid']);
}
$card = $cards->getRecord(0);
$user = new User($card->getUserId());
$user->load();
if (isset($_POST['print'])) {
    $project = new Project($_POST['print']);
    $project->load();
    if ($project->getUserId() != $user->getId()) {
        print "Incorrect project ID";
        exit;
    }
    $data = array('storage_id' => $project->getId(), 'name' => $project->getName(), 'ownername' => $user->getFullName(), 'more_info' => $project->getDescription(), 'completion_date' => $project->getToDate()->format('Y/m/d'), 'max_extention' => "14");
    $data_string = json_encode($data);
    $ch = curl_init('http://kiosk.london.hackspace.org.uk:12345/print/dnh');
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Content-Length: ' . strlen($data_string)));
    $result = curl_exec($ch);
    curl_close($ch);
    echo "<p>Your sticker is being printed now.</p>";
}
$projects = fRecordSet::build('Project', array('state_id!=' => array('6', '7'), 'user_id=' => $user->getId()));
?>

<?php 
if ($projects->count() > 0) {
开发者ID:increpare,项目名称:hackspace-foundation-sites,代码行数:31,代码来源:storage.php

示例7: nl2br

" class="btn btn-default">Print DO NOT HACK label</a><br/>
<?php 
}
?>
<br/>
	<?php 
if ($project->hasExtension()) {
    ?>
<strong>Extended for <?php 
    echo $project->getExtensionDuration();
    ?>
 days</strong><br/><br/><?php 
}
?>
<p><?php 
echo nl2br(stripslashes($project->getDescription()));
?>
</p>
<br/>
<hr/>
<strong>Activity log</strong><br/><br/>
<ul>
<?php 
foreach ($projectslogs as $log) {
    $userURL = '';
    if ($log->getUserId() != null) {
        $logUser = new User($log->getUserId());
        $userURL = ' by <a href="/members/member.php?id=' . $log->getUserId() . '">' . htmlspecialchars($logUser->getFullName()) . '</a>';
    }
    echo '<li><span class="light-color">' . date('g:ia jS M', $log->getTimestamp()) . '</span> | ' . str_replace('Mailing List', '<a target="_blank" href="' . $project->getMailingListURL() . '">Mailing List</a>', $log->getDetails()) . $userURL . '</li>';
}
开发者ID:increpare,项目名称:hackspace-foundation-sites,代码行数:31,代码来源:details.php

示例8: printDescription

 /**  Print the project description, if any */
 function printDescription(Project $project)
 {
     if ($project->getDescription() !== null) {
         print $project->getDescription() . "\n";
     }
 }
开发者ID:domenypl,项目名称:symfony1-legacy,代码行数:7,代码来源:Phing.php

示例9: setDescription

class Project
{
    protected $description;
    public function setDescription($description)
    {
        $this->description = $description;
        return $this;
    }
    public function getDescription()
    {
        return $this->description;
    }
}
$project_one = new Project();
$project_one->setDescription("This is my first test project");
echo $project_one->getDescription();
echo "<br>";
$project_two = $project_one;
// Copying by value?
echo $project_two->getDescription();
echo "<br>";
$project_two->setDescription("This is my second test project");
echo $project_two->getDescription();
echo "<br>";
echo $project_one->getDescription();
echo "<br>";
echo "Cloning..";
$project_three = clone $project_one;
echo $project_three->getDescription();
$project_three->setDescription("This is my third test project");
echo "<br>";
开发者ID:yogendra9891,项目名称:basic,代码行数:31,代码来源:clone2.php

示例10: printDescription

 /**
  * Print the project description, if any
  */
 public static function printDescription(Project $project)
 {
     if ($project->getDescription() !== null) {
         self::$out->write($project->getDescription() . self::getProperty("line.separator"));
     }
 }
开发者ID:nmicht,项目名称:tlalokes-in-acst,代码行数:9,代码来源:Phing.php

示例11: foreach

        ?>
)</option>
          <?php 
    }
    ?>
  			  </select>
          <?php 
    foreach ($levels as $level) {
        $level = new Project($level->ID);
        ?>
          <div id="supportLevel<?php 
        echo $level->getID();
        ?>
" class="modal-support-level" style="display:none">
            <?php 
        echo $level->getDescription();
        ?>
            <?php 
        echo $level->getPaypalForm(array('return' => home_url('thank-you')));
        ?>
          </div>
          <?php 
    }
    ?>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>
开发者ID:freshbrewedweb,项目名称:asgard,代码行数:31,代码来源:template-slc.php

示例12: actionSave

 function actionSave($currentUser)
 {
     $backUrl = $this->context->getFlowScopeAttr("backUrl");
     $oldRssKey = null;
     $project = new Project();
     $projectErrs = array();
     $project->setId($this->context->getRequestAttr("id"));
     if (!is_null($project->getId())) {
         $oldProject = $this->projectDao->get($project->getId());
         if (is_null($oldProject) || is_string($oldProject)) {
             $this->context->setRequestScopeAttr("error", "error.dberror");
             if (!is_null($backUrl)) {
                 header("Location: " . $backUrl);
                 return true;
             }
             return false;
         }
     }
     $project->setName($this->context->getRequestAttr("name"));
     if (!is_null($project->getName())) {
         $project->setName(trim($project->getName()));
         if (strlen($project->getName()) < 1) {
             $project->setName(null);
         }
     }
     if (is_null($project->getName())) {
         $projectErrs["name"] = "field.error.empty";
     }
     $project->setDescription($this->context->getRequestAttr("description"));
     if (!is_null($project->getDescription())) {
         $project->setDescription(trim($project->getDescription()));
         if (strlen($project->getDescription()) < 1) {
             $project->setDescription(null);
         }
     }
     $project->setCampaign($this->context->getRequestAttr("campaign"));
     if (!is_null($project->getCampaign())) {
         $project->setCampaign(trim($project->getCampaign()));
         if (strlen($project->getCampaign()) < 1) {
             $project->setCampaign(null);
         }
     }
     $project->setSuspending($this->context->getRequestAttr("suspending"));
     if (!is_null($project->getSuspending())) {
         $project->setSuspending(trim($project->getSuspending()));
         if (strlen($project->getSuspending()) < 1) {
             $project->setSuspending(null);
         }
     }
     $project->setEnding($this->context->getRequestAttr("ending"));
     if (!is_null($project->getEnding())) {
         $project->setEnding(trim($project->getEnding()));
         if (strlen($project->getEnding()) < 1) {
             $project->setEnding(null);
         }
     }
     $move_more = $this->context->getRequestAttr("move_more");
     $project->setMove_more($move_more == 1 ? true : false);
     $timeZone = new DateTimeZone("Europe/Vilnius");
     $time = new DateTime("now", $timeZone);
     $project->setR_date($time->format("Y-m-d H:i:s"));
     $project->setR_user($currentUser->getId());
     if (is_null($project->getId())) {
         $project->setOwner($currentUser->getId());
         $project->setCruid($this->generateCode());
         $project->setPkey($this->generateCode());
         $project->setRsskey($this->generateCode());
     } else {
         $project->setCruid($oldProject->getCruid());
         $project->setRsskey($oldProject->getRssKey());
     }
     $this->context->setFlashScopeAttr("project", $project);
     $this->context->setFlashScopeAttr("projectErrs", $projectErrs);
     if (count($projectErrs) >= 1) {
         if (!is_null($backUrl)) {
             header("Location: " . $backUrl);
             return true;
         }
         return false;
     }
     $store = $this->storeProject($project);
     if (!$store) {
         if (!is_null($backUrl)) {
             header("Location: " . $backUrl);
             return true;
         }
         return false;
     }
     $rss = new Rss($project->getRsskey());
     if (!$rss->storeProjectRssFile($project)) {
         $this->context->setRequestScopeAttr("errortxt", "Nepavyko sukurti/atnaujinti RSS failo!");
     }
     /* Issaugom pasirinktas grupes */
     $groups = $this->context->getRequestAttr("groups");
     $selectedProjects = $this->context->getRequestAttr("selectedProjects");
     if (is_null($selectedProjects) && !is_null($groups)) {
         $this->saveProjectGroups($project->getId(), $groups);
     }
     if (!is_null($selectedProjects) && is_null($groups)) {
         $this->removeProjectFromGroups($currentUser->getId(), $project->getId());
//.........这里部分代码省略.........
开发者ID:Faradejus,项目名称:WorkFlow,代码行数:101,代码来源:projectApp.class.php

示例13: User

         $auto = true;
         $logDetails = "Request created";
         $project->setState('Pending Approval');
         $initial = true;
     } else {
         $auto = false;
         $logDetails = "Request updated";
         $initial = false;
     }
     $project->setUpdatedDate(date('Y-m-d'));
     $project->setUserId($user->getId());
     $project->store();
     $project->submitLog($logDetails, $user->getId());
     // post to Google Groups
     $projectUser = new User($project->getUserId());
     $message = '<strong>' . $project->getName() . "</strong><br>\n" . "https://london.hackspace.org.uk/storage/" . $project->getId() . "<br>\n" . "by <a href=\"https://london.hackspace.org.uk/members/member.php?id=" . $project->getUserId() . "\">" . htmlspecialchars($projectUser->getFullName()) . "</a><br>\n" . $project->outputDates() . "<br>\n" . $project->outputDuration() . ' ' . $project->outputLocation() . "<br>\n<br>\n" . nl2br(stripslashes($project->getDescription())) . "<br>\n<br>\n";
     if ($auto && !$project->isShortTerm()) {
         $message .= "<strong>***If no one replies to this topic the request will be automatically approved within " . $project->automaticApprovalDuration() . " days.***</strong>";
     }
     $project->submitMailingList($message, $initial);
     // is this a short term request? If so automatically approve it
     if ($project->isShortTerm()) {
         $project->setState('Approved');
         $project->store();
         // log the update
         $logmsg = 'Short term storage detected, status automatically changed to ' . $project->getState();
         $project->submitLog($logmsg, false);
         $project->submitMailingList($logmsg);
     }
     fURL::redirect("/storage/{$project->getId()}");
 } catch (fValidationException $e) {
开发者ID:increpare,项目名称:hackspace-foundation-sites,代码行数:31,代码来源:edit.php

示例14: SaveProjectEdits

 public function SaveProjectEdits()
 {
     //$tmp = BasicAuthService::EntryPointCheck();
     $tmpProject = new Project((int) $_REQUEST["ProjectId"], $_SESSION["User"]->getUID(), (int) $_REQUEST["ClientID"], $_REQUEST["Title"], $_REQUEST["Description"], (double) $_REQUEST["TotalWorkHours"], (double) $_REQUEST["TotalEstimateHours"], $_REQUEST["DateCreated"]);
     $GLOBALS["App"]["ServiceAdapter"] = $this->_projectServiceAdpt;
     $tmpSetup = array("EditProjectUserId" => array(0 => $tmpProject->getId(), 1 => $tmpProject->getUserID()), "EditProjectClientId" => array(0 => $tmpProject->getId(), 1 => $tmpProject->getClientID()), "EditProjectTitle" => array(0 => $tmpProject->getId(), 1 => $tmpProject->getTitle()), "EditProjectDescription" => array(0 => $tmpProject->getId(), 1 => $tmpProject->getDescription()), "EditProjectTotalWorkHours" => array(0 => $tmpProject->getId(), 1 => $tmpProject->getTotalWorkHours()), "EditProjectTotalEstimateHours" => array(0 => $tmpProject->getId(), 1 => $tmpProject->getTotalEstimateHours()), "EditProjectDateCreated" => array(0 => $tmpProject->getId(), 1 => $tmpProject->getDateCreated()));
     $failures = array();
     $GLOBALS["App"]["Error"] = "";
     foreach ($tmpSetup as $updateMethod => $parameters) {
         $success = $this->_projectServiceAdpt->{$updateMethod}($parameters[0], $parameters[1]);
         if (!$success) {
             $stringd = "++ {$updateMethod} failed with parameters: {$parameters['0']} and {$parameters['1']} ++";
             $GLOBALS["App"]["Error"] .= "++ {$stringd} ++";
             $failures[] = $stringd;
         }
     }
     $this->PostEditCallBack(count($failures) == 0 ? null : $failures);
 }
开发者ID:B4RN3SCODE,项目名称:ASPM,代码行数:18,代码来源:TimeSheetController.php


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