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


PHP App::render方法代码示例

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


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

示例1: testRenderWithStatusCode

 public function testRenderWithStatusCode()
 {
     $mock = $this->getMock('View\\TemplateEngineInterface');
     $mock->expects($this->once())->method('render')->will($this->returnValue('Heya'));
     $app = new \App($mock);
     $this->assertEquals('Heya', $app->render('a/template.php', array(), 201));
     $this->assertEquals(201, $this->readStatusCode($app));
 }
开发者ID:yannisrichard,项目名称:uframework,代码行数:8,代码来源:AppTest.php

示例2: index

 public function index($page = array())
 {
     if (!$page) {
         App::render('docs/index.twig', $this->data);
     } else {
         $page = 'docs/' . implode('/', $page) . '.twig';
         App::render($page, $this->data);
     }
 }
开发者ID:lupuxyz,项目名称:SlimStarter,代码行数:9,代码来源:DocController.php

示例3: render

 public function render()
 {
     $html = '';
     if ($this->block !== null) {
         foreach ($this->block as $block) {
             $html .= App::render("components/{$block}");
         }
     }
     return $html;
 }
开发者ID:brainsum,项目名称:minit.cz,代码行数:10,代码来源:Page.php

示例4: index

 public function index()
 {
     $req = App::request();
     if ($req->isPost()) {
         if ($this->auth->login($req->post('user'), $req->post('passwd'))) {
             App::flash('info', "Your login was successful")->redirect('home');
         } else {
             App::flash('error', 'Your username or password was wrong');
         }
     }
     App::render('auth/login');
 }
开发者ID:suryakencana,项目名称:tekkadan,代码行数:12,代码来源:Login.php

示例5: positem

 public function positem()
 {
     $grid['folder'] = "Penjualan";
     $grid['title'] = "Entri penjualan item";
     $grid['url_item'] = APP::urlFor('item.dataset');
     $grid['url_item_uom'] = APP::urlFor('unitOM.dataset');
     $grid['url_item_batch'] = APP::urlFor('batch.stockEntries');
     $grid['url_dosis'] = APP::urlFor('selling.dosis');
     $grid['url_stok_balance'] = APP::urlFor('stok.balance');
     $grid["url_price_list"] = App::urlFor("selling.pricelist");
     $grid['url_gudang'] = APP::urlFor('warehouse.dataset');
     App::render('selling/form_penjualan', $grid);
 }
开发者ID:suryakencana,项目名称:tekkadan,代码行数:13,代码来源:Selling.php

示例6: welcome

 public function welcome()
 {
     $res = UBTSDK::getInstance()->getAccessToken();
     var_dump($res);
     exit;
     /*
     $app = Slim::getInstance();
     $app = $this->app;
     $memConfig = $app->config('memcache');
     $cacheHandler = MyPDOCacher::getInstance();
     */
     $this->loadCss('landing-page.css');
     $this->loadCss('font-awesome.min.css');
     $this->data['title'] = 'Welcome to iBus admin';
     App::render('welcome.twig', $this->data);
 }
开发者ID:Rming,项目名称:haowen,代码行数:16,代码来源:HomeController.php

示例7: v005

 public function v005($id = null)
 {
     $grid['folder'] = "Stock";
     $grid['title'] = "Form batch / Brand Item";
     $grid['url_submit'] = App::urlFor("batch.s003");
     $data = null;
     if (!is_null($id)) {
         $data = Batch::find($id);
         $grid['is_read_only'] = true;
     }
     $grid['data'] = $data;
     $grid['url_price_list'] = APP::urlFor('pricelist.dataset');
     $grid['url_item'] = APP::urlFor('item.dataset');
     App::render('batch/form_batch', $grid);
 }
开发者ID:suryakencana,项目名称:tekkadan,代码行数:15,代码来源:Batch.php

示例8: v005

 public function v005($id = null)
 {
     $grid['folder'] = "Stock";
     $grid['title'] = "Form Unit of Measure / Satuan Item";
     $data = null;
     if (!is_null($id)) {
         $data = Principal::find($id);
     }
     $grid['data'] = $data;
     $grid['url_submit'] = App::urlFor("principal.s003");
     App::render('principal/form_principal', $grid);
 }
开发者ID:suryakencana,项目名称:tekkadan,代码行数:12,代码来源:Principal.php

示例9: TestChat

 public function TestChat()
 {
     $grid["folder"] = "Chat";
     App::render('/viewku/test_chat', $grid);
 }
开发者ID:suryakencana,项目名称:tekkadan,代码行数:5,代码来源:Test.php

示例10: welcome

 public function welcome()
 {
     $this->data['title'] = 'Actugaming - Accueil';
     App::render('welcome.twig', $this->data);
 }
开发者ID:Cybercraft,项目名称:SlimMVC,代码行数:5,代码来源:HomeController.php

示例11: entry

 /**
  * Stock Entry ada 3 jenis
  * - item issue (keluar)[from warehouse]
  * - item receipt (masuk)[to warehouse]
  * - item transfer (mutasi)[from wh to wh]
  */
 public function entry($tipe)
 {
     $tipe_arr = array('MASUK', 'KELUAR');
     if (in_array($tipe, $tipe_arr)) {
         $grid['folder'] = "Stok";
         $grid['title'] = "Stok " . $tipe;
         // Default Value
         $grid['data']['entry_kode'] = "STE-" . ZiUtil::GetNowID();
         $grid['data']['posting_date'] = date("Y-m-d");
         $grid['data']['posting_time'] = date("H:i:s");
         $grid['data']['stok_entry_tipe'] = $tipe;
         $grid['data']['from_warehouse'] = '7c87a8d69bc21df012ae8e3b17c5fff7';
         $grid['data']['to_warehouse'] = '';
         if ($tipe == 'MASUK') {
             $grid['data']['from_warehouse'] = '';
             $grid['data']['to_warehouse'] = '7c87a8d69bc21df012ae8e3b17c5fff7';
         }
         $grid['gridtitle'] = "Stock Entries";
         /****
          * barcode: "11245"
          * from_warehouse: "20151112698730750"
          * item_batch: "ITEM-KENALOG-5g-0001"
          * item_kode: "ITEM-KENALOG-5g"
          * item_nama: "KENALOG"
          * item_price: "4.566"
          * item_qty: "33.324"
          * item_serial: ""
          * item_uom: "BOX"
          * keterangan: "asdqweqw"
          * to_warehouse: "7c87a8d69bc21df012ae8e3b17c5fff7"
          */
         $cols = array();
         $cols[] = json_decode('{"field": "state", "checkbox": true}');
         $cols[] = json_decode('{ "title": "id", "field": "id", "visible": false}');
         $cols[] = json_decode('{ "title": "Serial No..", "field": "item_serial", "visible": false}');
         $cols[] = json_decode('{ "title": "Batch No.", "field": "item_batch", "visible": false}');
         $cols[] = json_decode('{ "title": "Kode Item", "field": "item_kode"}');
         $cols[] = json_decode('{ "title": "Nama Item","field": "item_nama"}');
         $cols[] = json_decode('{ "title": "UOM", "field": "item_uom", "visible": false}');
         $cols[] = json_decode('{ "title": "Keterangan", "field": "keterangan", "visible": false}');
         $cols[] = json_decode('{ "title": "Dari Gudang", "field": "from_warehouse", "visible": false}');
         $cols[] = json_decode('{ "title": "Dari Gudang", "field": "from_warehouse_nama"}');
         $cols[] = json_decode('{ "title": "Ke Gudang", "field": "to_warehouse", "visible": false}');
         $cols[] = json_decode('{ "title": "Ke Gudang", "field": "to_warehouse_nama"}');
         $cols[] = json_decode('{ "title": "Qty", "field": "item_qty"}');
         $cols[] = json_decode('{ "title": "Actual Qty", "field": "actual_qty"}');
         $cols[] = json_decode('{ "title": "Basic Rate", "field": "item_price", "visible": false}');
         $cols[] = json_decode('{ "title": "Total Harga", "field": "item_amount"}');
         $grid["cols"] = json_encode($cols);
         //    $grid['source_url'] = APP::urlFor('pasien.jenispasien');
         $grid['url_submit'] = APP::urlFor('stok.s003');
         $grid['url_entry_tipe'] = APP::urlFor('stok.entrytipe');
         $grid['url_gudang'] = APP::urlFor('warehouse.dataset');
         $grid['modal_form'] = APP::urlFor('stok.entryitem');
         App::render('stock/form_entry', $grid);
     } else {
         App::flash('info', 'Menu yang anda tuju tidak ada');
         App::redirect('stok.list_stock_entry');
     }
 }
开发者ID:suryakencana,项目名称:tekkadan,代码行数:66,代码来源:Stok.php

示例12: v005

 public function v005($id = null)
 {
     $grid['folder'] = "<a href=\"" . App::urlFor('item.index') . "\">Stock</a>";
     $grid['title'] = "Form Item";
     //    $grid['data']['item_kode'] = "ITEM-".ZiUtil::GetNowID();
     $grid['url_itemprice'] = App::urlFor("itemprice.filter");
     $grid['url_submit'] = App::urlFor("item.s003");
     $grid['url_item_uom'] = APP::urlFor('unitOM.dataset');
     $grid['url_item_grup'] = APP::urlFor('item.grupitem');
     $grid['url_principal'] = APP::urlFor('principal.dataset');
     $grid['url_gudang'] = APP::urlFor('warehouse.dataset');
     $data = null;
     if (!is_null($id)) {
         $data = Item::find($id);
     }
     $grid['data'] = $data;
     App::render('item/form_item', $grid);
 }
开发者ID:suryakencana,项目名称:tekkadan,代码行数:18,代码来源:Item.php

示例13: function

 */
$app->get('/statuses', function (Request $request) use($app, $statusFinder) {
    if (!is_null($request->getParameter('where'))) {
        $criteria['where'] = $request->getParameter('where');
    }
    if (!is_null($request->getParameter('orderBy'))) {
        $criteria['orderBy'] = $request->getParameter('orderBy');
    }
    if (!is_null($request->getParameter('limit'))) {
        $criteria['limit'] = $request->getParameter('limit');
    }
    $data = array('statuses' => $statusFinder->findAll($criteria));
    if ($request->guessBestFormat() === 'json') {
        return new JsonResponse($data);
    }
    return $app->render('index.php', $data);
});
/**
 * Get a status
 */
$app->get('/statuses/(\\d+)', function (Request $request, $id) use($app, $statusFinder) {
    if (is_null($status = $statusFinder->findOneById($id))) {
        throw new HttpException(404, 'Oups! This status cannot be found :(');
    }
    $data = array('status' => $status);
    if ($request->guessBestFormat() === 'json') {
        return new JsonResponse($data);
    }
    return $app->render('status.php', $data);
});
/**
开发者ID:jkermes,项目名称:uFramework,代码行数:31,代码来源:app.php

示例14: App

<?php

session_start();
require_once __DIR__ . '/app/Config.php';
require_once ROOT_DIR . '/vendor/autoload.php';
require_once ROOT_DIR . '/app/App.php';
$app = new App();
$app->init();
$app->process();
$app->render();
$app->terminate();
开发者ID:jandjerry,项目名称:tinyfw,代码行数:11,代码来源:index.php

示例15: finish

 /**
  * Display finish page
  */
 public function finish()
 {
     App::render('install/finish.twig', $this->data);
 }
开发者ID:lupuxyz,项目名称:SlimStarter,代码行数:7,代码来源:InstallController.php


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