Cake engine Outside WebRoot

January 8, 2007
<?
/**
 * This only needs to be changed if the cake installed libs are located
 * outside of the distributed directory structure.
 */
        if (!defined('CAKE_CORE_INCLUDE_PATH')) {
                define('CAKE_CORE_INCLUDE_PATH', ROOT.DS.'..'.DS.'cake1.2');
        }
?>

This file locate in (cake folder distribution) ./app/webroot/index.php, and the logic of this configuration was to find the cake engine below root of the webfolder, in other words your cake engine not visible from the outside-word / no direct testing phpscript.

Lets see on the example (I am using XAMPP).
I Install XAMPP on folder /xampp, with the root of webfolder /xamp/htdocs, so if I am using configuration above, I must install cake engine on /xampp/cake1.2

Include – Require – call – cakephp module / file

December 29, 2006

This is the flow when I call action in cakephp, and it use 1 table.

With Table
app\webroot\index.php – New Dispatcher -> dispatch(url)
–cake\bootstrap.php
—-cake\basics.php
—-app\config\core.php
—-cake\config\paths.php
—-cake\libs\object.php
—-cake\libs\session.php
—-cake\libs\security.php
—-cake\libs\inflector.php
—-cake\libs\configure.php
——app\config\bootstrap.php
—-cake\dispatcher.php
——cake\libs\router.php
——–cake\libs\overloadable.php
———-cake\libs\overloadable_php4.php
——cake\libs\controller\controller.php
——–cake\libs\controller\component.php
——–cake\libs\view\view.php
———-cake\libs\view\helper.php
———-cake\libs\class_registry.php
——app\config\routes.php – parseParams() – dispatch()
——cake\app_controller.php – loadController() – dispatch()
——app\controllers\pages_controller.php – loadController() – dispatch()
——app\config\inflections.php – __initPluralRules() – pluralize() – inflector() – dispatch()
——cake\libs\controller\components\session.php – … – dispatch()
——cake\libs\model\model.php – loadmodel() – loadPluginModel() – dispatch()
——–cake\libs\validators.php
——–cake\libs\model\behavior.php
——–cake\libs\model\connection_manager.php
———-cake\libs\model\datasources\datasource.php
———-app\config\database.php – config() -> basics.php
——–cake\libs\set.php
——cake\app_model.php – loadmodel() – $controller->constructClasses() – dispatch()
——app\models\category.php – loadmodel() – $controller->constructClasses() – dispatch()
——–cake\libs\model\datasources\dbo_source.php – setSource() – __construct() -> model.php
——–cake\libs\model\datasources\dbo\dbo_mysql.php – setSource() – __construct() -> model.php
——cake\app_helper.php
——cake\libs\view\helpers\html.php
——cake\libs\view\helpers\session.php
——app\views\pages\display.thtml

–dispatch()
—-$controller->_initcomponents()
—-$controller->constructClasses()

cakephp svn repository Tortoise

December 18, 2006

for version 1.2
https://svn.cakephp.org/repo/branches/1.2.x.x

for version 1.1
https://svn.cakephp.org/repo/trunk/cake/1.x.x.x

for version 2.x
https://svn.cakephp.org/repo/branches/2.x.x.x
**need developer password**

piece of cakephp diagram: routing, load and flow of cakephp code

November 12, 2006

Some time is hard to understand how the framework work by reading the source of code, to be little bit understand, I draw this picture using mind mapper.

routing, load and flow of cakephp code

Read the rest of this entry »

CakePHP Development on Windows (XAMPP WAMP ?WIMP?)

November 8, 2006

My Development is on windows, I use Apache, two distributions that I like are XAMPP and WAMP, to get full comparison you can go to “Comparison of WAMPs” from WikiPedia
WAMP Comparison from WikiPedia

PHP-eClipse Setup Syntax Highlight for file.thtml

November 8, 2006

This is how I set configuration on PHP-Eclipse to know file.thtml.
first open menu in eclipse as you see in this picture below ( Window -> Preferences ),
eClipseWindowMenu Read the rest of this entry »

It’s Time to note my joy writing cakephp

November 8, 2006

November 3, 2006 I began search and study cakephp framework, and since then I gain a lot of understanding. and I think some of the understanding with this framework need to note.

Hello world!

November 8, 2006

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!


Follow

Get every new post delivered to your Inbox.