当前位置: 首页>>代码示例>>PHP>>正文


PHP Output::render方法代码示例

本文整理汇总了PHP中Output::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Output::render方法的具体用法?PHP Output::render怎么用?PHP Output::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Output的用法示例。


在下文中一共展示了Output::render方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: writeJs

 /**
  * Write js if not already written
  *
  * @param Output $output
  */
 public function writeJs(Output $output)
 {
     if (!$this->isJsWasWritten()) {
         $output->render('js.html');
         $this->setJsWritten(true);
     }
 }
开发者ID:marmotz,项目名称:dumper,代码行数:12,代码来源:HtmlDump.php

示例2: handleOriginResponse

 /**
  * Handles a response from Origin, generally the last item in the lifecycle of a request
  *
  * @param mixed $response
  *
  * @return void
  */
 private function handleOriginResponse($response)
 {
     /**
      * Origin didn't have the object
      */
     if ($response === false) {
         \Output::render404();
     }
     /**
      * We're good to go, start rendering
      */
     \Output::sendHeader($_SERVER['SERVER_PROTOCOL'] . ' 200 OK');
     /**
      * Origin had the object, and it's now stored on disk, render the stored object
      */
     if ($response === true) {
         if (isset($_COOKIE['is_redirecting']) === true) {
             sleep(2);
         }
         \setcookie('is_redirecting', 1, time() + 5);
         \Output::sendHeader('Location: ' . $this->request['path']);
         $this->isRedirect = true;
     }
     if (is_object($response) === true) {
         /**
          * It's a streaming object, so we'll render it from here
          */
         \Output::sendHeader($_SERVER['SERVER_PROTOCOL'] . ' 200 OK');
         \Output::render(\Output::decodeWireObject($response->object));
     }
 }
开发者ID:Cigarent,项目名称:personalweb,代码行数:38,代码来源:Handler.php

示例3: doDumpObject

 /**
  * Do dump object variable
  *
  * @param Proxy\ObjectProxy $object
  * @param Output            $output
  */
 public function doDumpObject(Proxy\ObjectProxy $object, Output $output)
 {
     $output->setPrefixFontOptions('bggreen;fgwhite;bold');
     $output->render('object.cli', array('object' => $object));
 }
开发者ID:marmotz,项目名称:dumper,代码行数:11,代码来源:CliDump.php

示例4: OAuth2Session

        // Try to get an access token using the authorization code grant.
        $accessToken = $provider->getAccessToken('authorization_code', ['code' => $_GET['code'], 'verify' => false]);
        $session = new OAuth2Session($provider, $accessToken);
        echo new View('request-response', ['title' => 'Get User', 'request' => $session->rawGetRequest('user'), 'response' => $session->get('user')]);
        echo new View('request-response', ['title' => 'Get Company', 'request' => $session->rawGetRequest('company'), 'response' => $session->get('company')]);
        $projects = $session->get('projects');
        echo new View('request-response', ['title' => 'Get Projects', 'request' => $session->rawGetRequest('projects'), 'response' => $projects]);
        $projectsData = json_decode($projects->getBody(), true);
        $project = $projectsData[0];
        $classification = $session->get('classifications/' . $project['classification_id']);
        echo new View('request-response', ['title' => 'Get Classification', 'request' => $session->rawGetRequest('classifications/' . $project['classification_id']), 'response' => $classification]);
        $classificationData = json_decode($classification->getBody(), true);
        $form = $classificationData['forms'][0];
        echo new View('request-response', ['title' => 'Get Form Content', 'request' => $session->rawGetRequest('forms/' . $form['name']), 'response' => $session->get('forms/' . $form['name'])]);
        echo new View('request-response', ['title' => 'Get Form Pre-population Data for Project', 'request' => $session->rawGetRequest('projects/' . $project['id'] . '/forms/' . $form['name'] . '/prepopulate-data'), 'response' => $session->get('projects/' . $project['id'] . '/forms/' . $form['name'] . '/prepopulate-data')]);
        $formEntryResponse = $session->post('projects/' . $project['id'] . '/forms/' . $form['name'], ['test_field' => 'aaa']);
        echo new View('request-response', ['title' => 'Post Form Data for Project', 'request' => $session->rawPostRequest('projects/' . $project['id'] . '/forms/' . $form['name'], ['test_field' => 'aaa']), 'response' => $formEntryResponse]);
        if (INCLUDE_FORM_SUBMISSION) {
            $formEntry = json_decode($formEntryResponse->getBody(), true);
            $imageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAASOklEQVR4Xu1de5gkVXU/p3qmd4wOKypqfO8GRNgH2/fWzDCuwJoVAx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5f76ir7yQPOB53uWtws7i0HipDnZ1F0/9munneiKSWkyJTQ0AY8wbELFp2vaskSTRUyp6HeYIMsasRMSmhR8SJe4tgRyFi4tZfjVmPkb2s4gosRGyUXapc9yxmTDzG8Mw/KpmADUAhoeHX95oNMQVrGriD5C05tkbkZTl4FVjFkT7NaDZhx3QlRoAwuD7/reZea2DoiVV+31BEMjJ4JPWwForJdZPd+ijIHXQACLeGQTBa7QsTgCII4HFfLuauvuYWS5YuAsR5RKoI+n9r9VlHujEEXeSS4SwEwBkhsaY6+WpbmO28o2adJ7QRvcLl5WZPxqGoWaj/pSSnAEgRZ6np6clrXrpwlV1Lme+o1wuL9d+rqbaAxxg8n3/LGa+LZdqWKBCIeLrgiCQG1ecmrMFOAgE1zCzXKdamHMnlWdOLEkx1wZBIKHuzi01AOKvAvHnS+3fXpx3O092HjLsRcRLgiBYn3ZubQEg3hTKwY7c3tGseFNa2Qq+1hp4MA6+0Xhpm/bUNgCk5zhNXEKR1dGoxeq2pYHb6/X65e2khbe1CWwmelwfUD4R8+rnb0vrOWC+LYqij2ZZLzATCzBbMb7vV8RxxMziPXS5RCkHOs6dCFJMS97x1wdBUMtauo4A4ICQcXFHuRRKkiPkJ67SpLjCrOd4pPX3OABIWpok1dw9MDAw1qnb0EUxHQXAbM1LEggiVpj5VYi4mpmlZKt41OS30L4kJMhWwsV/gog/ZGaJHbybmSWsrmnF1KzR/P/XyiHq6D1jdwAAAABJRU5ErkJggg==';
            $formPhotoPostResponse = $session->post('projects/' . $project['id'] . '/forms/' . $form['name'] . '/photo/' . $formEntry['_id'], ['photo' => $imageData, 'mime_type' => 'image/png', 'description' => 'Some description']);
            echo new View('request-response', ['title' => 'Post Form Data for Project', 'request' => $session->rawPostRequest('projects/' . $project['id'] . '/forms/' . $form['name'] . '/photo/' . $formEntry['_id'], ['photo' => $imageData, 'mime_type' => 'image/png', 'description' => 'Some description']), 'response' => $formPhotoPostResponse]);
            $formPhotoEntry = json_decode($formPhotoPostResponse->getBody(), true);
            echo '<img src="data:image/png;base64,' . $formPhotoEntry['data'] . '">';
        }
    } catch (\League\OAuth2\Client\Provider\Exception\IdentityProviderException $e) {
        echo $e->getMessage();
    }
}
Output::render();
开发者ID:ebollens,项目名称:cloudcompli-php-api,代码行数:30,代码来源:basic.php


注:本文中的Output::render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。