本文整理汇总了PHP中self::setStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP self::setStatus方法的具体用法?PHP self::setStatus怎么用?PHP self::setStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类self
的用法示例。
在下文中一共展示了self::setStatus方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: construct
public static function construct($status, $attribute_id)
{
$element = new self();
$element->setStatus($status);
$element->setAttributeId($attribute_id);
return $element;
}
示例2: constructFailure
public static function constructFailure($attribute_id, $status)
{
$record = new self();
$record->setAttributeId($attribute_id);
$record->setStatus($status);
return $record;
}
示例3: constructFailure
public static function constructFailure($status, $nwk_addr_of_interest)
{
$frame = new self();
$frame->setStatus($status);
$frame->setNwkAddrOfInterest($nwk_addr_of_interest);
return $frame;
}
示例4: createWithSupplierExternalId
/**
* Creates a new instance of Feedback using Smark.io supplierId+externalId as lead key
*
* @param $api_token string your API token
* @param $supplierId string|int the identifier of the supplier in Smark.io
* @param $externalId string|int the identifier of the lead for the supplier.
* @param $status string the status of the lead
* @return Feedback
*/
public static function createWithSupplierExternalId($api_token, $supplierId, $externalId, $status)
{
$feedback = new self($api_token);
$feedback->setSupplierId($supplierId);
$feedback->setExternalId($externalId);
$feedback->setStatus($status);
return $feedback;
}
示例5: constructWithError
/**
* If there is an error code, we do not need the full AttributeReportingConfigurationRecord
*
* @param $status
* @param $direction
* @param $attribute_id
* @return AttributeReportingConfigurationStatusRecord
*/
public static function constructWithError($status, $direction, $attribute_id)
{
$element = new self();
$element->setStatus($status);
$element->setDirection($direction);
$element->setAttributeId($attribute_id);
return $element;
}
示例6: createFromArray
public static function createFromArray(array $row)
{
$order = new self();
if (array_key_exists('id', $row)) {
$order->setId($row['id']);
}
$order->setStatus($row['status']);
return $order;
}
示例7: create
/**
* Factory - create the response
*
* @param $data
*
* @return self|boolean
*/
public function create($data)
{
$parent = parent::create($data);
$data = $parent->getData();
$response = new self();
$response->setStatus($parent->getStatus());
$response->setErrorMessage($parent->getErrorMessage());
$response->setUserExists((int) $data > 0);
return $response;
}
示例8: create
/**
* Factory - create the response
*
* @param $data
*
* @return self|boolean
*/
public function create($data)
{
$response = new self();
// Parse XML
try {
$response->setStatus($data['response']['status']);
if (isset($data['response']['errormessage'])) {
$response->setErrormessage($data['response']['errormessage']);
}
if (isset($data['response']['data'])) {
$response->setData($data['response']['data']);
}
return $response;
} catch (\Exception $e) {
$response->setStatus(self::ERROR);
$response->setErrorMessage($e->getMessage());
return false;
}
}
示例9: constructFailure
public static function constructFailure($status, $nwk_addr_of_interest, $endpoint, $app_input_cluster_count, $app_output_cluster_count, $start_index)
{
$frame = new self();
$frame->setStatus($status);
$frame->setNwkAddrOfInterest($nwk_addr_of_interest);
$frame->setEndpoint($endpoint);
$frame->setAppInputClusterCount($app_input_cluster_count);
$frame->setAppOutputClusterCount($app_output_cluster_count);
$frame->setStartIndex($start_index);
return $frame;
}
示例10: construct
public static function construct($network_address, $status, $memory_constrained, $many_to_one, $route_record_required, $next_hop_address)
{
$frame = new self();
$frame->setDestinationAddress($network_address);
$frame->setStatus($status);
$frame->setMemoryConstrained($memory_constrained);
$frame->setManyToOne($many_to_one);
$frame->setRouteRecordRequired($route_record_required);
$frame->setNextHopAddress($next_hop_address);
return $frame;
}
示例11: create
/**
* Factory - create the response
*
* @param $data
*
* @return self|boolean
*/
public function create($data)
{
$parent = parent::create($data);
$data = $parent->getData();
$response = new self();
$response->setStatus($parent->getStatus());
$response->setErrorMessage($parent->getErrorMessage());
if (isset($data['count'])) {
$response->setCount($data['count']);
if ($response->getCount() > 0) {
$response->setSubscribers($data['subscriberlist']['item']);
}
}
return $response;
}
示例12: buildFromResponse
/**
* Build a payment entity based on a json-decoded payment stdClass
*
* @param stdClass $response The payment data
* @return Syspay_Merchant_Entity_Payment The payment object
*/
public static function buildFromResponse(stdClass $response)
{
$chargeback = new self();
$chargeback->setId(isset($response->id) ? $response->id : null);
$chargeback->setStatus(isset($response->status) ? $response->status : null);
$chargeback->setAmount(isset($response->amount) ? $response->amount : null);
$chargeback->setCurrency(isset($response->currency) ? $response->currency : null);
$chargeback->setReasonCode(isset($response->reason_code) ? $response->reason_code : null);
if (isset($response->processing_time) && !is_null($response->processing_time)) {
$chargeback->setProcessingTime(Syspay_Merchant_Utils::tsToDateTime($response->processing_time));
}
if (isset($response->payment)) {
$chargeback->setPayment(Syspay_Merchant_Entity_Payment::buildFromResponse($response->payment));
}
return $chargeback;
}
示例13: parseGuzzleResponse
/**
* @param \Guzzle\Http\Message\Response $guzzleResponse
* @param ActionsInterface $action
* @return Response
*/
public static function parseGuzzleResponse(\Guzzle\Http\Message\Response $guzzleResponse, ActionsInterface $action)
{
$response = new self();
if ($guzzleResponse->getStatusCode() != 200) {
$response->setStatus(false);
$response->setError($response::ERROR_REQUEST_ERROR);
return $response;
}
$responseArray = json_decode($guzzleResponse->getBody(true), true);
$response->setStatus($responseArray['ok']);
if ($response->getStatus() === false) {
$response->setError($responseArray['error']);
return $response;
}
$response->setData($action->parseResponse($responseArray));
return $response;
}
示例14: buildFromResponse
/**
* Build a payment entity based on a json-decoded payment stdClass
*
* @param stdClass $response The payment data
* @return Syspay_Merchant_Entity_Payment The payment object
*/
public static function buildFromResponse(stdClass $response)
{
$refund = new self();
$refund->setId(isset($response->id) ? $response->id : null);
$refund->setReference(isset($response->reference) ? $response->reference : null);
$refund->setAmount(isset($response->amount) ? $response->amount : null);
$refund->setCurrency(isset($response->currency) ? $response->currency : null);
$refund->setStatus(isset($response->status) ? $response->status : null);
$refund->setExtra(isset($response->extra) ? $response->extra : null);
$refund->setDescription(isset($response->description) ? $response->description : null);
if (isset($response->processing_time) && !is_null($response->processing_time)) {
$refund->setProcessingTime(Syspay_Merchant_Utils::tsToDateTime($response->processing_time));
}
if (isset($response->payment)) {
$refund->setPayment(Syspay_Merchant_Entity_Payment::buildFromResponse($response->payment));
}
return $refund;
}
示例15: fromInput
/**
* @return Request
*/
public static function fromInput()
{
global $module;
$model = new self();
$model->setMethod(self::getMethodFromInput());
if (isset($module)) {
$model->setPath($module);
$input = explode('/', $module);
$model->setSegments($input);
}
$model->setBody(InputStream::getInput());
$model->setHeaders(self::getHeadersFromInput());
$model->setParameters($_GET);
$model->setCookies($_COOKIE);
$model->setPost($_POST);
$model->setEnvironment($_SERVER);
$model->setStatus(http_response_code());
$model->setUrl(self::getCurrentUri());
$model->parseData();
return $model;
}