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


PHP Request::__construct方法代码示例

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


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

示例1: Exception

 function __construct($from, $to, $time, $date, $timeSel, $results = 6, $lang = "EN", $format = "xml", $typeOfTransport = "all")
 {
     parent::__construct($format, $lang);
     if ($from == "" || $to == "") {
         throw new Exception("No stations specified");
     }
     //TODO: check on input
     $this->results = $results;
     $this->from = $from;
     $this->to = $to;
     $this->time = $time;
     $this->date = $date;
     $this->timeSel = $timeSel;
     $this->typeOfTransport = $typeOfTransport;
     //check for ID
     if (sizeof(explode(".", $from)) > 1) {
         $si = new StationsInput();
         $station = $si->getStationFromId($from, $this);
         $this->from = $station->getName();
     }
     if (sizeof(explode(".", $to)) > 1) {
         $si = new StationsInput();
         $station = $si->getStationFromId($to, $this);
         $this->to = $station->getName();
     }
 }
开发者ID:janfabry,项目名称:iRail,代码行数:26,代码来源:ConnectionRequest.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     parent::setGetVar("id", "");
     parent::setGetVar("fast", "false");
     parent::processRequiredVars(["id"]);
 }
开发者ID:Tjoosten,项目名称:iRail,代码行数:7,代码来源:VehicleinformationRequest.php

示例3: __construct

 public function __construct($op)
 {
     parent::__construct($op);
     // Override mapping with api-specific field maps
     self::$mapping['shipping_tracking_number'] = 'Tracking_Number';
     self::$mapping['shipping_carrier'] = 'Shipping_Carrier';
 }
开发者ID:agmscode,项目名称:agms_php,代码行数:7,代码来源:SAFERequest.php

示例4: __construct

 public function __construct($url, $data = array(), $callback = NULL)
 {
     if (!empty($data)) {
         $url = trim($url, '/') . '/' . http_build_query($data);
     }
     return parent::__construct($url, array(), $callback);
 }
开发者ID:vigm,项目名称:advancedMD,代码行数:7,代码来源:GetRequest.php

示例5: __construct

 /**
  * Constructor for SAML 2 logout request messages.
  *
  * @param \DOMElement|null $xml The input message.
  * @throws \Exception
  */
 public function __construct(\DOMElement $xml = null)
 {
     parent::__construct('LogoutRequest', $xml);
     $this->sessionIndexes = array();
     if ($xml === null) {
         return;
     }
     if ($xml->hasAttribute('NotOnOrAfter')) {
         $this->notOnOrAfter = Utils::xsDateTimeToTimestamp($xml->getAttribute('NotOnOrAfter'));
     }
     $nameId = Utils::xpQuery($xml, './saml_assertion:NameID | ./saml_assertion:EncryptedID/xenc:EncryptedData');
     if (empty($nameId)) {
         throw new \Exception('Missing <saml:NameID> or <saml:EncryptedID> in <samlp:LogoutRequest>.');
     } elseif (count($nameId) > 1) {
         throw new \Exception('More than one <saml:NameID> or <saml:EncryptedD> in <samlp:LogoutRequest>.');
     }
     $nameId = $nameId[0];
     if ($nameId->localName === 'EncryptedData') {
         /* The NameID element is encrypted. */
         $this->encryptedNameId = $nameId;
     } else {
         $this->nameId = Utils::parseNameId($nameId);
     }
     $sessionIndexes = Utils::xpQuery($xml, './saml_protocol:SessionIndex');
     foreach ($sessionIndexes as $sessionIndex) {
         $this->sessionIndexes[] = trim($sessionIndex->textContent);
     }
 }
开发者ID:SysBind,项目名称:saml2,代码行数:34,代码来源:LogoutRequest.php

示例6: __construct

 /**
  * ListTopicsRequest constructor
  * 
  * @param string $project project name
  * @param string $logstore logstore name
  * @param string $token the start token to list topics
  * @param integer $line max topic counts to return
  */
 public function __construct($project = null, $logstore = null, $token = null, $line = null)
 {
     parent::__construct($project);
     $this->logstore = $logstore;
     $this->token = $token;
     $this->line = $line;
 }
开发者ID:xjtuwangke,项目名称:laravel-bundles,代码行数:15,代码来源:ListTopicsRequest.php

示例7: __construct

 public function __construct($op)
 {
     parent::__construct($op);
     switch ($this->op) {
         case 'TransactionAPI':
             $this->fields = $this->transfields;
             // Override mapping with api-specific field maps
             self::$mapping['safe_id'] = 'Safe_ID';
             self::$mapping['gateway_username'] = 'GatewayUsername';
             break;
         case 'QuerySAFE':
             $this->fields = $this->safefields;
             // Override mapping with api-specific field maps
             self::$mapping['safe_id'] = 'SafeID';
             self::$mapping['gateway_username'] = 'GatewayUsername';
             self::$mapping['gateway_key'] = 'APIKey';
             break;
         default:
             throw new \Agms\Exception\InvalidRequestException('Invalid op in Request.');
             break;
     }
     // switch op
     $this->needsAccount = true;
     $this->needsKey = true;
 }
开发者ID:agmscode,项目名称:agms_php,代码行数:25,代码来源:ReportRequest.php

示例8: __construct

 public function __construct(ParameterBag $parameters = null)
 {
     if (is_null($parameters)) {
         $parameters = new ParameterBag();
     }
     $parameters->set('Session_Type', self::SESSION_TYPE_RUNTIME)->set('Function', $this->getFunction());
     parent::__construct($parameters);
 }
开发者ID:ghassani,项目名称:miva-provision,代码行数:8,代码来源:AttributeListLoadProductVariantPossible.php

示例9: __construct

 /**
  * Initialize object
  *
  * @api
  *
  * @param array $data   Data from the $_SERVER array
  * @param Input $get    Input object generated from the $_GET array
  * @param Input $post   Input object generated from the $_POST array
  * @param Input $cookie Input object generated from the $_COOKIE array
  */
 public function __construct($data, Input $get = null, Input $post = null, Input $cookie = null, Input $files = null)
 {
     parent::__construct($data);
     $this->get = $get;
     $this->post = $post;
     $this->cookie = $cookie;
     $this->files = $files;
 }
开发者ID:liftkit,项目名称:core,代码行数:18,代码来源:Http.php

示例10: __construct

 /**
  * PutLogsRequest cnstructor
  *
  * @param string $project
  *            project name
  * @param string $logstore
  *            logstore name
  * @param string $topic
  *            topic name
  * @param string $source
  *            source of the log
  * @param array $logitems
  *            LogItem array,log data
  */
 public function __construct($project = null, $logstore = null, $topic = null, $source = null, $logitems = null)
 {
     parent::__construct($project);
     $this->logstore = $logstore;
     $this->topic = $topic;
     $this->source = $source;
     $this->logitems = $logitems;
 }
开发者ID:xjtuwangke,项目名称:laravel-bundles,代码行数:22,代码来源:PutLogsRequest.php

示例11: __construct

 public function __construct(\DOMElement $xml = null)
 {
     parent::__construct('ArtifactResolve', $xml);
     if (!is_null($xml)) {
         $results = Utils::xpQuery($xml, './saml_protocol:Artifact');
         $this->artifact = $results[0]->textContent;
     }
 }
开发者ID:SysBind,项目名称:saml2,代码行数:8,代码来源:ArtifactResolve.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     parent::setGetVar('id', '');
     parent::setGetVar('fast', 'false');
     parent::setGetVar('alerts', 'false');
     parent::processRequiredVars(['id']);
 }
开发者ID:jncn,项目名称:iRail,代码行数:8,代码来源:VehicleinformationRequest.php

示例13: __construct

 /**
  * Constructor for SAML 2 subject query messages.
  *
  * @param string          $tagName The tag name of the root element.
  * @param \DOMElement|null $xml     The input message.
  */
 protected function __construct($tagName, \DOMElement $xml = null)
 {
     parent::__construct($tagName, $xml);
     if ($xml === null) {
         return;
     }
     $this->parseSubject($xml);
 }
开发者ID:SysBind,项目名称:saml2,代码行数:14,代码来源:SubjectQuery.php

示例14: __construct

 /**
  * Constructor
  * 
  * @param $root
  * @param $segments
  * @return unknown_type
  */
 public function __construct($dispatcher, $method, $root, &$segments, $query = null)
 {
     if (!$method) {
         $method = Request::get_request_method();
     }
     parent::__construct($dispatcher, strtoupper($method), $root, $segments, $query);
     $this->is_secure = $_SERVER['HTTPS'] == "on";
 }
开发者ID:jawngee,项目名称:HeavyMetal,代码行数:15,代码来源:http_request.php

示例15: __construct

 /**
  * GetHistogramsRequest constructor
  *
  * @param string $project
  *            project name
  * @param string $logstore
  *            logstore name
  * @param integer $from
  *            the begin time
  * @param integer $to
  *            the end time
  * @param string $topic
  *            topic name of logs
  * @param string $query
  *            user defined query
  */
 public function __construct($project = null, $logstore = null, $from = null, $to = null, $topic = null, $query = null)
 {
     parent::__construct($project);
     $this->logstore = $logstore;
     $this->from = $from;
     $this->to = $to;
     $this->topic = $topic;
     $this->query = $query;
 }
开发者ID:xjtuwangke,项目名称:laravel-bundles,代码行数:25,代码来源:GetHistogramsRequest.php


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