PageRenderTime 61ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/demos/Zend/Wildfire/public/index.php

https://bitbucket.org/ksekar/campus
PHP | 66 lines | 21 code | 17 blank | 28 comment | 0 complexity | 5c368292f1c2ab91b6d3d3b02f49d752 MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.0, MIT
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Wildfire
  17. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. */
  20. /* NOTE: You must have Zend Framework in your include path! */
  21. /*
  22. * Add our Firebug Log Writer to the registry
  23. */
  24. require_once 'Zend/Registry.php';
  25. require_once 'Zend/Log.php';
  26. require_once 'Zend/Log/Writer/Firebug.php';
  27. $writer = new Zend_Log_Writer_Firebug();
  28. $writer->setPriorityStyle(8, 'TABLE');
  29. $writer->setPriorityStyle(9, 'TRACE');
  30. $logger = new Zend_Log($writer);
  31. $logger->addPriority('TABLE', 8);
  32. $logger->addPriority('TRACE', 9);
  33. Zend_Registry::set('logger',$logger);
  34. /*
  35. * Add our Firebug DB Profiler to the registry
  36. */
  37. require_once 'Zend/Db.php';
  38. require_once 'Zend/Db/Profiler/Firebug.php';
  39. $profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
  40. $db = Zend_Db::factory('PDO_SQLITE',
  41. array('dbname' => ':memory:',
  42. 'profiler' => $profiler));
  43. $db->getProfiler()->setEnabled(true);
  44. Zend_Registry::set('db',$db);
  45. /*
  46. * Run the front controller
  47. */
  48. require_once 'Zend/Controller/Front.php';
  49. Zend_Controller_Front::run(dirname(dirname(__FILE__)).'/application/controllers');