Test.class.php 502 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Test\Controller;
  3. use KIF\Core\Controller;
  4. use Test\Dao\ProductIndex;
  5. class Test extends Controller {
  6. public function run() {
  7. $action = $this->action;
  8. $this->$action();
  9. }
  10. private function doDefault() {
  11. $this->tpl = 'test';
  12. $objProductIndex = new ProductIndex();
  13. $productIndex = $objProductIndex->get(100000);
  14. $this->setOutput('test', '我是测试');
  15. $this->setOutput('productIndex', $productIndex);
  16. }
  17. public function display() {
  18. $this->render();
  19. }
  20. }