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


PHP AbstractResponse::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($data)
 {
     parent::__construct($data);
     foreach ($this->data['trackings'] as $courier) {
         $this->trackings[] = new TrackingInfoShortResponse(array('result' => $courier));
     }
 }
开发者ID:Acidter,项目名称:client-php,代码行数:7,代码来源:TrackingListResponse.php

示例2: __construct

 public function __construct($data)
 {
     parent::__construct($data);
     if ($this->data['last_checkpoint']) {
         $this->lastCheckpoint = new CheckpointResponse(array('result' => $this->data['last_checkpoint']));
     }
 }
开发者ID:Acidter,项目名称:client-php,代码行数:7,代码来源:TrackingInfoShortResponse.php

示例3:

 /**
  * @param $data
  */
 function __construct($data)
 {
     if (is_object($data)) {
         $this->obj = $data;
     } else {
         if (is_string($data)) {
             parent::__construct($data);
         }
     }
     if (isset($this->obj->username)) {
         $this->username = $this->obj->username;
     }
     if (isset($this->obj->limit)) {
         $this->limit = $this->obj->limit;
     }
     if (isset($this->obj->month_limit)) {
         $this->monthLimit = $this->obj->month_limit;
     }
     if (isset($this->obj->senders)) {
         $this->senders = $this->obj->senders;
     }
     if (isset($this->obj->phonebook)) {
         $this->phonebook = $this->obj->phonebook;
     }
     if (isset($this->obj->active)) {
         $this->active = $this->obj->active;
     }
     if (isset($this->obj->info)) {
         $this->info = $this->obj->info;
     }
 }
开发者ID:TMSolution,项目名称:SmsBundle,代码行数:34,代码来源:UserResponse.php

示例4: __construct

 /**
  * Constructor 
  * 
  * @access public
  * @param unknown_type $url
  * @param array $headers
  * @param unknown_type $response
  * @param unknown_type $responseCode
  * @param unknown_type $responseMessage
  * @constructor
  * @return void
  */
 public function __construct($url, array $headers, $response, $responseCode, $responseMessage)
 {
     parent::__construct($url, $headers, $response);
     $this->responseCode = $responseCode;
     $this->responseMessage = $responseMessage;
     $this->_parseHeaders($headers);
 }
开发者ID:oxymore,项目名称:blizzard-api,代码行数:19,代码来源:CurlResponse.php

示例5: __construct

 public function __construct($data)
 {
     parent::__construct($data);
     foreach ($this->data as $courier) {
         $this->couriers[] = new CourierResponse(array('result' => $courier));
     }
 }
开发者ID:Acidter,项目名称:client-php,代码行数:7,代码来源:CourierListResponse.php

示例6: __construct

 public function __construct(View $view)
 {
     $env = new AdminDisplayGraphicalEnvironment();
     $this->full_view = new FileTemplate('admin/AdminMenuDisplayResponse.tpl');
     $this->full_view->put('content', $view);
     $env->display_kernel_message($this->full_view);
     parent::__construct($env, $this->full_view);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:8,代码来源:AdminMenuDisplayResponse.class.php

示例7: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($parameters)
 {
     parent::__construct($parameters);
     $this->status = $this->filteredParameters['STATUS'];
     if (array_key_exists('REMISE', $this->filteredParameters)) {
         $this->discount = $this->filteredParameters['REMISE'];
     }
 }
开发者ID:nexylan,项目名称:paybox-direct,代码行数:11,代码来源:InquiryResponse.php

示例8: __construct

 public function __construct(array $data)
 {
     parent::__construct($data);
     if (isset($data['returnFields'])) {
         $this->searchedFields = $data['returnFields'];
     } else {
         $this->searchedFields = array('id');
     }
 }
开发者ID:raptor404,项目名称:awscloudsearchphp,代码行数:9,代码来源:SearchResponse.php

示例9: foreach

 /**
  * @param $data
  */
 function __construct($data)
 {
     parent::__construct($data);
     $this->list = new \ArrayObject();
     if (isset($this->obj)) {
         foreach ($this->obj as $res) {
             $this->list->append(new SenderResponse($res));
         }
     }
 }
开发者ID:kaloryfer,项目名称:smsapi-php-client,代码行数:13,代码来源:SendersResponse.php

示例10: __construct

 public function __construct($data)
 {
     parent::__construct($data);
     if (isset($this->obj->proCount)) {
         $this->proCount = $this->obj->proCount;
     }
     if (isset($this->obj->ecoCount)) {
         $this->ecoCount = $this->obj->ecoCount;
     }
 }
开发者ID:smsapicom,项目名称:smsapicom-php-client,代码行数:10,代码来源:PointsResponse.php

示例11: __construct

 public function __construct($data)
 {
     parent::__construct($data);
     foreach ($this->data['checkpoints'] as $checkpoint) {
         $this->checkpoints[] = new CheckpointResponse(array('result' => $checkpoint));
     }
     foreach ($this->data['extra'] as $extra) {
         $this->extra[] = new TrackingExtraResponse(array('result' => $extra));
     }
 }
开发者ID:Acidter,项目名称:client-php,代码行数:10,代码来源:TrackingInfoResponse.php

示例12:

 /**
  * @param $data
  */
 function __construct($data)
 {
     parent::__construct($data);
     if (isset($this->obj->error)) {
         $this->code = $this->obj->error;
     }
     if (isset($this->obj->message)) {
         $this->message = $this->obj->message;
     }
 }
开发者ID:TMSolution,项目名称:SmsBundle,代码行数:13,代码来源:ErrorResponse.php

示例13: __construct

 public function __construct($step_number, $step_title, Template $view)
 {
     $this->load_language_resources();
     $this->init_response($step_number, $view);
     $env = new InstallDisplayGraphicalEnvironment();
     $this->add_language_bar();
     $this->init_steps();
     $this->update_progress_bar();
     $this->full_view->put_all(array('RESTART' => InstallUrlBuilder::welcome()->rel(), 'STEP_TITLE' => $step_title, 'C_HAS_PREVIOUS_STEP' => false, 'C_HAS_NEXT_STEP' => false, 'L_XML_LANGUAGE' => LangLoader::get_message('xml_lang', 'main'), 'PROGRESSION' => floor(100 * $this->current_step / ($this->nb_steps - 1)), 'PHPBOOST_VERSION' => GeneralConfig::load()->get_phpboost_major_version()));
     parent::__construct($env, $this->full_view);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:11,代码来源:InstallDisplayResponse.class.php

示例14: __construct

 public function __construct($step_number, $step_title, Template $view)
 {
     $this->load_language_resources();
     $this->init_response($step_number, $view);
     $env = new UpdateDisplayGraphicalEnvironment();
     $this->add_language_bar();
     $this->init_steps();
     $this->update_progress_bar();
     $this->full_view->put_all(array('RESTART' => UpdateUrlBuilder::introduction()->rel(), 'STEP_TITLE' => $step_title, 'C_HAS_PREVIOUS_STEP' => false, 'C_HAS_NEXT_STEP' => false, 'L_XML_LANGUAGE' => LangLoader::get_message('xml_lang', 'main'), 'PROGRESSION' => floor(100 * $this->current_step / $this->nb_steps)));
     parent::__construct($env, $this->full_view);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:11,代码来源:UpdateDisplayResponse.class.php

示例15: __construct

 /**
  * @param string $json
  */
 public function __construct($json)
 {
     $pagination = json_decode($json, true);
     if (!empty($pagination['links'])) {
         $headerLinks = [];
         foreach ($this->links as $linkName => $relName) {
             if (!empty($pagination['links'][$linkName]['href'])) {
                 $headerLinks[] = sprintf('<%s>; rel="%s"', $pagination['links'][$linkName]['href'], $relName);
             }
         }
         if (!empty($headerLinks)) {
             $this->headers['Link'] = implode(', ', $headerLinks);
         }
     }
     parent::__construct($json);
 }
开发者ID:marcogrueter,项目名称:jsonapi-transformer,代码行数:19,代码来源:Response.php


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