CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 1.2 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 1.2
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Classes

  • AclBase
  • AclBehavior
  • AclComponent
  • AclNode
  • AclShell
  • Aco
  • AcoAction
  • AjaxHelper
  • ApcEngine
  • ApiShell
  • App
  • AppController
  • AppHelper
  • AppModel
  • Aro
  • AuthComponent
  • BakeShell
  • BehaviorCollection
  • Cache
  • CacheEngine
  • CacheHelper
  • CakeErrorController
  • CakeLog
  • CakeSchema
  • CakeSession
  • CakeSocket
  • ClassRegistry
  • Component
  • Configure
  • ConnectionManager
  • ConsoleShell
  • ContainableBehavior
  • Controller
  • ControllerTask
  • CookieComponent
  • DataSource
  • DbAcl
  • DbAclSchema
  • DbConfigTask
  • DboAdodb
  • DboDb2
  • DboFirebird
  • DboMssql
  • DboMysql
  • DboMysqlBase
  • DboMysqli
  • DboOdbc
  • DboOracle
  • DboPostgres
  • DboSource
  • DboSqlite
  • DboSybase
  • Debugger
  • EmailComponent
  • ErrorHandler
  • ExtractTask
  • File
  • FileEngine
  • Flay
  • Folder
  • FormHelper
  • Helper
  • HtmlHelper
  • HttpSocket
  • I18n
  • I18nModel
  • i18nSchema
  • I18nShell
  • Inflector
  • IniAcl
  • JavascriptHelper
  • JsHelper
  • JsHelperObject
  • L10n
  • MagicDb
  • MagicFileResource
  • MediaView
  • MemcacheEngine
  • Model
  • ModelBehavior
  • ModelTask
  • Multibyte
  • NumberHelper
  • Object
  • Overloadable
  • Overloadable2
  • PagesController
  • PaginatorHelper
  • Permission
  • PluginTask
  • ProjectTask
  • RequestHandlerComponent
  • Router
  • RssHelper
  • Sanitize
  • Scaffold
  • ScaffoldView
  • SchemaShell
  • Security
  • SecurityComponent
  • SessionComponent
  • SessionHelper
  • SessionsSchema
  • Set
  • Shell
  • String
  • TestSuiteShell
  • TestTask
  • TextHelper
  • ThemeView
  • TimeHelper
  • TranslateBehavior
  • TreeBehavior
  • Validation
  • View
  • ViewTask
  • XcacheEngine
  • Xml
  • XmlElement
  • XmlHelper
  • XmlManager
  • XmlNode
  • XmlTextNode

Functions

  • __enclose
  • make_clean_css
  • mb_encode_mimeheader
  • mb_stripos
  • mb_stristr
  • mb_strlen
  • mb_strpos
  • mb_strrchr
  • mb_strrichr
  • mb_strripos
  • mb_strrpos
  • mb_strstr
  • mb_strtolower
  • mb_strtoupper
  • mb_substr
  • mb_substr_count
  • write_css_cache
  1: <?php
  2: /* SVN FILE: $Id$ */
  3: /**
  4:  * Short description for file.
  5:  *
  6:  * Long description for file
  7:  *
  8:  * PHP versions 4 and 5
  9:  *
 10:  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 11:  * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 12:  *
 13:  * Licensed under The MIT License
 14:  * Redistributions of files must retain the above copyright notice.
 15:  *
 16:  * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 17:  * @link          http://cakephp.org CakePHP(tm) Project
 18:  * @package       cake
 19:  * @subpackage    cake.cake.console.libs
 20:  * @since         CakePHP(tm) v 1.2.0.5669
 21:  * @version       $Revision$
 22:  * @modifiedby    $LastChangedBy$
 23:  * @lastmodified  $Date$
 24:  * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
 25:  */
 26: /**
 27:  * Shell for I18N management.
 28:  *
 29:  * @package       cake
 30:  * @subpackage    cake.cake.console.libs
 31:  */
 32: class I18nShell extends Shell {
 33: /**
 34:  * Contains database source to use
 35:  *
 36:  * @var string
 37:  * @access public
 38:  */
 39:     var $dataSource = 'default';
 40: /**
 41:  * Contains tasks to load and instantiate
 42:  *
 43:  * @var array
 44:  * @access public
 45:  */
 46:     var $tasks = array('DbConfig', 'Extract');
 47: /**
 48:  * Override startup of the Shell
 49:  *
 50:  * @access public
 51:  */
 52:     function startup() {
 53:         $this->_welcome();
 54:         if (isset($this->params['datasource'])) {
 55:             $this->dataSource = $this->params['datasource'];
 56:         }
 57: 
 58:         if ($this->command && !in_array($this->command, array('help'))) {
 59:             if (!config('database')) {
 60:                 $this->out(__('Your database configuration was not found. Take a moment to create one.', true), true);
 61:                 return $this->DbConfig->execute();
 62:             }
 63:         }
 64:     }
 65: /**
 66:  * Override main() for help message hook
 67:  *
 68:  * @access public
 69:  */
 70:     function main() {
 71:         $this->out(__('I18n Shell', true));
 72:         $this->hr();
 73:         $this->out(__('[E]xtract POT file from sources', true));
 74:         $this->out(__('[I]nitialize i18n database table', true));
 75:         $this->out(__('[H]elp', true));
 76:         $this->out(__('[Q]uit', true));
 77: 
 78:         $choice = strtolower($this->in(__('What would you like to do?', true), array('E', 'I', 'H', 'Q')));
 79:         switch ($choice) {
 80:             case 'e':
 81:                 $this->Extract->execute();
 82:             break;
 83:             case 'i':
 84:                 $this->initdb();
 85:             break;
 86:             case 'h':
 87:                 $this->help();
 88:             break;
 89:             case 'q':
 90:                 exit(0);
 91:             break;
 92:             default:
 93:                 $this->out(__('You have made an invalid selection. Please choose a command to execute by entering E, I, H, or Q.', true));
 94:         }
 95:         $this->hr();
 96:         $this->main();
 97:     }
 98: /**
 99:  * Initialize I18N database.
100:  *
101:  * @access public
102:  */
103:     function initdb() {
104:         $this->Dispatch->args = array('schema', 'run', 'create', 'i18n');
105:         $this->Dispatch->dispatch();
106:     }
107: /**
108:  * Show help screen.
109:  *
110:  * @access public
111:  */
112:     function help() {
113:         $this->hr();
114:         $this->out(__('I18n Shell:', true));
115:         $this->hr();
116:         $this->out(__('I18n Shell initializes i18n database table for your application', true));
117:         $this->out(__('and generates .pot file(s) with translations.', true));
118:         $this->hr();
119:         $this->out(__('usage:', true));
120:         $this->out('   cake i18n help');
121:         $this->out('   cake i18n initdb [-datasource custom]');
122:         $this->out('');
123:         $this->hr();
124: 
125:         $this->Extract->help();
126:     }
127: }
128: ?>
OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs