本文整理汇总了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));
}
}
示例2: __construct
public function __construct($data)
{
parent::__construct($data);
if ($this->data['last_checkpoint']) {
$this->lastCheckpoint = new CheckpointResponse(array('result' => $this->data['last_checkpoint']));
}
}
示例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;
}
}
示例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);
}
示例5: __construct
public function __construct($data)
{
parent::__construct($data);
foreach ($this->data as $courier) {
$this->couriers[] = new CourierResponse(array('result' => $courier));
}
}
示例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);
}
示例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'];
}
}
示例8: __construct
public function __construct(array $data)
{
parent::__construct($data);
if (isset($data['returnFields'])) {
$this->searchedFields = $data['returnFields'];
} else {
$this->searchedFields = array('id');
}
}
示例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));
}
}
}
示例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;
}
}
示例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));
}
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}