예제 #1
0
 public function __construct($data)
 {
     parent::__construct($data);
     foreach ($this->data['trackings'] as $courier) {
         $this->trackings[] = new TrackingInfoShortResponse(array('result' => $courier));
     }
 }
 public function __construct($data)
 {
     parent::__construct($data);
     if ($this->data['last_checkpoint']) {
         $this->lastCheckpoint = new CheckpointResponse(array('result' => $this->data['last_checkpoint']));
     }
 }
예제 #3
0
 /**
  * @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
0
 /**
  * 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
0
 public function __construct($data)
 {
     parent::__construct($data);
     foreach ($this->data as $courier) {
         $this->couriers[] = new CourierResponse(array('result' => $courier));
     }
 }
 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
0
 /**
  * {@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'];
     }
 }
 public function __construct(array $data)
 {
     parent::__construct($data);
     if (isset($data['returnFields'])) {
         $this->searchedFields = $data['returnFields'];
     } else {
         $this->searchedFields = array('id');
     }
 }
 /**
  * @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));
         }
     }
 }
 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
0
 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
0
 /**
  * @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;
     }
 }
 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);
 }
 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
0
 /**
  * @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);
 }
예제 #16
0
 /**
  *
  * @param array $response
  * @return void
  */
 public function __construct($response = array())
 {
     if (isset($response['data'])) {
         parent::__construct($response);
         $data = $response['data'];
     } else {
         $data = $response;
     }
     $this->_uuid = isset($data['uuid']) ? $data['uuid'] : null;
     $this->_isValid = isset($data['isValid']) ? $data['isValid'] : false;
     $this->_usedAt = isset($data['usedAt']) ? $data['usedAt'] : null;
     $this->_activatedAt = isset($data['activatedAt']) ? $data['activatedAt'] : null;
     $this->_expiresAt = isset($data['expiresAt']) ? $data['expiresAt'] : null;
     if (isset($data['coupon'])) {
         $couponData = $data['coupon'];
         $couponData['uuid'] = $this->_uuid;
         $this->_coupon = new Coupon(array('data' => $couponData));
     }
 }
예제 #17
0
 /**
  * @param $data
  */
 function __construct($data)
 {
     if (is_object($data)) {
         $this->obj = $data;
     } else {
         if (is_string($data)) {
             parent::__construct($data);
         }
     }
     if (isset($this->obj->sender)) {
         $this->name = $this->obj->sender;
     }
     if (isset($this->obj->status)) {
         $this->status = $this->obj->status;
     }
     if (isset($this->obj->default)) {
         $this->default = $this->obj->default;
     }
 }
예제 #18
0
 /**
  * @param $data
  */
 function __construct($data)
 {
     if (is_object($data)) {
         $this->obj = $data;
     } else {
         if (is_string($data)) {
             parent::__construct($data);
         }
     }
     if (isset($this->obj->name)) {
         $this->name = $this->obj->name;
     }
     if (isset($this->obj->info)) {
         $this->info = $this->obj->info;
     }
     if (isset($this->obj->numbers_count)) {
         $this->numbers_count = $this->obj->numbers_count;
     }
 }
 public function __construct($response)
 {
     parent::__construct($response);
 }
 /**
  * @param $data
  */
 function __construct($data)
 {
     parent::__construct($data);
     $this->count = isset($this->obj->count) ? $this->obj->count : 0;
 }
예제 #21
0
 public function __construct()
 {
     parent::__construct();
     $this->set('ok', true);
     $this->icon('ok', 'green');
 }
 public function __construct($view)
 {
     parent::__construct(new SiteNodisplayGraphicalEnvironment(), $view);
 }
예제 #23
0
 /**
  * @inheritdoc
  */
 function __construct($response = null, $data = null)
 {
     parent::__construct($response, $data);
 }
예제 #24
0
 /**
  * @param string    $response
  * @param mixed     $data
  * @param int       $id
  */
 function __construct($response, $data = null, $id = null)
 {
     parent::__construct($response, $data);
     $this->id = $id;
 }
예제 #25
0
파일: Coupon.php 프로젝트: Synerise/PHP-SDK
 public function __construct(array $response)
 {
     if (isset($response['data'])) {
         parent::__construct($response);
         $data = $response['data'];
     } else {
         $data = $response;
     }
     $this->_uuid = isset($data['uuid']) ? $data['uuid'] : null;
     $this->_name = isset($data['name']) ? $data['name'] : null;
     $this->_description = isset($data['description']) ? $data['description'] : null;
     $this->_additionalDescription = isset($data['additionalDescription']) ? $data['additionalDescription'] : null;
     $this->_termsUrl = isset($data['termsUrl']) ? $data['termsUrl'] : null;
     $this->_discountType = isset($data['discountType']) ? $data['discountType'] : null;
     $this->_discountValue = isset($data['discountValue']) ? $data['discountValue'] : null;
     $this->_startAt = isset($data['startAt']) ? $data['startAt'] : null;
     $this->_endAt = isset($data['endAt']) ? $data['endAt'] : null;
     $this->_image = isset($data['image']) ? $data['image'] : null;
     $this->_validFor = isset($data['validFor']) ? $data['validFor'] : null;
     $this->_code = isset($data['code']) ? $data['code'] : null;
     $this->_tags = isset($data['tags']) ? $data['tags'] : null;
     $this->_locations = isset($data['locations']) ? $data['locations'] : null;
     $this->_attributes = isset($data['attributes']) ? $data['attributes'] : null;
     $this->_products = isset($data['products']) ? $data['products'] : null;
     $this->_limitGlobal = isset($data['limitGlobal']) ? $data['limitGlobal'] : null;
     $this->_limitPerClient = isset($data['limitPerClient']) ? $data['limitPerClient'] : null;
     $this->_activationRequired = isset($data['activationRequired']) ? $data['activationRequired'] : null;
     $this->_strictUse = isset($data['strictUse']) ? $data['strictUse'] : null;
 }
 /**
  * Constructor
  */
 public function __construct(array $data)
 {
     parent::__construct($data);
 }
예제 #27
0
 public function __construct()
 {
     parent::__construct();
     $this->getHttpResponse()->setStatusCode(401);
 }
예제 #28
0
 /**
  * Constructor
  *
  * @access public
  * @param string $url
  * @param array $headers
  * @param string $response
  * @constructor
  * @return void
  */
 public function __construct($url, array $headers, $response)
 {
     parent::__construct($url, $headers, $response);
     $this->_parseHeaders($headers);
 }
 public function __construct($view)
 {
     parent::__construct(new AdminDisplayFrameGraphicalEnvironment(), $view);
 }
예제 #30
0
 /**
  * Constructor.
  *
  * @param mixed $id
  * @param mixed $result
  */
 public function __construct($id, $result)
 {
     parent::__construct($id);
     $this->result = $result;
 }