From e62dfb1a310aff5efa285e8bde018314e6f70b50 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Thu, 2 Aug 2012 12:12:19 +0000 Subject: Application Blog fonctionnelle avec repertoire du framework separé et mod-rewrite utilisé (donc le index.php à la racine ne sert pas, c'est le app/webroot/index.php qui sert) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///var/svn/2012-php-weave/trunk@9 d972a294-176a-4cf9-8ea1-fcd5b0c30f5c --- .../src/workdir/in/app/.htaccess | 5 + .../src/workdir/in/app/Config/Schema/db_acl.php | 72 ++ .../src/workdir/in/app/Config/Schema/db_acl.sql | 40 ++ .../src/workdir/in/app/Config/Schema/i18n.php | 49 ++ .../src/workdir/in/app/Config/Schema/i18n.sql | 26 + .../src/workdir/in/app/Config/Schema/sessions.php | 46 ++ .../src/workdir/in/app/Config/Schema/sessions.sql | 16 + .../src/workdir/in/app/Config/acl.ini.php | 68 ++ .../src/workdir/in/app/Config/acl.php | 134 ++++ .../src/workdir/in/app/Config/bootstrap.php | 181 +++++ .../src/workdir/in/app/Config/core.php | 278 ++++++++ .../src/workdir/in/app/Config/database.php | 83 +++ .../src/workdir/in/app/Config/database.php.default | 83 +++ .../src/workdir/in/app/Config/email.php.default | 97 +++ .../src/workdir/in/app/Config/routes.php | 45 ++ .../workdir/in/app/Console/Command/AppShell.php | 31 + .../src/workdir/in/app/Console/Command/Task/empty | 0 .../src/workdir/in/app/Console/Templates/empty | 0 .../src/workdir/in/app/Console/cake | 33 + .../src/workdir/in/app/Console/cake.bat | 32 + .../src/workdir/in/app/Console/cake.php | 33 + .../workdir/in/app/Controller/AppController.php | 35 + .../src/workdir/in/app/Controller/Component/empty | 0 .../workdir/in/app/Controller/PagesController.php | 75 +++ .../workdir/in/app/Controller/PostsController.php | 48 ++ .../src/workdir/in/app/Lib/empty | 0 .../workdir/in/app/Locale/eng/LC_MESSAGES/empty | 0 .../src/workdir/in/app/Model/AppModel.php | 34 + .../src/workdir/in/app/Model/Behavior/empty | 0 .../src/workdir/in/app/Model/Datasource/empty | 0 .../src/workdir/in/app/Model/Post.php | 11 + .../src/workdir/in/app/Plugin/empty | 0 .../in/app/Test/Case/Controller/Component/empty | 0 .../workdir/in/app/Test/Case/Model/Behavior/empty | 0 .../src/workdir/in/app/Test/Case/View/Helper/empty | 0 .../src/workdir/in/app/Test/Fixture/empty | 0 .../src/workdir/in/app/Vendor/empty | 0 .../src/workdir/in/app/View/Elements/empty | 0 .../workdir/in/app/View/Emails/html/default.ctp | 25 + .../workdir/in/app/View/Emails/text/default.ctp | 19 + .../src/workdir/in/app/View/Errors/error400.ctp | 31 + .../src/workdir/in/app/View/Errors/error500.ctp | 28 + .../src/workdir/in/app/View/Helper/AppHelper.php | 34 + .../in/app/View/Layouts/Emails/html/default.ctp | 29 + .../in/app/View/Layouts/Emails/text/default.ctp | 21 + .../src/workdir/in/app/View/Layouts/ajax.ctp | 19 + .../src/workdir/in/app/View/Layouts/default.ctp | 61 ++ .../src/workdir/in/app/View/Layouts/error.ctp | 61 ++ .../src/workdir/in/app/View/Layouts/flash.ctp | 37 ++ .../src/workdir/in/app/View/Layouts/js/default.ctp | 2 + .../workdir/in/app/View/Layouts/rss/default.ctp | 14 + .../workdir/in/app/View/Layouts/xml/default.ctp | 1 + .../src/workdir/in/app/View/Pages/home.ctp | 188 ++++++ .../src/workdir/in/app/View/Posts/add.ctp | 7 + .../src/workdir/in/app/View/Posts/edit.ctp | 8 + .../src/workdir/in/app/View/Posts/index.ctp | 33 + .../src/workdir/in/app/View/Posts/view.ctp | 6 + .../src/workdir/in/app/View/Scaffolds/empty | 0 .../src/workdir/in/app/index.php | 17 + .../src/workdir/in/app/tmp/cache/models/empty | 0 .../src/workdir/in/app/tmp/cache/persistent/empty | 0 .../src/workdir/in/app/tmp/cache/views/empty | 0 .../src/workdir/in/app/tmp/logs/empty | 0 .../src/workdir/in/app/tmp/sessions/empty | 0 .../src/workdir/in/app/tmp/tests/empty | 0 .../src/workdir/in/app/webroot/.htaccess | 6 + .../workdir/in/app/webroot/css/cake.generic.css | 739 +++++++++++++++++++++ .../src/workdir/in/app/webroot/favicon.ico | Bin 0 -> 372 bytes .../src/workdir/in/app/webroot/files/empty | 0 .../src/workdir/in/app/webroot/img/cake.icon.png | Bin 0 -> 943 bytes .../src/workdir/in/app/webroot/img/cake.power.gif | Bin 0 -> 201 bytes .../workdir/in/app/webroot/img/test-error-icon.png | Bin 0 -> 3358 bytes .../workdir/in/app/webroot/img/test-fail-icon.png | Bin 0 -> 496 bytes .../workdir/in/app/webroot/img/test-pass-icon.png | Bin 0 -> 783 bytes .../workdir/in/app/webroot/img/test-skip-icon.png | Bin 0 -> 1207 bytes .../src/workdir/in/app/webroot/index.php | 92 +++ .../src/workdir/in/app/webroot/js/empty | 0 .../src/workdir/in/app/webroot/test.php | 92 +++ 78 files changed, 3125 insertions(+) create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/.htaccess create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/db_acl.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/db_acl.sql create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/i18n.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/i18n.sql create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/sessions.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/sessions.sql create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/acl.ini.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/acl.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/bootstrap.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/core.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/database.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/database.php.default create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/email.php.default create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Config/routes.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Console/Command/AppShell.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Console/Command/Task/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Console/Templates/empty create mode 100755 poc/poc02-compiling-cake/src/workdir/in/app/Console/cake create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Console/cake.bat create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Console/cake.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Controller/AppController.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Controller/Component/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Controller/PagesController.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Controller/PostsController.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Lib/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Locale/eng/LC_MESSAGES/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Model/AppModel.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Model/Behavior/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Model/Datasource/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Model/Post.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Plugin/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Test/Case/Controller/Component/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Test/Case/Model/Behavior/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Test/Case/View/Helper/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Test/Fixture/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/Vendor/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Elements/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Emails/html/default.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Emails/text/default.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Errors/error400.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Errors/error500.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Helper/AppHelper.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/Emails/html/default.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/Emails/text/default.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/ajax.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/default.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/error.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/flash.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/js/default.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/rss/default.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/xml/default.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Pages/home.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/add.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/edit.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/index.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/view.ctp create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/View/Scaffolds/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/index.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/models/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/persistent/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/views/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/logs/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/sessions/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/tests/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/.htaccess create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/css/cake.generic.css create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/favicon.ico create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/files/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.icon.png create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.power.gif create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-error-icon.png create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-fail-icon.png create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-pass-icon.png create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-skip-icon.png create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/index.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/js/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/test.php (limited to 'poc/poc02-compiling-cake/src/workdir/in/app') diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/.htaccess b/poc/poc02-compiling-cake/src/workdir/in/app/.htaccess new file mode 100644 index 0000000..fc3aac4 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/.htaccess @@ -0,0 +1,5 @@ + + RewriteEngine on + RewriteRule ^$ webroot/ [L] + RewriteRule (.*) webroot/$1 [L] + \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/db_acl.php b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/db_acl.php new file mode 100644 index 0000000..149ded0 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/db_acl.php @@ -0,0 +1,72 @@ + array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), + 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'model' => array('type' => 'string', 'null' => true), + 'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'alias' => array('type' => 'string', 'null' => true), + 'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + + public $aros = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), + 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'model' => array('type' => 'string', 'null' => true), + 'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'alias' => array('type' => 'string', 'null' => true), + 'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + + public $aros_acos = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), + 'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'), + 'aco_id' => array('type' => 'integer', 'null' => false, 'length' => 10), + '_create' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2), + '_read' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2), + '_update' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2), + '_delete' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1)) + ); + +} diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/db_acl.sql b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/db_acl.sql new file mode 100644 index 0000000..f50f392 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/db_acl.sql @@ -0,0 +1,40 @@ +# $Id$ +# +# Copyright 2005-2012, Cake Software Foundation, Inc. +# +# Licensed under The MIT License +# Redistributions of files must retain the above copyright notice. +# MIT License (http://www.opensource.org/licenses/mit-license.php) + +CREATE TABLE acos ( + id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + parent_id INTEGER(10) DEFAULT NULL, + model VARCHAR(255) DEFAULT '', + foreign_key INTEGER(10) UNSIGNED DEFAULT NULL, + alias VARCHAR(255) DEFAULT '', + lft INTEGER(10) DEFAULT NULL, + rght INTEGER(10) DEFAULT NULL, + PRIMARY KEY (id) +); + +CREATE TABLE aros_acos ( + id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + aro_id INTEGER(10) UNSIGNED NOT NULL, + aco_id INTEGER(10) UNSIGNED NOT NULL, + _create CHAR(2) NOT NULL DEFAULT 0, + _read CHAR(2) NOT NULL DEFAULT 0, + _update CHAR(2) NOT NULL DEFAULT 0, + _delete CHAR(2) NOT NULL DEFAULT 0, + PRIMARY KEY(id) +); + +CREATE TABLE aros ( + id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + parent_id INTEGER(10) DEFAULT NULL, + model VARCHAR(255) DEFAULT '', + foreign_key INTEGER(10) UNSIGNED DEFAULT NULL, + alias VARCHAR(255) DEFAULT '', + lft INTEGER(10) DEFAULT NULL, + rght INTEGER(10) DEFAULT NULL, + PRIMARY KEY (id) +); \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/i18n.php b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/i18n.php new file mode 100644 index 0000000..8de0052 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/i18n.php @@ -0,0 +1,49 @@ + array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), + 'locale' => array('type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'), + 'model' => array('type' => 'string', 'null' => false, 'key' => 'index'), + 'foreign_key' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'), + 'field' => array('type' => 'string', 'null' => false, 'key' => 'index'), + 'content' => array('type' => 'text', 'null' => true, 'default' => null), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0)) + ); + +} diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/i18n.sql b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/i18n.sql new file mode 100644 index 0000000..239e146 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/i18n.sql @@ -0,0 +1,26 @@ +# $Id$ +# +# Copyright 2005-2012, Cake Software Foundation, Inc. +# +# Licensed under The MIT License +# Redistributions of files must retain the above copyright notice. +# MIT License (http://www.opensource.org/licenses/mit-license.php) + +CREATE TABLE i18n ( + id int(10) NOT NULL auto_increment, + locale varchar(6) NOT NULL, + model varchar(255) NOT NULL, + foreign_key int(10) NOT NULL, + field varchar(255) NOT NULL, + content mediumtext, + PRIMARY KEY (id), +# UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field), +# INDEX I18N_LOCALE_ROW(locale, model, foreign_key), +# INDEX I18N_LOCALE_MODEL(locale, model), +# INDEX I18N_FIELD(model, foreign_key, field), +# INDEX I18N_ROW(model, foreign_key), + INDEX locale (locale), + INDEX model (model), + INDEX row_id (foreign_key), + INDEX field (field) +); \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/sessions.php b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/sessions.php new file mode 100644 index 0000000..e98ca06 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/sessions.php @@ -0,0 +1,46 @@ + array('type' => 'string', 'null' => false, 'key' => 'primary'), + 'data' => array('type' => 'text', 'null' => true, 'default' => null), + 'expires' => array('type' => 'integer', 'null' => true, 'default' => null), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + +} diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/sessions.sql b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/sessions.sql new file mode 100644 index 0000000..b8951b6 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/Schema/sessions.sql @@ -0,0 +1,16 @@ +# $Id$ +# +# Copyright 2005-2012, Cake Software Foundation, Inc. +# 1785 E. Sahara Avenue, Suite 490-204 +# Las Vegas, Nevada 89104 +# +# Licensed under The MIT License +# Redistributions of files must retain the above copyright notice. +# MIT License (http://www.opensource.org/licenses/mit-license.php) + +CREATE TABLE cake_sessions ( + id varchar(255) NOT NULL default '', + data text, + expires int(11) default NULL, + PRIMARY KEY (id) +); \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/acl.ini.php b/poc/poc02-compiling-cake/src/workdir/in/app/Config/acl.ini.php new file mode 100644 index 0000000..11ce65b --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/acl.ini.php @@ -0,0 +1,68 @@ +; +;/** +; * ACL Configuration +; * +; * +; * PHP 5 +; * +; * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) +; * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) +; * +; * Licensed under The MIT License +; * Redistributions of files must retain the above copyright notice. +; * +; * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) +; * @link http://cakephp.org CakePHP(tm) Project +; * @package app.Config +; * @since CakePHP(tm) v 0.10.0.1076 +; * @license MIT License (http://www.opensource.org/licenses/mit-license.php) +; */ + +; acl.ini.php - Cake ACL Configuration +; --------------------------------------------------------------------- +; Use this file to specify user permissions. +; aco = access control object (something in your application) +; aro = access request object (something requesting access) +; +; User records are added as follows: +; +; [uid] +; groups = group1, group2, group3 +; allow = aco1, aco2, aco3 +; deny = aco4, aco5, aco6 +; +; Group records are added in a similar manner: +; +; [gid] +; allow = aco1, aco2, aco3 +; deny = aco4, aco5, aco6 +; +; The allow, deny, and groups sections are all optional. +; NOTE: groups names *cannot* ever be the same as usernames! +; +; ACL permissions are checked in the following order: +; 1. Check for user denies (and DENY if specified) +; 2. Check for user allows (and ALLOW if specified) +; 3. Gather user's groups +; 4. Check group denies (and DENY if specified) +; 5. Check group allows (and ALLOW if specified) +; 6. If no aro, aco, or group information is found, DENY +; +; --------------------------------------------------------------------- + +;------------------------------------- +;Users +;------------------------------------- + +[username-goes-here] +groups = group1, group2 +deny = aco1, aco2 +allow = aco3, aco4 + +;------------------------------------- +;Groups +;------------------------------------- + +[groupname-goes-here] +deny = aco5, aco6 +allow = aco7, aco8 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/acl.php b/poc/poc02-compiling-cake/src/workdir/in/app/Config/acl.php new file mode 100644 index 0000000..21f8dda --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/acl.php @@ -0,0 +1,134 @@ +Auth->authorize = array('Actions' => array('actionPath' => 'controllers/'),...) + * + * Now, when a user (i.e. jeff) authenticates successfully and requests a controller action (i.e. /invoices/delete) + * that is not allowed by default (e.g. via $this->Auth->allow('edit') in the Invoices controller) then AuthComponent + * will ask the configured ACL interface if access is granted. Under the assumptions 1. and 2. this will be + * done via a call to Acl->check() with + * + * array('User' => array('username' => 'jeff', 'group_id' => 4, ...)) + * + * as ARO and + * + * '/controllers/invoices/delete' + * + * as ACO. + * + * If the configured map looks like + * + * $config['map'] = array( + * 'User' => 'User/username', + * 'Role' => 'User/group_id', + * ); + * + * then PhpAcl will lookup if we defined a role like User/jeff. If that role is not found, PhpAcl will try to + * find a definition for Role/4. If the definition isn't found then a default role (Role/default) will be used to + * check rules for the given ACO. The search can be expanded by defining aliases in the alias configuration. + * E.g. if you want to use a more readable name than Role/4 in your definitions you can define an alias like + * + * $config['alias'] = array( + * 'Role/4' => 'Role/editor', + * ); + * + * In the roles configuration you can define roles on the lhs and inherited roles on the rhs: + * + * $config['roles'] = array( + * 'Role/admin' => null, + * 'Role/accountant' => null, + * 'Role/editor' => null, + * 'Role/manager' => 'Role/editor, Role/accountant', + * 'User/jeff' => 'Role/manager', + * ); + * + * In this example manager inherits all rules from editor and accountant. Role/admin doesn't inherit from any role. + * Lets define some rules: + * + * $config['rules'] = array( + * 'allow' => array( + * '*' => 'Role/admin', + * 'controllers/users/(dashboard|profile)' => 'Role/default', + * 'controllers/invoices/*' => 'Role/accountant', + * 'controllers/articles/*' => 'Role/editor', + * 'controllers/users/*' => 'Role/manager', + * 'controllers/invoices/delete' => 'Role/manager', + * ), + * 'deny' => array( + * 'controllers/invoices/delete' => 'Role/accountant, User/jeff', + * 'controllers/articles/(delete|publish)' => 'Role/editor', + * ), + * ); + * + * Ok, so as jeff inherits from Role/manager he's matched every rule that references User/jeff, Role/manager, + * Role/editor, Role/accountant and Role/default. However, for jeff, rules for User/jeff are more specific than + * rules for Role/manager, rules for Role/manager are more specific than rules for Role/editor and so on. + * This is important when allow and deny rules match for a role. E.g. Role/accountant is allowed + * controllers/invoices/* but at the same time controllers/invoices/delete is denied. But there is a more + * specific rule defined for Role/manager which is allowed controllers/invoices/delete. However, the most specific + * rule denies access to the delete action explicitly for User/jeff, so he'll be denied access to the resource. + * + * If we would remove the role definition for User/jeff, then jeff would be granted access as he would be resolved + * to Role/manager and Role/manager has an allow rule. + */ + +/** + * The role map defines how to resolve the user record from your application + * to the roles you defined in the roles configuration. + */ +$config['map'] = array( + 'User' => 'User/username', + 'Role' => 'User/group_id', +); + +/** + * define aliases to map your model information to + * the roles defined in your role configuration. + */ +$config['alias'] = array( + 'Role/4' => 'Role/editor', +); + +/** + * role configuration + */ +$config['roles'] = array( + 'Role/admin' => null, +); + +/** + * rule configuration + */ +$config['rules'] = array( + 'allow' => array( + '*' => 'Role/admin', + ), + 'deny' => array(), +); diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/bootstrap.php b/poc/poc02-compiling-cake/src/workdir/in/app/Config/bootstrap.php new file mode 100644 index 0000000..bcc50f6 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/bootstrap.php @@ -0,0 +1,181 @@ + 'File', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path + * 'prefix' => 'cake_', //[optional] prefix every cache file with this string + * 'lock' => false, //[optional] use file locking + * 'serialize' => true, // [optional] + * 'mask' => 0666, // [optional] permission mask to use when creating cache files + * )); + * + * APC (http://pecl.php.net/package/APC) + * + * Cache::config('default', array( + * 'engine' => 'Apc', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string + * )); + * + * Xcache (http://xcache.lighttpd.net/) + * + * Cache::config('default', array( + * 'engine' => 'Xcache', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string + * 'user' => 'user', //user from xcache.admin.user settings + * 'password' => 'password', //plaintext password (xcache.admin.pass) + * )); + * + * Memcache (http://memcached.org/) + * + * Cache::config('default', array( + * 'engine' => 'Memcache', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string + * 'servers' => array( + * '127.0.0.1:11211' // localhost, default port 11211 + * ), //[optional] + * 'persistent' => true, // [optional] set this to false for non-persistent connections + * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory) + * )); + * + * Wincache (http://php.net/wincache) + * + * Cache::config('default', array( + * 'engine' => 'Wincache', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string + * )); + * + * Redis (http://http://redis.io/) + * + * Cache::config('default', array( + * 'engine' => 'Redis', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string + * 'server' => '127.0.0.1' // localhost + * 'port' => 6379 // default port 6379 + * 'timeout' => 0 // timeout in seconds, 0 = unlimited + * 'persistent' => true, // [optional] set this to false for non-persistent connections + * )); + */ +Cache::config('default', array('engine' => 'File')); + +/** + * The settings below can be used to set additional paths to models, views and controllers. + * + * App::build(array( + * 'Model' => array('/path/to/models', '/next/path/to/models'), + * 'Model/Behavior' => array('/path/to/behaviors', '/next/path/to/behaviors'), + * 'Model/Datasource' => array('/path/to/datasources', '/next/path/to/datasources'), + * 'Model/Datasource/Database' => array('/path/to/databases', '/next/path/to/database'), + * 'Model/Datasource/Session' => array('/path/to/sessions', '/next/path/to/sessions'), + * 'Controller' => array('/path/to/controllers', '/next/path/to/controllers'), + * 'Controller/Component' => array('/path/to/components', '/next/path/to/components'), + * 'Controller/Component/Auth' => array('/path/to/auths', '/next/path/to/auths'), + * 'Controller/Component/Acl' => array('/path/to/acls', '/next/path/to/acls'), + * 'View' => array('/path/to/views', '/next/path/to/views'), + * 'View/Helper' => array('/path/to/helpers', '/next/path/to/helpers'), + * 'Console' => array('/path/to/consoles', '/next/path/to/consoles'), + * 'Console/Command' => array('/path/to/commands', '/next/path/to/commands'), + * 'Console/Command/Task' => array('/path/to/tasks', '/next/path/to/tasks'), + * 'Lib' => array('/path/to/libs', '/next/path/to/libs'), + * 'Locale' => array('/path/to/locales', '/next/path/to/locales'), + * 'Vendor' => array('/path/to/vendors', '/next/path/to/vendors'), + * 'Plugin' => array('/path/to/plugins', '/next/path/to/plugins'), + * )); + * + */ + +/** + * Custom Inflector rules, can be set to correctly pluralize or singularize table, model, controller names or whatever other + * string is passed to the inflection functions + * + * Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); + * Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); + * + */ + +/** + * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call + * Uncomment one of the lines below, as you need. make sure you read the documentation on CakePlugin to use more + * advanced ways of loading plugins + * + * CakePlugin::loadAll(); // Loads all plugins at once + * CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit + * + */ + + +/** + * You can attach event listeners to the request lifecyle as Dispatcher Filter . By Default CakePHP bundles two filters: + * + * - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins + * - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers + * + * Feel free to remove or add filters as you see fit for your application. A few examples: + * + * Configure::write('Dispatcher.filters', array( + * 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app. + * 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin. + * array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch + * array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch + * + * )); + */ +Configure::write('Dispatcher.filters', array( + 'AssetDispatcher', + 'CacheDispatcher' +)); + +/** + * Configures default file logging options + */ +App::uses('CakeLog', 'Log'); +CakeLog::config('debug', array( + 'engine' => 'FileLog', + 'types' => array('notice', 'info', 'debug'), + 'file' => 'debug', +)); +CakeLog::config('error', array( + 'engine' => 'FileLog', + 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'), + 'file' => 'error', +)); diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/core.php b/poc/poc02-compiling-cake/src/workdir/in/app/Config/core.php new file mode 100644 index 0000000..97163e9 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/core.php @@ -0,0 +1,278 @@ + 0 + * and log errors with CakeLog when debug = 0. + * + * Options: + * + * - `handler` - callback - The callback to handle errors. You can set this to any callable type, + * including anonymous functions. + * - `level` - int - The level of errors you are interested in capturing. + * - `trace` - boolean - Include stack traces for errors in log files. + * + * @see ErrorHandler for more information on error handling and configuration. + */ + Configure::write('Error', array( + 'handler' => 'ErrorHandler::handleError', + 'level' => E_ALL & ~E_DEPRECATED, + 'trace' => true + )); + +/** + * Configure the Exception handler used for uncaught exceptions. By default, + * ErrorHandler::handleException() is used. It will display a HTML page for the exception, and + * while debug > 0, framework errors like Missing Controller will be displayed. When debug = 0, + * framework errors will be coerced into generic HTTP errors. + * + * Options: + * + * - `handler` - callback - The callback to handle exceptions. You can set this to any callback type, + * including anonymous functions. + * - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you + * should place the file for that class in app/Lib/Error. This class needs to implement a render method. + * - `log` - boolean - Should Exceptions be logged? + * + * @see ErrorHandler for more information on exception handling and configuration. + */ + Configure::write('Exception', array( + 'handler' => 'ErrorHandler::handleException', + 'renderer' => 'ExceptionRenderer', + 'log' => true + )); + +/** + * Application wide charset encoding + */ + Configure::write('App.encoding', 'UTF-8'); + +/** + * To configure CakePHP *not* to use mod_rewrite and to + * use CakePHP pretty URLs, remove these .htaccess + * files: + * + * /.htaccess + * /app/.htaccess + * /app/webroot/.htaccess + * + * And uncomment the App.baseUrl below: + */ + //Configure::write('App.baseUrl', env('SCRIPT_NAME')); + +/** + * Uncomment the define below to use CakePHP prefix routes. + * + * The value of the define determines the names of the routes + * and their associated controller actions: + * + * Set to an array of prefixes you want to use in your application. Use for + * admin or other prefixed routes. + * + * Routing.prefixes = array('admin', 'manager'); + * + * Enables: + * `admin_index()` and `/admin/controller/index` + * `manager_index()` and `/manager/controller/index` + * + */ + //Configure::write('Routing.prefixes', array('admin')); + +/** + * Turn off all caching application-wide. + * + */ + //Configure::write('Cache.disable', true); + +/** + * Enable cache checking. + * + * If set to true, for view caching you must still use the controller + * public $cacheAction inside your controllers to define caching settings. + * You can either set it controller-wide by setting public $cacheAction = true, + * or in each action using $this->cacheAction = true. + * + */ + //Configure::write('Cache.check', true); + +/** + * Defines the default error type when using the log() function. Used for + * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG. + */ + define('LOG_ERROR', LOG_ERR); + +/** + * Session configuration. + * + * Contains an array of settings to use for session configuration. The defaults key is + * used to define a default preset to use for sessions, any settings declared here will override + * the settings of the default config. + * + * ## Options + * + * - `Session.cookie` - The name of the cookie to use. Defaults to 'CAKEPHP' + * - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP + * - `Session.cookieTimeout` - The number of minutes you want session cookies to live for. + * - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions? You might want to set the + * value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX + * - `Session.defaults` - The default configuration set to use as a basis for your session. + * There are four builtins: php, cake, cache, database. + * - `Session.handler` - Can be used to enable a custom session handler. Expects an array of of callables, + * that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler` + * to the ini array. + * - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and + * sessionids that change frequently. See CakeSession::$requestCountdown. + * - `Session.ini` - An associative array of additional ini values to set. + * + * The built in defaults are: + * + * - 'php' - Uses settings defined in your php.ini. + * - 'cake' - Saves session files in CakePHP's /tmp directory. + * - 'database' - Uses CakePHP's database sessions. + * - 'cache' - Use the Cache class to save sessions. + * + * To define a custom session handler, save it at /app/Model/Datasource/Session/.php. + * Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to + * + * To use database sessions, run the app/Config/Schema/sessions.php schema using + * the cake shell command: cake schema create Sessions + * + */ + Configure::write('Session', array( + 'defaults' => 'php' + )); + +/** + * The level of CakePHP security. + */ + Configure::write('Security.level', 'medium'); + +/** + * A random string used in security hashing methods. + */ + Configure::write('Security.salt', 'DYh4693bssgsfIxfs!:;oUuedzi$ùR2Gk:bgaC9mi'); + +/** + * A random numeric string (digits only) used to encrypt/decrypt strings. + */ + Configure::write('Security.cipherSeed', '768593014774535424965686832135'); + +/** + * Apply timestamps with the last modified time to static assets (js, css, images). + * Will append a querystring parameter containing the time the file was modified. This is + * useful for invalidating browser caches. + * + * Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable + * timestamping regardless of debug value. + */ + //Configure::write('Asset.timestamp', true); + +/** + * Compress CSS output by removing comments, whitespace, repeating tags, etc. + * This requires a/var/cache directory to be writable by the web server for caching. + * and /vendors/csspp/csspp.php + * + * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css(). + */ + //Configure::write('Asset.filter.css', 'css.php'); + +/** + * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the + * output, and setting the config below to the name of the script. + * + * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link(). + */ + //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php'); + +/** + * The classname and database used in CakePHP's + * access control lists. + */ + Configure::write('Acl.classname', 'DbAcl'); + Configure::write('Acl.database', 'default'); + +/** + * Uncomment this line and correct your server timezone to fix + * any date & time related errors. + */ + //date_default_timezone_set('UTC'); + +/** + * Pick the caching engine to use. If APC is enabled use it. + * If running via cli - apc is disabled by default. ensure it's available and enabled in this case + * + * Note: 'default' and other application caches should be configured in app/Config/bootstrap.php. + * Please check the comments in boostrap.php for more info on the cache engines available + * and their setttings. + */ +$engine = 'File'; +if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) { + $engine = 'Apc'; +} + +// In development mode, caches should expire quickly. +$duration = '+999 days'; +if (Configure::read('debug') >= 1) { + $duration = '+10 seconds'; +} + +// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts. +$prefix = 'myapp_'; + +/** + * Configure the cache used for general framework caching. Path information, + * object listings, and translation cache files are stored with this configuration. + */ +Cache::config('_cake_core_', array( + 'engine' => $engine, + 'prefix' => $prefix . 'cake_core_', + 'path' => CACHE . 'persistent' . DS, + 'serialize' => ($engine === 'File'), + 'duration' => $duration +)); + +/** + * Configure the cache for model and datasource caches. This cache configuration + * is used to store schema descriptions, and table listings in connections. + */ +Cache::config('_cake_model_', array( + 'engine' => $engine, + 'prefix' => $prefix . 'cake_model_', + 'path' => CACHE . 'models' . DS, + 'serialize' => ($engine === 'File'), + 'duration' => $duration +)); diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/database.php b/poc/poc02-compiling-cake/src/workdir/in/app/Config/database.php new file mode 100644 index 0000000..8250a9d --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/database.php @@ -0,0 +1,83 @@ + The name of a supported datasource; valid options are as follows: + * Database/Mysql - MySQL 4 & 5, + * Database/Sqlite - SQLite (PHP5 only), + * Database/Postgres - PostgreSQL 7 and higher, + * Database/Sqlserver - Microsoft SQL Server 2005 and higher + * + * You can add custom database datasources (or override existing datasources) by adding the + * appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php', + * + * + * persistent => true / false + * Determines whether or not the database should use a persistent connection + * + * host => + * the host you connect to the database. To add a socket or port number, use 'port' => # + * + * prefix => + * Uses the given prefix for all the tables in this database. This setting can be overridden + * on a per-table basis with the Model::$tablePrefix property. + * + * schema => + * For Postgres specifies which schema you would like to use the tables in. Postgres defaults to 'public'. + * + * encoding => + * For MySQL, Postgres specifies the character encoding to use when connecting to the + * database. Uses database default not specified. + * + * unix_socket => + * For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port` + */ +class DATABASE_CONFIG { + + public $default = array( + 'datasource' => 'Database/Mysql', + 'persistent' => false, + 'host' => 'localhost', + 'login' => 'root', + 'password' => 'prout', + 'database' => 'cake_blog', + 'prefix' => '', + //'encoding' => 'utf8', + ); + + public $test = array( + 'datasource' => 'Database/Mysql', + 'persistent' => false, + 'host' => 'localhost', + 'login' => 'user', + 'password' => 'password', + 'database' => 'test_database_name', + 'prefix' => '', + //'encoding' => 'utf8', + ); +} diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/database.php.default b/poc/poc02-compiling-cake/src/workdir/in/app/Config/database.php.default new file mode 100644 index 0000000..d0aeb1f --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/database.php.default @@ -0,0 +1,83 @@ + The name of a supported datasource; valid options are as follows: + * Database/Mysql - MySQL 4 & 5, + * Database/Sqlite - SQLite (PHP5 only), + * Database/Postgres - PostgreSQL 7 and higher, + * Database/Sqlserver - Microsoft SQL Server 2005 and higher + * + * You can add custom database datasources (or override existing datasources) by adding the + * appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php', + * + * + * persistent => true / false + * Determines whether or not the database should use a persistent connection + * + * host => + * the host you connect to the database. To add a socket or port number, use 'port' => # + * + * prefix => + * Uses the given prefix for all the tables in this database. This setting can be overridden + * on a per-table basis with the Model::$tablePrefix property. + * + * schema => + * For Postgres specifies which schema you would like to use the tables in. Postgres defaults to 'public'. + * + * encoding => + * For MySQL, Postgres specifies the character encoding to use when connecting to the + * database. Uses database default not specified. + * + * unix_socket => + * For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port` + */ +class DATABASE_CONFIG { + + public $default = array( + 'datasource' => 'Database/Mysql', + 'persistent' => false, + 'host' => 'localhost', + 'login' => 'user', + 'password' => 'password', + 'database' => 'database_name', + 'prefix' => '', + //'encoding' => 'utf8', + ); + + public $test = array( + 'datasource' => 'Database/Mysql', + 'persistent' => false, + 'host' => 'localhost', + 'login' => 'user', + 'password' => 'password', + 'database' => 'test_database_name', + 'prefix' => '', + //'encoding' => 'utf8', + ); +} diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/email.php.default b/poc/poc02-compiling-cake/src/workdir/in/app/Config/email.php.default new file mode 100644 index 0000000..fa252e8 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/email.php.default @@ -0,0 +1,97 @@ + The name of a supported transport; valid options are as follows: + * Mail - Send using PHP mail function + * Smtp - Send using SMTP + * Debug - Do not send the email, just return the result + * + * You can add custom transports (or override existing transports) by adding the + * appropriate file to app/Network/Email. Transports should be named 'YourTransport.php', + * where 'Your' is the name of the transport. + * + * from => + * The origin email. See CakeEmail::from() about the valid values + * + */ +class EmailConfig { + + public $default = array( + 'transport' => 'Mail', + 'from' => 'you@localhost', + //'charset' => 'utf-8', + //'headerCharset' => 'utf-8', + ); + + public $smtp = array( + 'transport' => 'Smtp', + 'from' => array('site@localhost' => 'My Site'), + 'host' => 'localhost', + 'port' => 25, + 'timeout' => 30, + 'username' => 'user', + 'password' => 'secret', + 'client' => null, + 'log' => false, + //'charset' => 'utf-8', + //'headerCharset' => 'utf-8', + ); + + public $fast = array( + 'from' => 'you@localhost', + 'sender' => null, + 'to' => null, + 'cc' => null, + 'bcc' => null, + 'replyTo' => null, + 'readReceipt' => null, + 'returnPath' => null, + 'messageId' => true, + 'subject' => null, + 'message' => null, + 'headers' => null, + 'viewRender' => null, + 'template' => false, + 'layout' => false, + 'viewVars' => null, + 'attachments' => null, + 'emailFormat' => null, + 'transport' => 'Smtp', + 'host' => 'localhost', + 'port' => 25, + 'timeout' => 30, + 'username' => 'user', + 'password' => 'secret', + 'client' => null, + 'log' => true, + //'charset' => 'utf-8', + //'headerCharset' => 'utf-8', + ); + +} diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/routes.php b/poc/poc02-compiling-cake/src/workdir/in/app/Config/routes.php new file mode 100644 index 0000000..38d6f39 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/routes.php @@ -0,0 +1,45 @@ + 'pages', 'action' => 'display', 'home')); + Router::connect('/', array('controller' => 'posts', 'action' => 'index')); +/** + * ...and connect the rest of 'Pages' controller's urls. + */ + Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display')); + +/** + * Load all plugin routes. See the CakePlugin documentation on + * how to customize the loading of plugin routes. + */ + CakePlugin::routes(); + +/** + * Load the CakePHP default routes. Remove this if you do not want to use + * the built-in default routes. + */ + require CAKE . 'Config' . DS . 'routes.php'; diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Console/Command/AppShell.php b/poc/poc02-compiling-cake/src/workdir/in/app/Console/Command/AppShell.php new file mode 100644 index 0000000..5cc915f --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Console/Command/AppShell.php @@ -0,0 +1,31 @@ +redirect('/'); + } + $page = $subpage = $title_for_layout = null; + + if (!empty($path[0])) { + $page = $path[0]; + } + if (!empty($path[1])) { + $subpage = $path[1]; + } + if (!empty($path[$count - 1])) { + $title_for_layout = Inflector::humanize($path[$count - 1]); + } + $this->set(compact('page', 'subpage', 'title_for_layout')); + $this->render(implode('/', $path)); + } +} diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Controller/PostsController.php b/poc/poc02-compiling-cake/src/workdir/in/app/Controller/PostsController.php new file mode 100644 index 0000000..c6ff3d2 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Controller/PostsController.php @@ -0,0 +1,48 @@ +set('posts', $this->Post->find('all')); + } + + public function view($id = null) { + $this->Post->id = $id; + $this->set('post', $this->Post->read()); + } + + public function add() { + if ($this->request->is('post')) { + if ($this->Post->save($this->request->data)) { + $this->Session->setFlash('Your post has been saved.'); + $this->redirect(array('action' => 'index')); + } else { + $this->Session->setFlash('Unable to add your post.'); + } + } + } + + public function edit($id = null) { + $this->Post->id = $id; + if ($this->request->is('get')) { + $this->request->data = $this->Post->read(); + } else { + if ($this->Post->save($this->request->data)) { + $this->Session->setFlash('Your post has been updated.'); + $this->redirect(array('action' => 'index')); + } else { + $this->Session->setFlash('Unable to update your post.'); + } + } + } + + public function delete($id) { + if ($this->request->is('get')) { + throw new MethodNotAllowedException(); + } + if ($this->Post->delete($id)) { + $this->Session->setFlash('The post with id: ' . $id . ' has been deleted.'); + $this->redirect(array('action' => 'index')); + } + } +} diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Lib/empty b/poc/poc02-compiling-cake/src/workdir/in/app/Lib/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Locale/eng/LC_MESSAGES/empty b/poc/poc02-compiling-cake/src/workdir/in/app/Locale/eng/LC_MESSAGES/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Model/AppModel.php b/poc/poc02-compiling-cake/src/workdir/in/app/Model/AppModel.php new file mode 100644 index 0000000..94e5e5f --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/Model/AppModel.php @@ -0,0 +1,34 @@ + array( + 'rule' => 'notEmpty' + ), + 'body' => array( + 'rule' => 'notEmpty' + ) + ); +} diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Plugin/empty b/poc/poc02-compiling-cake/src/workdir/in/app/Plugin/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Test/Case/Controller/Component/empty b/poc/poc02-compiling-cake/src/workdir/in/app/Test/Case/Controller/Component/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Test/Case/Model/Behavior/empty b/poc/poc02-compiling-cake/src/workdir/in/app/Test/Case/Model/Behavior/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Test/Case/View/Helper/empty b/poc/poc02-compiling-cake/src/workdir/in/app/Test/Case/View/Helper/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Test/Fixture/empty b/poc/poc02-compiling-cake/src/workdir/in/app/Test/Fixture/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Vendor/empty b/poc/poc02-compiling-cake/src/workdir/in/app/Vendor/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Elements/empty b/poc/poc02-compiling-cake/src/workdir/in/app/View/Elements/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Emails/html/default.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Emails/html/default.ctp new file mode 100644 index 0000000..0eb7f57 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Emails/html/default.ctp @@ -0,0 +1,25 @@ + + ' . $line . "

\n"; +endforeach; +?> \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Emails/text/default.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Emails/text/default.ctp new file mode 100644 index 0000000..56be8c1 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Emails/text/default.ctp @@ -0,0 +1,19 @@ + + \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Errors/error400.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Errors/error400.ctp new file mode 100644 index 0000000..6d50860 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Errors/error400.ctp @@ -0,0 +1,31 @@ + +

+

+ : + '{$url}'" + ); ?> +

+ 0 ): + echo $this->element('exception_stack_trace'); +endif; +?> diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Errors/error500.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Errors/error500.ctp new file mode 100644 index 0000000..4e1f36e --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Errors/error500.ctp @@ -0,0 +1,28 @@ + +

+

+ : + +

+ 0 ): + echo $this->element('exception_stack_trace'); +endif; +?> diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Helper/AppHelper.php b/poc/poc02-compiling-cake/src/workdir/in/app/View/Helper/AppHelper.php new file mode 100644 index 0000000..0fddaea --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Helper/AppHelper.php @@ -0,0 +1,34 @@ + + + + + <?php echo $title_for_layout;?> + + + + +

This email was sent using the CakePHP Framework

+ + \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/Emails/text/default.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/Emails/text/default.ctp new file mode 100644 index 0000000..94ed222 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/Emails/text/default.ctp @@ -0,0 +1,21 @@ + + + +This email was sent using the CakePHP Framework, http://cakephp.org. diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/ajax.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/ajax.ctp new file mode 100644 index 0000000..c0da850 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/ajax.ctp @@ -0,0 +1,19 @@ + +fetch('content'); ?> diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/default.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/default.ctp new file mode 100644 index 0000000..39704bf --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/default.ctp @@ -0,0 +1,61 @@ + + + + + Html->charset(); ?> + + <?php echo $cakeDescription ?>: + <?php echo $title_for_layout; ?> + + Html->meta('icon'); + + echo $this->Html->css('cake.generic'); + + echo $this->fetch('meta'); + echo $this->fetch('css'); + echo $this->fetch('script'); + ?> + + +
+ +
+ + Session->flash(); ?> + + fetch('content'); ?> +
+ +
+ element('sql_dump'); ?> + + diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/error.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/error.ctp new file mode 100644 index 0000000..4947734 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/error.ctp @@ -0,0 +1,61 @@ + + + + + Html->charset(); ?> + + <?php echo $cakeDescription ?>: + <?php echo $title_for_layout; ?> + + Html->meta('icon'); + + echo $this->Html->css('cake.generic'); + + echo $this->fetch('meta'); + echo $this->fetch('css'); + echo $this->fetch('script'); + ?> + + +
+ +
+ + Session->flash(); ?> + + fetch('content'); ?> +
+ +
+ element('sql_dump'); ?> + + diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/flash.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/flash.ctp new file mode 100644 index 0000000..76fae34 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/flash.ctp @@ -0,0 +1,37 @@ + + + + +Html->charset(); ?> +<?php echo $page_title; ?> + + + + + + + +

+ + \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/js/default.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/js/default.ctp new file mode 100644 index 0000000..7239b5d --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/js/default.ctp @@ -0,0 +1,2 @@ + + diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/rss/default.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/rss/default.ctp new file mode 100644 index 0000000..077de61 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/rss/default.ctp @@ -0,0 +1,14 @@ +Rss->document( + $this->Rss->channel( + array(), $channel, $this->fetch('content') + ) +); +?> diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/xml/default.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/xml/default.ctp new file mode 100644 index 0000000..fbd5ee0 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Layouts/xml/default.ctp @@ -0,0 +1 @@ +fetch('content'); ?> diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Pages/home.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Pages/home.ctp new file mode 100644 index 0000000..9a22923 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Pages/home.ctp @@ -0,0 +1,188 @@ + + +

+ + 0): + Debugger::checkSecurityKeys(); +endif; +?> +

+ + 1) Help me configure it + 2) I don't / can't use URL rewriting +

+

+=')): + echo ''; + echo __d('cake_dev', 'Your version of PHP is 5.2.8 or higher.'); + echo ''; + else: + echo ''; + echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.8 or higher to use CakePHP.'); + echo ''; + endif; +?> +

+

+ '; + echo __d('cake_dev', 'Your tmp directory is writable.'); + echo ''; + else: + echo ''; + echo __d('cake_dev', 'Your tmp directory is NOT writable.'); + echo ''; + endif; + ?> +

+

+ '; + echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit APP/Config/core.php ', ''. $settings['engine'] . 'Engine'); + echo ''; + else: + echo ''; + echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in APP/Config/core.php'); + echo ''; + endif; + ?> +

+

+ '; + echo __d('cake_dev', 'Your database configuration file is present.'); + $filePresent = true; + echo ''; + else: + echo ''; + echo __d('cake_dev', 'Your database configuration file is NOT present.'); + echo '
'; + echo __d('cake_dev', 'Rename APP/Config/database.php.default to APP/Config/database.php'); + echo '
'; + endif; + ?> +

+ +

+ isConnected()): + echo ''; + echo __d('cake_dev', 'Cake is able to connect to the database.'); + echo ''; + else: + echo ''; + echo __d('cake_dev', 'Cake is NOT able to connect to the database.'); + echo '

'; + echo $connectionError->getMessage(); + echo '
'; + endif; + ?> +

+ +'; + echo __d('cake_dev', 'PCRE has not been compiled with Unicode support.'); + echo '
'; + echo __d('cake_dev', 'Recompile PCRE with Unicode support by adding --enable-unicode-properties when configuring'); + echo '

'; + } +?> +

+

+ +To change its layout, edit: APP/View/Layouts/default.ctp.
+You can also add some CSS styles for your pages at: APP/webroot/css.'); +?> +

+ +

+

+ Html->link( + sprintf('%s %s', __d('cake_dev', 'New'), __d('cake_dev', 'CakePHP 2.0 Docs')), + 'http://book.cakephp.org/2.0/en/', + array('target' => '_blank', 'escape' => false) + ); + ?> +

+

+ Html->link( + __d('cake_dev', 'The 15 min Blog Tutorial'), + 'http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html', + array('target' => '_blank', 'escape' => false) + ); + ?> +

+ +

+

+ +

+

+ +

+ + diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/add.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/add.ctp new file mode 100644 index 0000000..c36d35e --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/add.ctp @@ -0,0 +1,7 @@ +

Add Post

+Form->create('Post'); +echo $this->Form->input('title'); +echo $this->Form->input('body', array('rows' => '3')); +echo $this->Form->end('Save Post'); +?> diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/edit.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/edit.ctp new file mode 100644 index 0000000..221d85a --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/edit.ctp @@ -0,0 +1,8 @@ +

Edit Post

+Form->create('Post', array('action' => 'edit')); + echo $this->Form->input('title'); + echo $this->Form->input('body', array('rows' => '3')); + echo $this->Form->input('id', array('type' => 'hidden')); + echo $this->Form->end('Save Post'); +?> diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/index.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/index.ctp new file mode 100644 index 0000000..754b378 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/index.ctp @@ -0,0 +1,33 @@ +

Blog posts

+

Html->link('Add Post', array('action' => 'add')); ?>

+ + + + + + + + + + + + + + + + + + + +
IdTitleActionsCreated
+ Html->link($post['Post']['title'], array('action' => 'view', $post['Post']['id'])); ?> + + Form->postLink( + 'Delete', + array('action' => 'delete', $post['Post']['id']), + array('confirm' => 'Are you sure?')); + ?> + Html->link('Edit', array('action' => 'edit', $post['Post']['id'])); ?> + + +
diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/view.ctp b/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/view.ctp new file mode 100644 index 0000000..4fb6556 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/View/Posts/view.ctp @@ -0,0 +1,6 @@ +

+ +

Created:

+ +

+ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/View/Scaffolds/empty b/poc/poc02-compiling-cake/src/workdir/in/app/View/Scaffolds/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/index.php b/poc/poc02-compiling-cake/src/workdir/in/app/index.php new file mode 100644 index 0000000..29f2c57 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/index.php @@ -0,0 +1,17 @@ + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php [QSA,L] + diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/css/cake.generic.css b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/css/cake.generic.css new file mode 100644 index 0000000..2244ad2 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/css/cake.generic.css @@ -0,0 +1,739 @@ +@charset "utf-8"; +/** + * + * Generic CSS for CakePHP + * + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project + * @package app.webroot.css + * @since CakePHP(tm) + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) + */ + +* { + margin:0; + padding:0; +} + +/** General Style Info **/ +body { + background: #003d4c; + color: #fff; + font-family:'lucida grande',verdana,helvetica,arial,sans-serif; + font-size:90%; + margin: 0; +} +a { + color: #003d4c; + text-decoration: underline; + font-weight: bold; +} +a:hover { + color: #367889; + text-decoration:none; +} +a img { + border:none; +} +h1, h2, h3, h4 { + font-weight: normal; + margin-bottom:0.5em; +} +h1 { + background:#fff; + color: #003d4c; + font-size: 100%; +} +h2 { + background:#fff; + color: #e32; + font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif; + font-size: 190%; +} +h3 { + color: #2c6877; + font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif; + font-size: 165%; +} +h4 { + color: #993; + font-weight: normal; +} +ul, li { + margin: 0 12px; +} +p { + margin: 0 0 1em 0; +} + +/** Layout **/ +#container { + text-align: left; +} + +#header{ + padding: 10px 20px; +} +#header h1 { + line-height:20px; + background: #003d4c url('../img/cake.icon.png') no-repeat left; + color: #fff; + padding: 0px 30px; +} +#header h1 a { + color: #fff; + background: #003d4c; + font-weight: normal; + text-decoration: none; +} +#header h1 a:hover { + color: #fff; + background: #003d4c; + text-decoration: underline; +} +#content{ + background: #fff; + clear: both; + color: #333; + padding: 10px 20px 40px 20px; + overflow: auto; +} +#footer { + clear: both; + padding: 6px 10px; + text-align: right; +} + +/** containers **/ +div.form, +div.index, +div.view { + float:right; + width:76%; + border-left:1px solid #666; + padding:10px 2%; +} +div.actions { + float:left; + width:16%; + padding:10px 1.5%; +} +div.actions h3 { + padding-top:0; + color:#777; +} + + +/** Tables **/ +table { + border-right:0; + clear: both; + color: #333; + margin-bottom: 10px; + width: 100%; +} +th { + border:0; + border-bottom:2px solid #555; + text-align: left; + padding:4px; +} +th a { + display: block; + padding: 2px 4px; + text-decoration: none; +} +th a.asc:after { + content: ' ⇣'; +} +th a.desc:after { + content: ' ⇡'; +} +table tr td { + padding: 6px; + text-align: left; + vertical-align: top; + border-bottom:1px solid #ddd; +} +table tr:nth-child(even) { + background: #f9f9f9; +} +td.actions { + text-align: center; + white-space: nowrap; +} +table td.actions a { + margin: 0px 6px; + padding:2px 5px; +} + +/* SQL log */ +.cake-sql-log { + background: #fff; +} +.cake-sql-log td { + padding: 4px 8px; + text-align: left; + font-family: Monaco, Consolas, "Courier New", monospaced; +} +.cake-sql-log caption { + color:#fff; +} + +/** Paging **/ +.paging { + background:#fff; + color: #ccc; + margin-top: 1em; + clear:both; +} +.paging .current, +.paging .disabled, +.paging a { + text-decoration: none; + padding: 5px 8px; + display: inline-block +} +.paging > span { + display: inline-block; + border: 1px solid #ccc; + border-left: 0; +} +.paging > span:hover { + background: #efefef; +} +.paging .prev { + border-left: 1px solid #ccc; + -moz-border-radius: 4px 0 0 4px; + -webkit-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.paging .next { + -moz-border-radius: 0 4px 4px 0; + -webkit-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.paging .disabled { + color: #ddd; +} +.paging .disabled:hover { + background: transparent; +} +.paging .current { + background: #efefef; + color: #c73e14; +} + +/** Scaffold View **/ +dl { + line-height: 2em; + margin: 0em 0em; + width: 60%; +} +dl dd:nth-child(4n+2), +dl dt:nth-child(4n+1) { + background: #f4f4f4; +} + +dt { + font-weight: bold; + padding-left: 4px; + vertical-align: top; + width: 10em; +} +dd { + margin-left: 10em; + margin-top: -2em; + vertical-align: top; +} + +/** Forms **/ +form { + clear: both; + margin-right: 20px; + padding: 0; + width: 95%; +} +fieldset { + border: none; + margin-bottom: 1em; + padding: 16px 10px; +} +fieldset legend { + color: #e32; + font-size: 160%; + font-weight: bold; +} +fieldset fieldset { + margin-top: 0; + padding: 10px 0 0; +} +fieldset fieldset legend { + font-size: 120%; + font-weight: normal; +} +fieldset fieldset div { + clear: left; + margin: 0 20px; +} +form div { + clear: both; + margin-bottom: 1em; + padding: .5em; + vertical-align: text-top; +} +form .input { + color: #444; +} +form .required { + font-weight: bold; +} +form .required label:after { + color: #e32; + content: '*'; + display:inline; +} +form div.submit { + border: 0; + clear: both; + margin-top: 10px; +} +label { + display: block; + font-size: 110%; + margin-bottom:3px; +} +input, textarea { + clear: both; + font-size: 140%; + font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif; + padding: 1%; + width:98%; +} +select { + clear: both; + font-size: 120%; + vertical-align: text-bottom; +} +select[multiple=multiple] { + width: 100%; +} +option { + font-size: 120%; + padding: 0 3px; +} +input[type=checkbox] { + clear: left; + float: left; + margin: 0px 6px 7px 2px; + width: auto; +} +div.checkbox label { + display: inline; +} +input[type=radio] { + float:left; + width:auto; + margin: 6px 0; + padding: 0; + line-height: 26px; +} +.radio label { + margin: 0 0 6px 20px; + line-height: 26px; +} +input[type=submit] { + display: inline; + font-size: 110%; + width: auto; +} +form .submit input[type=submit] { + background:#62af56; + background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230)); + background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230); + background-image: -moz-linear-gradient(top, #76BF6B, #3B8230); + border-color: #2d6324; + color: #fff; + text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px; + padding: 8px 10px; +} +form .submit input[type=submit]:hover { + background: #5BA150; +} +/* Form errors */ +form .error { + background: #FFDACC; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + font-weight: normal; +} +form .error-message { + -moz-border-radius: none; + -webkit-border-radius: none; + border-radius: none; + border: none; + background: none; + margin: 0; + padding-left: 4px; + padding-right: 0; +} +form .error, +form .error-message { + color: #9E2424; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -ms-box-shadow: none; + -o-box-shadow: none; + box-shadow: none; + text-shadow: none; +} + +/** Notices and Errors **/ +.message { + clear: both; + color: #fff; + font-size: 140%; + font-weight: bold; + margin: 0 0 1em 0; + padding: 5px; +} + +.success, +.message, +.cake-error, +.cake-debug, +.notice, +p.error, +.error-message { + background: #ffcc00; + background-repeat: repeat-x; + background-image: -moz-linear-gradient(top, #ffcc00, #E6B800); + background-image: -ms-linear-gradient(top, #ffcc00, #E6B800); + background-image: -webkit-gradient(linear, left top, left bottom, from(#ffcc00), to(#E6B800)); + background-image: -webkit-linear-gradient(top, #ffcc00, #E6B800); + background-image: -o-linear-gradient(top, #ffcc00, #E6B800); + background-image: linear-gradient(top, #ffcc00, #E6B800); + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + border: 1px solid rgba(0, 0, 0, 0.2); + margin-bottom: 18px; + padding: 7px 14px; + color: #404040; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); +} +.success, +.message, +.cake-error, +p.error, +.error-message { + clear: both; + color: #fff; + background: #c43c35; + border: 1px solid rgba(0, 0, 0, 0.5); + background-repeat: repeat-x; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(top, #ee5f5b, #c43c35); + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); +} +.success { + clear: both; + color: #fff; + border: 1px solid rgba(0, 0, 0, 0.5); + background: #3B8230; + background-repeat: repeat-x; + background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230)); + background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230); + background-image: -moz-linear-gradient(top, #76BF6B, #3B8230); + background-image: -ms-linear-gradient(top, #76BF6B, #3B8230); + background-image: -o-linear-gradient(top, #76BF6B, #3B8230); + background-image: linear-gradient(top, #76BF6B, #3B8230); + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); +} +p.error { + font-family: Monaco, Consolas, Courier, monospace; + font-size: 120%; + padding: 0.8em; + margin: 1em 0; +} +p.error em { + font-weight: normal; + line-height: 140%; +} +.notice { + color: #000; + display: block; + font-size: 120%; + padding: 0.8em; + margin: 1em 0; +} +.success { + color: #fff; +} + +/** Actions **/ +.actions ul { + margin: 0; + padding: 0; +} +.actions li { + margin:0 0 0.5em 0; + list-style-type: none; + white-space: nowrap; + padding: 0; +} +.actions ul li a { + font-weight: normal; + display: block; + clear: both; +} + +/* Buttons and button links */ +input[type=submit], +.actions ul li a, +.actions a { + font-weight:normal; + padding: 4px 8px; + background: #dcdcdc; + background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#dcdcdc)); + background-image: -webkit-linear-gradient(top, #fefefe, #dcdcdc); + background-image: -moz-linear-gradient(top, #fefefe, #dcdcdc); + background-image: -ms-linear-gradient(top, #fefefe, #dcdcdc); + background-image: -o-linear-gradient(top, #fefefe, #dcdcdc); + background-image: linear-gradient(top, #fefefe, #dcdcdc); + color:#333; + border:1px solid #bbb; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + text-decoration: none; + text-shadow: #fff 0px 1px 0px; + min-width: 0; + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); + -webkit-user-select: none; + user-select: none; +} +.actions ul li a:hover, +.actions a:hover { + background: #ededed; + border-color: #acacac; + text-decoration: none; +} +input[type=submit]:active, +.actions ul li a:active, +.actions a:active { + background: #eee; + background-image: -webkit-gradient(linear, left top, left bottom, from(#dfdfdf), to(#eee)); + background-image: -webkit-linear-gradient(top, #dfdfdf, #eee); + background-image: -moz-linear-gradient(top, #dfdfdf, #eee); + background-image: -ms-linear-gradient(top, #dfdfdf, #eee); + background-image: -o-linear-gradient(top, #dfdfdf, #eee); + background-image: linear-gradient(top, #dfdfdf, #eee); + text-shadow: #eee 0px 1px 0px; + -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); + box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); + border-color: #aaa; + text-decoration: none; +} + +/** Related **/ +.related { + clear: both; + display: block; +} + +/** Debugging **/ +pre { + color: #000; + background: #f0f0f0; + padding: 15px; + -moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); + box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); +} +.cake-debug-output { + padding: 0; + position: relative; +} +.cake-debug-output > span { + position: absolute; + top: 5px; + right: 5px; + background: rgba(255, 255, 255, 0.3); + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + padding: 5px 6px; + color: #000; + display: block; + float: left; + -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5); + -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5); + box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5); + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); +} +.cake-debug, +.cake-error { + font-size: 16px; + line-height: 20px; + clear: both; +} +.cake-error > a { + text-shadow: none; +} +.cake-error { + white-space: normal; +} +.cake-stack-trace { + background: rgba(255, 255, 255, 0.7); + color: #333; + margin: 10px 0 5px 0; + padding: 10px 10px 0 10px; + font-size: 120%; + line-height: 140%; + overflow: auto; + position: relative; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} +.cake-stack-trace a { + text-shadow: none; + background: rgba(255, 255, 255, 0.7); + padding: 5px; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + margin: 0px 4px 10px 2px; + font-family: sans-serif; + font-size: 14px; + line-height: 14px; + display: inline-block; + text-decoration: none; + -moz-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3); + -webkit-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3); + box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3); +} +.cake-code-dump pre { + position: relative; + overflow: auto; +} +.cake-context { + margin-bottom: 10px; +} +.cake-stack-trace pre { + color: #000; + background-color: #F0F0F0; + margin: 0px 0 10px 0; + padding: 1em; + overflow: auto; + text-shadow: none; +} +.cake-stack-trace li { + padding: 10px 5px 0px; + margin: 0 0 4px 0; + font-family: monospace; + border: 1px solid #bbb; + -moz-border-radius: 4px; + -wekbkit-border-radius: 4px; + border-radius: 4px; + background: #dcdcdc; + background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#dcdcdc)); + background-image: -webkit-linear-gradient(top, #fefefe, #dcdcdc); + background-image: -moz-linear-gradient(top, #fefefe, #dcdcdc); + background-image: -ms-linear-gradient(top, #fefefe, #dcdcdc); + background-image: -o-linear-gradient(top, #fefefe, #dcdcdc); + background-image: linear-gradient(top, #fefefe, #dcdcdc); +} +/* excerpt */ +.cake-code-dump pre, +.cake-code-dump pre code { + clear: both; + font-size: 12px; + line-height: 15px; + margin: 4px 2px; + padding: 4px; + overflow: auto; +} +.cake-code-dump .code-highlight { + display: block; + background-color: rgba(255, 255, 0, 0.5); +} +.code-coverage-results div.code-line { + padding-left:5px; + display:block; + margin-left:10px; +} +.code-coverage-results div.uncovered span.content { + background:#ecc; +} +.code-coverage-results div.covered span.content { + background:#cec; +} +.code-coverage-results div.ignored span.content { + color:#aaa; +} +.code-coverage-results span.line-num { + color:#666; + display:block; + float:left; + width:20px; + text-align:right; + margin-right:5px; +} +.code-coverage-results span.line-num strong { + color:#666; +} +.code-coverage-results div.start { + border:1px solid #aaa; + border-width:1px 1px 0px 1px; + margin-top:30px; + padding-top:5px; +} +.code-coverage-results div.end { + border:1px solid #aaa; + border-width:0px 1px 1px 1px; + margin-bottom:30px; + padding-bottom:5px; +} +.code-coverage-results div.realstart { + margin-top:0px; +} +.code-coverage-results p.note { + color:#bbb; + padding:5px; + margin:5px 0 10px; + font-size:10px; +} +.code-coverage-results span.result-bad { + color: #a00; +} +.code-coverage-results span.result-ok { + color: #fa0; +} +.code-coverage-results span.result-good { + color: #0a0; +} + +/** Elements **/ +#url-rewriting-warning { + display:none; +} diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/favicon.ico b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/favicon.ico new file mode 100644 index 0000000..b36e81f Binary files /dev/null and b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/favicon.ico differ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/files/empty b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/files/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.icon.png b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.icon.png new file mode 100644 index 0000000..394fa42 Binary files /dev/null and b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.icon.png differ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.power.gif b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.power.gif new file mode 100644 index 0000000..8f8d570 Binary files /dev/null and b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.power.gif differ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-error-icon.png b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-error-icon.png new file mode 100644 index 0000000..07bb124 Binary files /dev/null and b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-error-icon.png differ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-fail-icon.png b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-fail-icon.png new file mode 100644 index 0000000..f9d2f14 Binary files /dev/null and b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-fail-icon.png differ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-pass-icon.png b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-pass-icon.png new file mode 100644 index 0000000..99c5eb0 Binary files /dev/null and b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-pass-icon.png differ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-skip-icon.png b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-skip-icon.png new file mode 100644 index 0000000..749771c Binary files /dev/null and b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/test-skip-icon.png differ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/index.php b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/index.php new file mode 100644 index 0000000..24ea876 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/index.php @@ -0,0 +1,92 @@ +dispatch(new CakeRequest(), new CakeResponse(array('charset' => Configure::read('App.encoding')))); diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/js/empty b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/js/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/test.php b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/test.php new file mode 100644 index 0000000..39bea7a --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/test.php @@ -0,0 +1,92 @@ + + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice + * + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://book.cakephp.org/2.0/en/development/testing.html + * @package app.webroot + * @since CakePHP(tm) v 1.2.0.4433 + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) + */ +set_time_limit(0); +ini_set('display_errors', 1); +/** + * Use the DS to separate the directories in other defines + */ +if (!defined('DS')) { + define('DS', DIRECTORY_SEPARATOR); +} +/** + * These defines should only be edited if you have cake installed in + * a directory layout other than the way it is distributed. + * When using custom settings be sure to use the DS and do not add a trailing DS. + */ + +/** + * The full path to the directory which holds "app", WITHOUT a trailing DS. + * + */ +if (!defined('ROOT')) { + define('ROOT', dirname(dirname(dirname(__FILE__)))); +} +/** + * The actual directory name for the "app". + * + */ +if (!defined('APP_DIR')) { + define('APP_DIR', basename(dirname(dirname(__FILE__)))); +} + +/** + * The absolute path to the "Cake" directory, WITHOUT a trailing DS. + * + * For ease of development CakePHP uses PHP's include_path. If you + * need to cannot modify your include_path, you can set this path. + * + * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php + */ + //define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); + +/** + * Editing below this line should not be necessary. + * Change at your own risk. + * + */ +if (!defined('WEBROOT_DIR')) { + define('WEBROOT_DIR', basename(dirname(__FILE__))); +} +if (!defined('WWW_ROOT')) { + define('WWW_ROOT', dirname(__FILE__) . DS); +} + +if (!defined('CAKE_CORE_INCLUDE_PATH')) { + if (function_exists('ini_set')) { + ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); + } + if (!include ('Cake' . DS . 'bootstrap.php')) { + $failed = true; + } +} else { + if (!include (CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) { + $failed = true; + } +} +if (!empty($failed)) { + trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); +} + +if (Configure::read('debug') < 1) { + die(__d('cake_dev', 'Debug setting does not allow access to this url.')); +} + +require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php'; + +CakeTestSuiteDispatcher::run(); -- cgit v1.2.3