Set delivery_type

@author Tom Haskins-Vaughan <tom@harvestcloud.com>
@since  2012-10-24

@param string $deliveryType
336909
public function setDeliveryType($deliveryType)
    {
        if (!in_array($deliveryType, array(
            HubWindow::DELIVERY_TYPE_PICKUP,
            HubWindow::DELIVERY_TYPE_DELIVERY,
        )))
        {
            throw new \InvalidArgumentException('Invalid value for delivery_type');
        }

        $this->delivery_type = $deliveryType;
    }
297663
public function setType($type)
    {
        if ($type === null) {
            $type = self::TYPE_UNDEFINED;
        }

        $this->type = $type;

        return $this;
    }
25731
public function setType($type)
    {
        if (!in_array($type, self::$supported)) {
            throw new \InvalidArgumentException(sprintf(
                    'Invalid LinearGradient Gradient Type ""', (string) $type
            ));
        }
        $this->type = $type;
    }
901989
public function setType(string $type):self
    {
        if (!isset($this->types[$type])) {
            Checkers::notice('Unknown response type [' . $type . ']');
        } else {
            $this->type = $type;
        }
        return $this;
    }
1020910
public function setType(Type $type = null)
    {
        if ($this->type !== $type) {
            $this->type = $type;
        }

        return $this;
    }
1362896
public function set_caching($type)
    {
        if ($type) {
            $this->caching = $type;
        }
        else {
            if ($this->cache) {
                $this->cache->close();
            }
            $this->cache   = null;
            $this->caching = false;
        }
    }
658126
protected function setType($type)
    {
        if ($type == '*/*' || $type == 'application/octet-stream')
        {
            $type = \Module\HttpFoundation\getMimeTypeOfFile($this->getTmpName(), false);
            if ( empty($type) )
                if ( null !== $solved = \Module\HttpFoundation\getMimeTypeOfFile($this->getClientFilename()) )
                    $type = $solved;
                else
                    $type = 'application/octet-stream';
        }

        $this->type = (string) $type;
        return $this;
    }
1114630
public function setType($propelType)
    {
        $this->getDomain()->setType($propelType);
        if ($propelType == PropelTypes::VARBINARY || $propelType == PropelTypes::LONGVARBINARY || $propelType == PropelTypes::BLOB) {
            $this->needsTransactionInPostgres = true;
        }
    }
1070213
public function setContentType($contentType) {
    $this->contentType = $contentType;
    
    $ct = $this->contentType;
    if (isset($this->charset))
      $ct .= '; charset='.$this->charset;

    $this->setMeta('content-type',$ct, TRUE);
  }
83773
public function setOrderDelivery($order_id, $need_delivery = 0, $delivery_company = null, $delivery_track_no = null, $is_others = 0){
		if (!$this->access_token && !$this->checkAuth()) return false;
		if (!$order_id) return false;

		$data = array();
		$data['order_id'] = $order_id;
		if ($need_delivery) {
			$data['delivery_company'] = $delivery_company;
			$data['delivery_track_no'] = $delivery_track_no;
			$data['is_others'] = $is_others;
		}
		else {
			$data['need_delivery'] = $need_delivery;
		}

		$result = $this->http_post(self::API_BASE_URL_PREFIX.self::MERCHANT_ORDER_SETDELIVERY.'access_token='.$this->access_token, self::json_encode($data));
		if ($result)
		{
			$json = json_decode($result,true);
			if (isset($json['errcode']) && $json['errcode']) {
				$this->errCode = $json['errcode'];
				$this->errMsg = $json['errmsg'];
				return false;
			}
			return true;
		}
		return false;
	}
1147266
public function setType($type)
    {
        if (in_array($type, array_keys($this->devices))) {
            $this->type = $type;
        }
    }
894310
public function setType($type = '')
    {
        $this->type = empty($type) ? RouteType::NORMAL : $type;
        return true;
    }
279143
public function setPostType($type)
    {
        if (!in_array($type, [0, 1, 2, 3, 4, 5])) {
            $this->postType = self::POST_FORM_DATA;
        } else {
            $this->postType = $type;
        }
        return $this;
    }
1149244
public function setType($type = null)
    {
        if (! is_null($type) && ! $this->isValidType($type)) {
            throw new InvalidArgumentException("Given batch modification type is invalid.");
        }

        $this->type = $type;

        return $this;
    }
779471
public function setObjectType($type)
    {
        if (!is_null($type)) {
            $type = (string) $type;
        }

        $this->objectType = $type;
        return $this;
    }
48650
public function setClient(DeliveryChoiceClient $client)
    {
        $client->getConfig()->setPath(HttpClient::CURL_OPTIONS . "/" . CURLOPT_TIMEOUT, self::HTTP_REQUEST_TIMEOUT);
        $this->client = $client;
    }
1092531
public function setdeliverytype()
    {
        $this->extend("onBeforeSetDeliveryType");

        $type = $this->request->param("ID");
        
        if ($type && in_array($type, array("deliver", "collect"))) {
            Session::set("Checkout.Delivery", $type);
            Session::clear("Checkout.PostageID");
        }
        
        $this->extend("onAfterSetDeliveryType");
        
        $this->redirectBack();
    }