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


PHP Process::get方法代码示例

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


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

示例1: getCMSFields

    public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        $fields->removeByName('Order');
        $fields->removeByName('ProcessInfo');
        $fields->removeByName('ProcessStages');
        $processParent = Process::get();
        if ($processParent) {
            $fields->insertAfter(new DropdownField('ParentID', 'Belongs to this Process', $processParent->map('ID', 'Title')), 'Title');
        }
        $fields->addFieldToTab('Root.Main', $processSteps = new CompositeField(new GridField('ProcessInfo', 'Information for this stage', $this->ProcessInfo(), GridFieldConfig_RelationEditor::create())));
        $fields->insertBefore(new LiteralField('StageTitle', '<h3 class="process-info-header">
			<span class="step-label">
				<span class="flyout">1.1</span><span class="arrow"></span>
				<span class="title">Stop stage details</span>
			</span>
		</h3>'), 'Title');
        $fields->insertBefore(new LiteralField('StageTitle', '<h3 class="process-info-header">
			<span class="step-label">
				<span class="flyout">1.2</span><span class="arrow"></span>
				<span class="title">Final information</span>
			</span>
		</h3>'), 'ProcessInfo');
        return $fields;
    }
开发者ID:helpfulrobot,项目名称:adrexia-processmap,代码行数:25,代码来源:ProcessStopStage.php

示例2: getCMSFields

    public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        $fields->removeByName('Order');
        $fields->removeByName('Title');
        $fields->removeByName('ProcessInfo');
        $fields->removeByName('ParentProcessID');
        $fields->addFieldToTab('Root.Main', $processSteps = new CompositeField($title = new TextField('Title', 'Title')));
        $title->addExtraClass('process-noborder');
        $processSteps->addExtraClass('process-step');
        $fields->addFieldToTab('Root.Main', $processSteps = new CompositeField(new GridField('ProcessInfo', 'Information for this case', $this->ProcessInfo(), GridFieldConfig_RecordViewer::create())));
        $processes = Process::get();
        if ($processes) {
            $fields->insertAfter($inner = new CompositeField(new LiteralField('ExplainStop', '<label class="right">This must be set after you create a process</label>'), $processesOptions = new DropdownField('ParentProcessID', 'Process', $processes->map('ID', 'Title'))), 'Title');
            $inner->addExtraClass('message special');
        }
        $processSteps->addExtraClass('process-step');
        $fields->insertBefore(new LiteralField('StageTitle', '<h3 class="process-info-header">
				<span class="step-label">
					<span class="flyout">0.1</span><span class="arrow"></span>
					<span class="title">Case details</span>
				</span>
			</h3>'), 'Title');
        $fields->insertBefore(new LiteralField('StageTitle', '<h3 class="process-info-header">
				<span class="step-label">
					<span class="flyout">0.2</span><span class="arrow"></span>
					<span class="title">Associated Information Pieces</span>
				</span>
			</h3>'), 'ProcessInfo');
        return $fields;
    }
开发者ID:helpfulrobot,项目名称:adrexia-processmap,代码行数:31,代码来源:ProcessCase.php

示例3: getTitle

 /**
  * Get the terminal title.
  * @return string
  */
 public static function getTitle()
 {
     if (!empty(self::$username)) {
         $process = new Process("uname -n");
         $title = self::$username . "@" . trim($process->get());
         $process->close();
         return $title;
     } else {
         return "not logged shell - how cold it be possible, uh?";
     }
 }
开发者ID:anonymframework,项目名称:xwiterm,代码行数:15,代码来源:terminal.class.php

示例4: __construct

 /**
  * Initialise la requete.
  */
 public function __construct(ServerCallRequest $httpRequest, ServerCallResponse $httpResponse)
 {
     parent::__construct();
     //On appelle le constructeur parent
     //On initialise la requete et la reponse HTTP
     $this->httpRequest = $httpRequest;
     $this->httpResponse = $httpResponse;
     //Classe demandee dans la requete
     $class = $this->getHTTPRequest()->getClass();
     if (!class_exists('\\lib\\controllers\\' . $class)) {
         //On verifie que la classe existe
         throw new \InvalidArgumentException('La classe "' . $class . '" sp&eacute;cifi&eacute;e dans la requ&ecirc;te HTTP n\'existe pas');
     }
     //Et qu'elle herite bien de ServerCallComponent
     if (!in_array('lib\\ServerCallComponent', class_parents('\\lib\\controllers\\' . $class))) {
         throw new \InvalidArgumentException('La classe "' . $class . '" sp&eacute;cifi&eacute;e dans la requ&ecirc;te HTTP ne peut pas &ecirc;tre appell&eacute;e comme action d\'administration');
     }
     //Si un mot de passe et un nom d'utilisateur sont specifies dans la requete
     //On tente d'executer l'action demandee avec l'utilisateur specifie
     if ($this->getHTTPRequest()->getPassword() != null && $this->getHTTPRequest()->getUsername() != null) {
         $this->user = new User($this->getHTTPRequest()->getUsername(), $this->getHTTPRequest()->getPassword());
     }
     if ($this->getHTTPRequest()->getPid() != null && $this->getHTTPRequest()->getKey() != null) {
         $process = Process::get($this->getHTTPRequest()->getPid());
         if ($process->getKey() == $this->getHTTPRequest()->getKey()) {
             throw new RuntimeException('Clef du processus #' . $this->getHTTPRequest()->getPid() . ' invalide');
         }
         if (!$process->getAuthorization()->check($this->getHTTPRequest())) {
             throw new RuntimeException('Vous n\'avez pas les droits requis pour effectuer cette action (module : "' . $class . '"; action : "' . $this->getHTTPRequest()->getMethod() . '"; arguments: "' . implode('", "', $this->getHTTPRequest()->getArguments()) . '")');
         }
         $this->process = $process;
     } else {
         //On cree l'autorisation d'executer l'action
         $authorization = new Authorization($this, $this->user);
         //Si on n'a pas les droits suffisants pour executer la requete demandee
         if (!$authorization->check($this->getHTTPRequest())) {
             throw new RuntimeException('Vous n\'avez pas les droits requis pour effectuer cette action (module : "' . $class . '"; action : "' . $this->getHTTPRequest()->getMethod() . '"; arguments: "' . implode('", "', $this->getHTTPRequest()->getArguments()) . '")');
         }
         //On cree le processus de l'action
         $this->process = new models\ServerCallProcess($this, $authorization, $this->getHTTPRequest()->getClass(), $this->getHTTPRequest()->getMethod());
     }
 }
开发者ID:Tiger66639,项目名称:symbiose-raspberrypi,代码行数:45,代码来源:ServerCall.class.php

示例5: json_encode

<?php

require_once 'test_webterminal/process.class.php';
$p = new Process("su neco");
usleep(500000);
$p->put("neco");
$p->put(chr(13));
echo $p->get();
echo '<hr>';
//$p->put(chr(21));
//var_dump($p->close());
//echo json_encode($p->getStatus());
//echo '<hr>';
// $p->put("whoami");
// $p->put(chr(13));
//echo $p->get();
usleep(500000);
echo $p->get();
$p->put("whoami");
$p->put(chr(13));
echo $p->get();
echo '<hr>';
usleep(500000);
echo $p->get();
echo '<hr>';
echo json_encode($p->getStatus());
echo '<hr>';
$p->put("ls -l");
$p->put(chr(13));
echo $p->get();
echo '<hr>';
开发者ID:kenichiii,项目名称:online-php-ide-pfc-editor,代码行数:31,代码来源:wtest.php

示例6: ProcessContent

 public function ProcessContent()
 {
     return Process::get()->byID($this->ProcessID);
 }
开发者ID:helpfulrobot,项目名称:adrexia-processmap,代码行数:4,代码来源:ProcessDisplayPage.php


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