Base for a static organization website

cake.php 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/usr/bin/php -q
  2. <?php
  3. /**
  4. * Command-line code generation utility to automate programmer chores.
  5. *
  6. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  7. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  8. *
  9. * Licensed under The MIT License
  10. * For full copyright and license information, please see the LICENSE.txt
  11. * Redistributions of files must retain the above copyright notice.
  12. *
  13. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  14. * @link http://cakephp.org CakePHP(tm) Project
  15. * @package app.Console
  16. * @since CakePHP(tm) v 2.0
  17. */
  18. if (!defined('DS')) {
  19. define('DS', DIRECTORY_SEPARATOR);
  20. }
  21. $dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
  22. if (function_exists('ini_set')) {
  23. $root = dirname(dirname(dirname(__FILE__)));
  24. $appDir = basename(dirname(dirname(__FILE__)));
  25. $install = $root . DS . 'lib';
  26. $composerInstall = $root . DS . $appDir . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
  27. // the following lines differ from its sibling
  28. // /app/Console/cake.php
  29. if (file_exists($composerInstall . DS . $dispatcher)) {
  30. $install = $composerInstall;
  31. } elseif (!file_exists($install . DS . $dispatcher)) {
  32. $install = $root . PATH_SEPARATOR . DS . 'home' . DS . 'kod3' . DS . 'work' . DS . 'vitrine' . DS . 'vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
  33. }
  34. ini_set('include_path', $install . PATH_SEPARATOR . ini_get('include_path'));
  35. unset($root, $appDir, $install, $composerInstall);
  36. }
  37. if (!include $dispatcher) {
  38. trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
  39. }
  40. unset($dispatcher);
  41. return ShellDispatcher::run($argv);