buildRequestString() 공개 정적인 메소드

public static buildRequestString ( array $request ) : mixed
$request array
리턴 mixed
예제 #1
0
 /**
  * @param integer $entityId
  * @return string
  */
 public function createFollowRequestQuery($entityId)
 {
     $entityName = $this->getEntityIdName();
     $dataJson = ['options' => [$entityName => (string) $entityId], 'context' => []];
     if ($entityName == 'interest_id') {
         $dataJson['options']['interest_list'] = 'favorited';
     }
     $post = ['data' => json_encode($dataJson, JSON_FORCE_OBJECT)];
     return UrlBuilder::buildRequestString($post);
 }
예제 #2
0
 /**
  * Creates Pinterest API search request.
  *
  * @param string $query
  * @param string $scope
  * @param array $bookmarks
  *
  * @return string
  */
 protected function createSearchQuery($query, $scope, $bookmarks = [])
 {
     $dataJson = $this->appendBookMarks($bookmarks, ['scope' => $scope, 'query' => $query]);
     $request = Request::createRequestData($dataJson, $bookmarks);
     return UrlBuilder::buildRequestString($request);
 }
예제 #3
0
 /**
  * Create request string.
  *
  * @param array  $data
  * @param array  $bookmarks
  *
  * @return string
  */
 public static function createQuery(array $data = [], $bookmarks = [])
 {
     $data = empty($data) ? new \stdClass() : $data;
     $request = self::createRequestData(['options' => $data], $bookmarks);
     return UrlBuilder::buildRequestString($request);
 }