├── plugins └── .gitkeep ├── scripts └── .gitkeep ├── tmp ├── tests │ └── .gitkeep ├── sessions │ └── .gitkeep ├── cache │ ├── models │ │ └── .gitkeep │ ├── views │ │ └── .gitkeep │ └── persistent │ │ └── .gitkeep └── .gitignore ├── tests ├── Fixture │ └── .gitkeep ├── Sample │ └── .gitkeep ├── TestCase │ ├── Model │ │ ├── Behavior │ │ │ └── .gitkeep │ │ └── Table │ │ │ └── TableTest.php │ ├── View │ │ ├── Helper │ │ │ └── .gitkeep │ │ └── AppViewTest.php │ ├── Controller │ │ ├── Component │ │ │ └── .gitkeep │ │ ├── PagesControllerTest.php │ │ └── AppControllerTest.php │ └── Lib │ │ └── ConfigClosuresTest.php └── bootstrap.php ├── src ├── Model │ ├── Behavior │ │ └── .gitkeep │ ├── Entity │ │ └── .gitkeep │ └── Table │ │ ├── .gitkeep │ │ └── Table.php ├── View │ ├── Helper │ │ └── .gitkeep │ └── AppView.php ├── Controller │ ├── Component │ │ └── .gitkeep │ ├── AppController.php │ └── PagesController.php ├── Template │ ├── Pages │ │ ├── faq.ctp │ │ ├── about.ctp │ │ └── home.ctp │ ├── Element │ │ ├── Flash │ │ │ ├── default.ctp │ │ │ ├── error.ctp │ │ │ └── success.ctp │ │ └── Layout │ │ │ ├── pagination.ctp │ │ │ ├── footer.ctp │ │ │ ├── breadcrumbs.ctp │ │ │ └── navigation.ctp │ ├── Layout │ │ ├── rss │ │ │ └── default.ctp │ │ ├── ajax.ctp │ │ ├── Email │ │ │ ├── text │ │ │ │ └── default.ctp │ │ │ └── html │ │ │ │ └── default.ctp │ │ ├── default.ctp │ │ └── error.ctp │ ├── Email │ │ ├── text │ │ │ └── default.ctp │ │ └── html │ │ │ └── default.ctp │ └── Error │ │ ├── error500.ctp │ │ └── error400.ctp ├── Shell │ └── ConsoleShell.php └── Lib │ └── ConfigClosures.php ├── skel ├── tests │ ├── Sample │ │ └── FileParser │ │ │ ├── subdir │ │ │ ├── empty-file │ │ │ └── config.yaml.template │ │ │ ├── not-a-template.php │ │ │ ├── README.md │ │ │ ├── skel │ │ │ └── should-be-skipped.md.template │ │ │ └── README.md.template │ ├── bootstrap.php │ ├── phpunit.xml.dist │ └── TestCase │ │ ├── LoadsysInstallerTest.php │ │ └── InstallerConfigurerTest.php ├── test-project.sh └── src │ ├── InstallerConfigurer.php │ ├── LoadsysInstaller.php │ └── FileParser.php ├── webroot ├── js │ ├── app.js │ ├── foundation │ │ ├── foundation.alert.js │ │ ├── foundation.accordion.js │ │ ├── foundation.equalizer.js │ │ ├── foundation.offcanvas.js │ │ └── foundation.magellan.js │ └── vendor │ │ ├── jquery.cookie.js │ │ ├── placeholder.js │ │ └── fastclick.js ├── robots.txt ├── favicon.ico ├── img │ ├── cake.icon.png │ └── cake.power.gif ├── .htaccess ├── _pi.php ├── css │ ├── app.css │ ├── cake.css │ └── normalize.css └── index.php ├── config ├── app-local.sample.php ├── seed_staging.php ├── schema │ ├── sessions.sql │ └── i18n.sql ├── seed.php ├── seed_vagrant.php ├── bootstrap_cli.php ├── provision.yaml.template ├── paths.php ├── app-travis.php ├── routes.php ├── app-vagrant.php ├── app-staging.php └── bootstrap.php ├── logs └── .gitignore ├── provision ├── dot-files │ ├── .gitconfig │ └── .bash_aliases ├── staging.sql ├── vagrant.sql ├── 010-cake.conf ├── mailcatcher.sh ├── mysql_server.sh ├── vagrant.sh ├── baremetal.sh ├── production.sh ├── staging.sh └── main.sh ├── .gitignore ├── bin ├── .gitignore ├── cake.php └── cake ├── .editorconfig ├── .htaccess ├── index.php ├── .gitattributes ├── composer.json ├── phpdoc.dist.xml.template ├── composer.json.template ├── .travis.yml.template ├── phpunit.xml.dist ├── bootstrap.sh └── Vagrantfile /plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/tests/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/Fixture/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/Sample/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/sessions/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Model/Behavior/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Model/Entity/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Model/Table/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/View/Helper/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/cache/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/cache/views/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Controller/Component/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/cache/persistent/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/TestCase/Model/Behavior/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/TestCase/View/Helper/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /skel/tests/Sample/FileParser/subdir/empty-file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/TestCase/Controller/Component/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /webroot/js/app.js: -------------------------------------------------------------------------------- 1 | $(document).foundation(); 2 | -------------------------------------------------------------------------------- /webroot/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /admin/ 3 | -------------------------------------------------------------------------------- /config/app-local.sample.php: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteCond %{REQUEST_FILENAME} !-f 4 | RewriteRule ^ index.php [L] 5 | 6 | -------------------------------------------------------------------------------- /src/Template/Pages/faq.ctp: -------------------------------------------------------------------------------- 1 |
Lorum ipsum.
5 |Lorum ipsum.
5 |= $this->Paginator->counter() ?>
8 |15 | SQL Query: 16 | = h($error->queryString) ?> 17 |
18 | 19 | params)) : ?> 20 | SQL Query Params: 21 | = Debugger::dump($error->params) ?> 22 | 23 | element('auto_table_warning'); 25 | 26 | if (extension_loaded('xdebug')): 27 | xdebug_print_function_stack(); 28 | endif; 29 | 30 | $this->end(); 31 | endif; 32 | ?> 33 |35 | = __d('cake', 'Error') ?>: 36 | = h($message) ?> 37 |
38 | -------------------------------------------------------------------------------- /config/seed_vagrant.php: -------------------------------------------------------------------------------- 1 | [ 15 | '_truncate' => true, 16 | '_entityOptions' => [ 17 | 'validate' => false, 18 | ], 19 | '_saveOptions' => [ 20 | 'checkRules' => false, 21 | ], 22 | '_defaults' => [ 23 | 'password' => '', // "@TODO: Manually encrypt a password to save here." 24 | 'is_active' => 1, 25 | 'creator_id' => null, 26 | 'modifier_id' => null, 27 | ], 28 | [ 29 | 'id' => '799763fd-32bc-11e4-9e39-080027506c76', 30 | 'email' => 'admin@localhost.com', 31 | 'role' => 'admin', 32 | ], 33 | ], 34 | */ 35 | 36 | ]; 37 | 38 | $this->importTables($data); 39 | -------------------------------------------------------------------------------- /src/Template/Error/error400.ctp: -------------------------------------------------------------------------------- 1 | layout = 'dev_error'; 6 | 7 | $this->assign('title', $message); 8 | $this->assign('templateName', 'error400.ctp'); 9 | 10 | $this->start('file'); 11 | ?> 12 | queryString)) : ?> 13 |14 | SQL Query: 15 | = h($error->queryString) ?> 16 |
17 | 18 | params)) : ?> 19 | SQL Query Params: 20 | = Debugger::dump($error->params) ?> 21 | 22 | = $this->element('auto_table_warning') ?> 23 | end(); 29 | endif; 30 | ?> 31 |33 | = __d('cake', 'Error') ?>: 34 | = sprintf( 35 | __d('cake', 'The requested address %s was not found on this server.'), 36 | "'{$url}'" 37 | ) ?> 38 |
39 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "loadsys/skeleton", 3 | "description": "Loadsys CakePHP 3.x app skeleton", 4 | "homepage": "https://github.com/loadsys/CakePHP-Skeleton", 5 | "type": "project", 6 | "license": "MIT", 7 | "require": { 8 | "php": ">=5.6.0", 9 | "cakephp/cakephp": "~3.1", 10 | "cakephp/plugin-installer": "*" 11 | }, 12 | "require-dev": { 13 | "composer/composer": "*", 14 | "phpunit/phpunit": "4.8", 15 | "loadsys/loadsys_codesniffer": "~3.0" 16 | }, 17 | "autoload": { 18 | "psr-4": { 19 | "App\\": "src" 20 | } 21 | }, 22 | "autoload-dev": { 23 | "psr-4": { 24 | "App\\Test\\": "tests", 25 | "Cake\\Test\\": "./vendor/cakephp/cakephp/tests", 26 | "Composer\\": "./vendor/composer/composer/src/Composer", 27 | "Skel\\": "skel/src", 28 | "Skel\\Test\\": "skel/tests" 29 | } 30 | }, 31 | "scripts": { 32 | "post-create-project-cmd": [ 33 | "Skel\\LoadsysInstaller::postInstall" 34 | ], 35 | "post-autoload-dump": [ 36 | "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump" 37 | ] 38 | }, 39 | "minimum-stability": "dev", 40 | "prefer-stable": true 41 | } 42 | -------------------------------------------------------------------------------- /config/bootstrap_cli.php: -------------------------------------------------------------------------------- 1 | 'App', 19 | 'encoding' => 'UTF-8', 20 | 'base' => false, 21 | 'baseUrl' => false, 22 | 'dir' => TEST_APP . 'TestApp' . DS, 23 | 'webroot' => 'webroot', 24 | 'wwwRoot' => WWW_ROOT, 25 | 'fullBaseUrl' => 'http://localhost', 26 | 'imageBaseUrl' => 'img/', 27 | 'jsBaseUrl' => 'js/', 28 | 'cssBaseUrl' => 'css/', 29 | 'paths' => [ 30 | 'plugins' => [TEST_APP . 'Plugin' . DS], 31 | 'templates' => [APP . 'Template' . DS], 32 | 'locales' => [APP . 'Locale' . DS], 33 | ] 34 | ]); 35 | 36 | 37 | // Wipe out any accumulated caches before running tests. 38 | foreach (\Cake\Cache\Cache::configured() as $key) { 39 | \Cake\Cache\Cache::clear(false, $key); 40 | echo "Cleared cache: $key\n"; 41 | } 42 | 43 | echo PHP_EOL; 44 | -------------------------------------------------------------------------------- /tests/TestCase/View/AppViewTest.php: -------------------------------------------------------------------------------- 1 | getMock( 47 | '\App\View\AppView', 48 | ['loadHelper'] 49 | ); 50 | 51 | $AppView->expects($this->at(0)) 52 | ->method('loadHelper') 53 | ->with('Html'); 54 | $AppView->expects($this->at(1)) 55 | ->method('loadHelper') 56 | ->with('Form'); 57 | $AppView->expects($this->at(2)) 58 | ->method('loadHelper') 59 | ->with('Flash'); 60 | 61 | $AppView->initialize(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /provision/mysql_server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Convenience script to install and start MySQL server, since it is used 4 | # in multiple environments. 5 | 6 | 7 | # Set up working vars. 8 | # PROVISION_DIR must be inherited from caller. 9 | # APP_ENV must be inherited from caller. 10 | MYSQL_DEFAULT_PASS="password" 11 | MYSQL_ROOT_PASS=${1:-$MYSQL_DEFAULT_PASS} 12 | SQL_IMPORT_FILE="${PROVISION_DIR}/${APP_ENV}.sql" 13 | 14 | 15 | # Install a local MySQL server. 16 | echo "## Installing local MySQL server." 17 | 18 | sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password ${MYSQL_ROOT_PASS}" 19 | 20 | sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password ${MYSQL_ROOT_PASS}" 21 | 22 | sudo apt-get install -y mysql-server 23 | 24 | # You should probably run this yourself as it can't be automated. 25 | #mysql_secure_installation 26 | 27 | 28 | # Configure MySQL databases. 29 | if [ -r "${SQL_IMPORT_FILE}" ]; then 30 | echo "## Executing environment-specific MySQL script: \`${SQL_IMPORT_FILE}\`" 31 | 32 | mysql --host=localhost --user=root --password="$MYSQL_ROOT_PASS" mysql < "${SQL_IMPORT_FILE}" 33 | else 34 | echo "## Environment-specific MySQL script not found. Skipping: \`${SQL_IMPORT_FILE}\`" 35 | fi 36 | -------------------------------------------------------------------------------- /phpdoc.dist.xml.template: -------------------------------------------------------------------------------- 1 | 2 |Your version of PHP is 5.6.0 or higher.
47 | 48 |Your version of PHP is too low. You need PHP 5.6.0 or higher to use CakePHP.
49 | 50 | 51 | 52 |Your version of PHP has the mbstring extension loaded.
53 | 54 |Your version of PHP does NOT have the mbstring extension loaded.
; 55 | 56 | 57 | 58 |Your version of PHP has the openssl extension loaded.
59 | 60 |Your version of PHP has the mcrypt extension loaded.
61 | 62 |Your version of PHP does NOT have the openssl or mcrypt extension loaded.
63 | 64 | 65 | 66 |Your version of PHP has the intl extension loaded.
67 | 68 |Your version of PHP does NOT have the intl extension loaded.
69 | 70 |Your tmp directory is writable.
74 | 75 |Your tmp directory is NOT writable.
76 | 77 | 78 | 79 |Your logs directory is writable.
80 | 81 |Your logs directory is NOT writable.
82 | 83 | 84 | 85 | 86 |The = $settings['className'] ?>Engine is being used for core caching. To change the config edit config/app.php
87 | 88 |Your cache is NOT working. Please check the settings in config/app.php
89 | 90 |CakePHP is able to connect to the database.
111 | 112 |CakePHP is NOT able to connect to the database.
= $errorMsg ?>
132 |
140 | CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Front Controller and MVC. 141 |
142 |143 | Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. 144 |
145 | 146 |