Commit 5381c7e7 authored by Yoshiharu Hirose's avatar Yoshiharu Hirose

FuelPHP

parent b0779ee9
# [FuelPHP](http://fuelphp.com/)
## 概要
## セットアップ記録
### インストール
1. fuelphp-1.8.zip をダウンロード
2. /vagrant/www 配下に展開
### データベース設定
未設定
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
# config.vm.box = "base"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# sudo apt-get update
# sudo apt-get install -y apache2
# SHELL
config.vm.box = "puppetlabs/centos-6.6-64-puppet"
config.vm.box_version = "1.0.1"
if ENV['HTTP_PROXY'] || ENV['HTTPS_PROXY']
unless Vagrant.has_plugin?("vagrant-proxyconf")
raise 'vagrant-proxyconf plugin required.'
end
config.proxy.http = ENV['HTTP_PROXY']
config.proxy.https = ENV['HTTPS_PROXY']
config.proxy.no_proxy = "localhost,127.0.0.1,.yso.marino.co.jp"
end
config.vm.hostname = "www"
config.vm.network :forwarded_port, guest: 80, host: 8000
config.vm.provision :puppet do |puppet|
puppet.manifests_path = 'puppet/manifests'
puppet.options = ["--templatedir", "/vagrant/puppet/templates"]
end
end
exec { 'locale':
command => '/bin/sed -i -e "s/^LANG=.*$/LANG=\"ja_JP.UTF-8\"/" /etc/sysconfig/i18n',
unless => '/usr/bin/test \! -f /etc/sysconfig/i18n || /bin/grep "^LANG=\"ja_JP.UTF-8\"" /etc/sysconfig/i18n',
}
file { '/etc/localtime':
ensure => file,
source => '/usr/share/zoneinfo/Asia/Tokyo',
}
exec { 'selinux':
command => '/usr/sbin/setenforce 0; /bin/sed -i -e "s|^SELINUX=.*$|SELINUX=disabled|" /etc/selinux/config',
unless => '/usr/bin/test \! -f /etc/selinux/config || grep "SELINUX=disabled" /etc/selinux/config',
}
exec { 'grub':
command => '/bin/sed -i -e "s|quiet.*$|quiet enforcing=0|" /etc/grub.conf',
unless => '/usr/bin/test \! -f /etc/grub.conf || grep "quiet enforcing=0" /etc/grub.conf',
}
service { 'iptables':
enable => false,
ensure => stopped,
}
# repositories
yumrepo { 'epel':
descr => 'epel repo',
mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch',
enabled => 0,
gpgcheck => 1,
gpgkey => 'https://fedoraproject.org/static/0608B895.txt',
}
yumrepo { 'remi':
descr => 'Remi\'s RPM repository for Enterprise Linux $releasever - $basearch',
mirrorlist => 'http://rpms.remirepo.net/enterprise/$releasever/remi/mirror',
enabled => 0,
gpgcheck => 1,
gpgkey => 'http://rpms.remirepo.net/RPM-GPG-KEY-remi',
}
yumrepo { 'remi-php56':
descr => 'Remi\'s RPM repository for Enterprise Linux $releasever - $basearch',
mirrorlist => 'http://rpms.remirepo.net/enterprise/$releasever/php56/mirror',
enabled => 0,
gpgcheck => 1,
gpgkey => 'http://rpms.remirepo.net/RPM-GPG-KEY-remi',
}
# Apache
package { ['httpd']:
ensure => present,
}
service { 'httpd':
enable => true,
ensure => running,
hasrestart => true,
require => Package['httpd'],
}
file { '/etc/httpd/conf/httpd.conf':
ensure => file,
content => template('httpd.conf'),
require => Package['httpd'],
notify => Service['httpd'],
}
file { '/etc/httpd/conf.d/vhost.conf':
ensure => file,
content => template('vhosts.conf'),
require => Package['httpd'],
notify => Service['httpd'],
}
# PHP
package { ['php', 'php-devel', 'php-pear', 'php-pdo', 'php-mysqlnd', 'php-xml']:
ensure => present,
install_options => ['--enablerepo=epel', '--enablerepo=remi', '--enablerepo=remi-php56'],
require => Yumrepo['epel', 'remi', 'remi-php56'],
}
exec { 'php-xdebug':
command => '/usr/bin/pecl install xdebug',
unless => '/usr/bin/pecl list xdebug',
require => Package['php', 'php-devel', 'php-pear'],
}
file { '/etc/php.ini':
ensure => file,
content => template('php.ini'),
notify => Service['httpd'],
}
# MySQL
package { ['mysql-server']:
ensure => present,
}
service { 'mysqld':
enable => true,
ensure => running,
hasrestart => true,
require => Package['mysql-server'],
}
exec { 'mysql-create-database':
command => '/usr/bin/mysql -u root -e "CREATE DATABASE testdb CHARACTER SET utf8;"',
unless => '/usr/bin/mysql -u root -e "use testdb"',
require => Service['mysqld'],
}
# Composer
exec { 'composer':
cwd => '/vagrant/www/site',
environment => ['COMPOSER_HOME=/tmp/composer'],
command => '/usr/bin/curl -sS https://getcomposer.org/installer | /usr/bin/php',
unless => '/usr/bin/test -x /vagrant/www/composer.phar',
require => Package['php']
}
exec { 'composer-install':
cwd => '/vagrant/www/site',
environment => ['COMPOSER_HOME=/tmp/composer'],
command => '/usr/bin/php composer.phar install -n --prefer-dist',
timeout => 1200,
require => [Exec['composer'], Package['php', 'php-xml']]
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<VirtualHost *:80>
ServerName www
#ErrorLog /var/log/httpd/error.log
#CustomLog /var/log/httpd/access.log combined
DocumentRoot /vagrant/www/site/public
DirectoryIndex index.php
<Directory "/vagrant/www/site/public">
AllowOverride All
Allow from All
Options FollowSymLinks Indexes
</Directory>
</VirtualHost>
# temp files from editors
*~
*.bak
.DS_Store
.buildpath
.project
.settings
*.tmproj
build
.idea
nbproject/
# hidden files created by Windows
Thumbs.db
desktop.ini
# the composer package lock file and install directory
/composer.lock
/fuel/vendor
# any of the fuel packages installed by default
/docs/
/fuel/core/
/fuel/packages/auth/
/fuel/packages/email/
/fuel/packages/oil/
/fuel/packages/orm/
/fuel/packages/parser/
# dynamically generated files
/fuel/app/logs/*/*/*
/fuel/app/cache/*/*
/fuel/app/config/crypt.php
/composer.phar
language: php
php:
- 5.3
- 5.4
- 5.5
- 7.0
before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev
script: php oil test
This diff is collapsed.
Please read the project contibuting guidelines before creating an issue of sending in a pull request:
https://github.com/fuel/fuel/wiki/Contributing
Copyright (c) 2010-2016 Fuel Development Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#FuelPHP
* Version: 1.8
* [Website](http://fuelphp.com/)
* [Release Documentation](http://docs.fuelphp.com)
* [Release API browser](http://api.fuelphp.com)
* [Development branch Documentation](http://dev-docs.fuelphp.com)
* [Development branch API browser](http://dev-api.fuelphp.com)
* [Support Forum](http://fuelphp.com/forums) for comments, discussion and community support
## Description
FuelPHP is a fast, lightweight PHP 5.3+ framework. In an age where frameworks are a dime a dozen, We believe that FuelPHP will stand out in the crowd. It will do this by combining all the things you love about the great frameworks out there, while getting rid of the bad.
FuelPHP is fully PHP 7 compatible.
## More information
For more detailed information, see the [development wiki](https://github.com/fuelphp/fuelphp/wiki).
##Development Team
* Harro Verton - Project Manager, Developer ([http://wanwizard.eu/](http://wanwizard.eu/))
* Steve West - Core Developer, ORM
* Márk Sági-Kazár - Developer
### Want to join?
The FuelPHP development team is always looking for new team members, who are willing
to help lift the framework to the next level, and have the commitment to not only
produce awesome code, but also great documentation, and support to our users.
You can not apply for membership. Start by sending in pull-requests, work on outstanding
feature requests or bugs, and become active in the #fuelphp IRC channel. If your skills
are up to scratch, we will notice you, and will ask you to become a team member.
### Alumni
* Frank de Jonge - Developer ([http://frenky.net/](http://frenky.net/))
* Jelmer Schreuder - Developer ([http://jelmerschreuder.nl/](http://jelmerschreuder.nl/))
* Phil Sturgeon - Developer ([http://philsturgeon.co.uk](http://philsturgeon.co.uk))
* Dan Horrigan - Founder, Developer ([http://dhorrigan.com](http://dhorrigan.com))
# Testing FuelPHP
FuelPHP uses [PHPUnit](https://github.com/sebastianbergmann/phpunit/) for it's Unit Testing needs. It must be installed for the tests to run.
**NOTE: No code will be accepted without tests written.**
## Running Tests
Running the unit tests is as simple as navigating to the root install folder on the command line and running the following:
$ php oil test
That's it! You can also tell it specific groups (which we will get into in minute) to run. For example to run only the core tests:
$ php oil test --group=Core
As you can see we've wrapped the phpunit command with our own Oil utility which will in time become more and more useful. If you wish to get right at the phpunit tests manually you can point it to our .xml configuration file:
$ phpunit -c fuel/core/phpunit.xml --group Core
This may break or change in future versions so it's suggested you stick with using Oil for your testing.
## Writing Tests
### Where do they go?
All tests are to go in the **tests** folders inside their respective parent folder. For instance:
* App tests go in *fuel/app/tests*
* Core tests go in *fuel/core/tests*
* Package tests go in *fuel/packages/package_name/tests*
### File / Class Naming
The Test class names should be in the form of **Tests_Whatever**.
Filenames should be all lower case and be the class name minus the "Tests_" part.
Some example names:
// Good
Tests_Arr in fuel/core/tests/arr.php
Tests_Image in fuel/core/tests/image.php
Tests_Fuel in fuel/core/tests/fuel.php
// Bad
Arrtests
Somestuff
### Test Grouping
All tests inside the **core** folder must be in the **core** group. A classes test's should also be grouped together under the name of the class.
Here is an example of a core class test with proper DocBlocks:
/**
* Arr class tests
*
* @group Core
* @group Arr
*/
class Tests_Arr extends TestCase {
/**
* Tests Arr::get()
*
* @test
*/
public function test_get()
{
// Test code here
}
}
All App tests should be in the **app** group.
### Namespaces
All **core** tests should be in the **Fuel\Core** namespace. This is so that we are sure we are testing the core classes,
not any extensions that may be in *app*.
App tests can be in any namespace.
### What class do I extend?
All tests should extend the **Fuel\Core\TestCase** class.
**NOTE: if you are in the Fuel\Core namespace you can leave off the Fuel\Core namespace and just extend **TestCase**.
## Example
namespace Fuel\Core;
/**
* Arr class tests
*
* @group Core
* @group Arr
*/
class Tests_Arr extends TestCase {
/**
* Tests Arr::flatten_assoc()
*
* @test
*/
public function test_flatten_assoc()
{
$people = array(
array(
"name" => "Jack",
"age" => 21
),
array(
"name" => "Jill",
"age" => 23
)
);
$expected = array(
"0:name" => "Jack",
"0:age" => 21,
"1:name" => "Jill",
"1:age" => 23
);
$output = Arr::flatten_assoc($people);
$this->assertEquals($expected, $output);
}
}
{
"name": "fuel/fuel",
"type": "project",
"description" : "FuelPHP is a simple, flexible, community driven PHP 5.3.3+ framework, based on the best ideas of other frameworks, with a fresh start!",
"keywords": ["application", "website", "development", "framework", "PHP", "PHP7"],
"license": "MIT",
"require": {
"php": ">=5.3.3",
"composer/installers": "~1.0",
"fuel/core": "1.8.*",
"fuel/auth": "1.8.*",
"fuel/email": "1.8.*",
"fuel/oil": "1.8.*",
"fuel/orm": "1.8.*",
"fuel/parser": "1.8.*",
"fuelphp/upload": "2.0.6",
"monolog/monolog": "1.5.*",
"phpseclib/phpseclib": "2.0.0",
"michelf/php-markdown": "1.4.0"
},
"require-dev": {
"fuel/docs": "1.8.*"
},
"suggest": {
"dwoo/dwoo" : "Allow Dwoo templating with the Parser package",
"mustache/mustache": "Allow Mustache templating with the Parser package",
"smarty/smarty": "Allow Smarty templating with the Parser package",
"twig/twig": "Allow Twig templating with the Parser package",
"pyrocms/lex": "Allow Lex templating with the Parser package",
"mthaml/mthaml": "Allow Haml templating with Twig supports with the Parser package"
},
"config": {
"vendor-dir": "fuel/vendor"
},
"extra": {
"installer-paths": {
"fuel/{$name}": ["fuel/core"],
"{$name}": ["fuel/docs"]
}
},
"scripts": {
"post-install-cmd": [
"php oil r install"
]
},
"minimum-stability": "stable"
}
deny from all
\ No newline at end of file
<?php
// Bootstrap the framework DO NOT edit this
require COREPATH.'bootstrap.php';
\Autoloader::add_classes(array(
// Add classes you want to override here
// Example: 'View' => APPPATH.'classes/view.php',
));
// Register the autoloader
\Autoloader::register();
/**
* Your environment. Can be set to any of the following:
*
* Fuel::DEVELOPMENT
* Fuel::TEST
* Fuel::STAGING
* Fuel::PRODUCTION
*/
\Fuel::$env = \Arr::get($_SERVER, 'FUEL_ENV', \Arr::get($_ENV, 'FUEL_ENV', \Fuel::DEVELOPMENT));
// Initialize the framework with the config file.
\Fuel::init('config.php');
<?php
/**
* Fuel is a fast, lightweight, community driven PHP5 framework.
*
* @package Fuel
* @version 1.8
* @author Fuel Development Team
* @license MIT License
* @copyright 2010 - 2016 Fuel Development Team
* @link http://fuelphp.com
*/
/**
* The Welcome Controller.
*
* A basic controller example. Has examples of how to set the
* response body and status.
*
* @package app
* @extends Controller
*/
class Controller_Welcome extends Controller
{
/**
* The basic welcome message
*
* @access public
* @return Response
*/
public function action_index()
{
return Response::forge(View::forge('welcome/index'));
}
/**
* A typical "Hello, Bob!" type example. This uses a Presenter to
* show how to use them.
*
* @access public
* @return Response
*/
public function action_hello()
{
return Response::forge(Presenter::forge('welcome/hello'));
}
/**
* The 404 action for the application.
*
* @access public
* @return Response
*/
public function action_404()
{
return Response::forge(Presenter::forge('welcome/404'), 404);
}
}
<?php
/**
* The welcome 404 presenter.
*
* @package app
* @extends Presenter
*/
class Presenter_Welcome_404 extends Presenter
{
/**
* Prepare the view data, keeping this in here helps clean up
* the controller.
*
* @return void
*/
public function view()
{
$messages = array('Aw, crap!', 'Bloody Hell!', 'Uh Oh!', 'Nope, not here.', 'Huh?');
$this->title = $messages[array_rand($messages)];
}
}
<?php
/**
* The welcome hello presenter.
*
* @package app
* @extends Presenter
*/
class Presenter_Welcome_Hello extends Presenter
{
/**
* Prepare the view data, keeping this in here helps clean up
* the controller.
*
* @return void
*/
public function view()
{
$this->name = $this->request()->param('name', 'World');
}
}
<?php
/**
* Part of the Fuel framework.
*
* @package Fuel
* @version 1.8
* @author Fuel Development Team
* @license MIT License
* @copyright 2010 - 2016 Fuel Development Team
* @link http://fuelphp.com
*/
return array(
/**
* base_url - The base URL of the application.
* MUST contain a trailing slash (/)
*
* You can set this to a full or relative URL:
*
* 'base_url' => '/foo/',
* 'base_url' => 'http://foo.com/'
*
* Set this to null to have it automatically detected.
*/
// 'base_url' => null,
/**
* url_suffix - Any suffix that needs to be added to
* URL's generated by Fuel. If the suffix is an extension,
* make sure to include the dot
*
* 'url_suffix' => '.html',
*
* Set this to an empty string if no suffix is used
*/
// 'url_suffix' => '',
/**
* index_file - The name of the main bootstrap file.
*
* Set this to 'index.php if you don't use URL rewriting
*/
// 'index_file' => false,
// 'profiling' => false,
/**
* Default location for the file cache
*/
// 'cache_dir' => APPPATH.'cache/',
/**
* Settings for the file finder cache (the Cache class has it's own config!)
*/
// 'caching' => false,
// 'cache_lifetime' => 3600, // In Seconds
/**
* Callback to use with ob_start(), set this to 'ob_gzhandler' for gzip encoding of output
*/
// 'ob_callback' => null,
// 'errors' => array(
// Which errors should we show, but continue execution? You can add the following:
// E_NOTICE, E_WARNING, E_DEPRECATED, E_STRICT to mimic PHP's default behaviour
// (which is to continue on non-fatal errors). We consider this bad practice.
// 'continue_on' => array(),
// How many errors should we show before we stop showing them? (prevents out-of-memory errors)
// 'throttle' => 10,
// Should notices from Error::notice() be shown?
// 'notices' => true,
// Render previous contents or show it as HTML?
// 'render_prior' => false,
// ),
/**
* Localization & internationalization settings
*/
// 'language' => 'en', // Default language
// 'language_fallback' => 'en', // Fallback language when file isn't available for default language
// 'locale' => 'en_US', // PHP set_locale() setting, null to not set
/**
* Internal string encoding charset
*/
// 'encoding' => 'UTF-8',
/**
* DateTime settings
*
* server_gmt_offset in seconds the server offset from gmt timestamp when time() is used
* default_timezone optional, if you want to change the server's default timezone
*/
// 'server_gmt_offset' => 0,
// 'default_timezone' => null,
/**
* Logging Threshold. Can be set to any of the following:
*
* Fuel::L_NONE
* Fuel::L_ERROR
* Fuel::L_WARNING
* Fuel::L_DEBUG
* Fuel::L_INFO
* Fuel::L_ALL
*/
// 'log_threshold' => Fuel::L_WARNING,
// 'log_path' => APPPATH.'logs/',
// 'log_date_format' => 'Y-m-d H:i:s',
/**
* Security settings
*/
'security' => array(
// 'csrf_autoload' => false,
// 'csrf_autoload_methods' => array('post', 'put', 'delete'),
// 'csrf_bad_request_on_fail' => false,
// 'csrf_auto_token' => false,
// 'csrf_token_key' => 'fuel_csrf_token',
// 'csrf_expiration' => 0,
/**
* A salt to make sure the generated security tokens are not predictable
*/
// 'token_salt' => 'put your salt value here to make the token more secure',
/**
* Allow the Input class to use X headers when present
*
* Examples of these are HTTP_X_FORWARDED_FOR and HTTP_X_FORWARDED_PROTO, which
* can be faked which could have security implications
*/
// 'allow_x_headers' => false,
/**
* This input filter can be any normal PHP function as well as 'xss_clean'
*
* WARNING: Using xss_clean will cause a performance hit.
* How much is dependant on how much input data there is.
*/
'uri_filter' => array('htmlentities'),
/**
* This input filter can be any normal PHP function as well as 'xss_clean'
*
* WARNING: Using xss_clean will cause a performance hit.
* How much is dependant on how much input data there is.
*/
// 'input_filter' => array(),
/**
* This output filter can be any normal PHP function as well as 'xss_clean'
*
* WARNING: Using xss_clean will cause a performance hit.
* How much is dependant on how much input data there is.
*/
'output_filter' => array('Security::htmlentities'),
/**
* Encoding mechanism to use on htmlentities()
*/
// 'htmlentities_flags' => ENT_QUOTES,
/**
* Whether to encode HTML entities as well
*/
// 'htmlentities_double_encode' => false,
/**
* Whether to automatically filter view data
*/
// 'auto_filter_output' => true,
/**
* With output encoding switched on all objects passed will be converted to strings or
* throw exceptions unless they are instances of the classes in this array.
*/
'whitelisted_classes' => array(
'Fuel\\Core\\Presenter',
'Fuel\\Core\\Response',
'Fuel\\Core\\View',
'Fuel\\Core\\ViewModel',
'Closure',
),
),
/**
* Cookie settings
*/
// 'cookie' => array(
// Number of seconds before the cookie expires
// 'expiration' => 0,
// Restrict the path that the cookie is available to
// 'path' => '/',
// Restrict the domain that the cookie is available to
// 'domain' => null,
// Only transmit cookies over secure connections
// 'secure' => false,
// Only transmit cookies over HTTP, disabling Javascript access
// 'http_only' => false,
// ),
/**
* Validation settings
*/
// 'validation' => array(
/**
* Whether to fallback to global when a value is not found in the input array.
*/
// 'global_input_fallback' => true,
// ),
/**
* Controller class prefix
*/
// 'controller_prefix' => 'Controller_',
/**
* Routing settings
*/
// 'routing' => array(
/**
* Whether URI routing is case sensitive or not
*/
// 'case_sensitive' => true,
/**
* Whether to strip the extension
*/
// 'strip_extension' => true,
// ),
/**
* To enable you to split up your application into modules which can be
* routed by the first uri segment you have to define their basepaths
* here. By default empty, but to use them you can add something
* like this:
* array(APPPATH.'modules'.DS)
*
* Paths MUST end with a directory separator (the DS constant)!
*/
// 'module_paths' => array(
// //APPPATH.'modules'.DS
// ),
/**
* To enable you to split up your additions to the framework, packages are
* used. You can define the basepaths for your packages here. By default
* empty, but to use them you can add something like this:
* array(APPPATH.'modules'.DS)
*
* Paths MUST end with a directory separator (the DS constant)!
*/
'package_paths' => array(
PKGPATH,
),
/**************************************************************************/
/* Always Load */
/**************************************************************************/
// 'always_load' => array(
/**
* These packages are loaded on Fuel's startup.
* You can specify them in the following manner:
*
* array('auth'); // This will assume the packages are in PKGPATH
*
* // Use this format to specify the path to the package explicitly
* array(
* array('auth' => PKGPATH.'auth/')
* );
*/
// 'packages' => array(
// //'orm',
// ),
/**
* These modules are always loaded on Fuel's startup. You can specify them
* in the following manner:
*
* array('module_name');
*
* A path must be set in module_paths for this to work.
*/
// 'modules' => array(),
/**
* Classes to autoload & initialize even when not used
*/
// 'classes' => array(),
/**
* Configs to autoload
*
* Examples: if you want to load 'session' config into a group 'session' you only have to
* add 'session'. If you want to add it to another group (example: 'auth') you have to
* add it like 'session' => 'auth'.
* If you don't want the config in a group use null as groupname.
*/
// 'config' => array(),
/**
* Language files to autoload
*
* Examples: if you want to load 'validation' lang into a group 'validation' you only have to
* add 'validation'. If you want to add it to another group (example: 'forms') you have to
* add it like 'validation' => 'forms'.
* If you don't want the lang in a group use null as groupname.
*/
// 'language' => array(),
// ),
);
<?php
/**
* Use this file to override global defaults.
*
* See the individual environment DB configs for specific config information.
*/
return array(
);
<?php
/**
* The development database settings. These get merged with the global settings.
*/
return array(
'default' => array(
'connection' => array(
'dsn' => 'mysql:host=localhost;dbname=fuel_dev',
'username' => 'root',
'password' => 'root',
),
),
);
<?php
/**
* The production database settings. These get merged with the global settings.
*/
return array(
'default' => array(
'connection' => array(
'dsn' => 'mysql:host=localhost;dbname=fuel_prod',
'username' => 'fuel_app',
'password' => 'super_secret_password',
),
),
);
<?php
return array(
'_root_' => 'welcome/index', // The default route
'_404_' => 'welcome/404', // The main 404 route
'hello(/:name)?' => array('welcome/hello', 'name' => 'hello'),
);
<?php
/**
* The staging database settings. These get merged with the global settings.
*/
return array(
'default' => array(
'connection' => array(
'dsn' => 'mysql:host=localhost;dbname=fuel_staging',
'username' => 'fuel_app',
'password' => 'super_secret_password',
),
),
);
<?php
/**
* The test database settings. These get merged with the global settings.
*
* This environment is primarily used by unit tests, to run on a controlled environment.
*/
return array(
'default' => array(
'connection' => array(
'dsn' => 'mysql:host=localhost;dbname=fuel_test',
'username' => 'fuel_app',
'password' => 'super_secret_password',
),
),
);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment