Initial import.

This commit is contained in:
Lonnie Ezell 2015-08-26 23:16:28 -05:00
commit 0d92381e74
15 changed files with 394 additions and 0 deletions

22
.gitattributes vendored Normal file
View File

@ -0,0 +1,22 @@
# This file tells which files and directories should be ignored and
# NOT downloaded when using composer to pull down a project with
# the --prefer-dist option selected. Used to remove development
# specific files so user has a clean download.
# git files
.gitattributes export-ignore
# .gitignore
# helper config files
.travis.yml export-ignore
phpdoc.dist.xml export-ignore
# Misc other files
readme.rst
# They don't want all of our tests...
tests/codeigniter/ export-ignore
tests/travis/ export-ignore
# User Guide Source Files
user_guide_src

90
.gitignore vendored Normal file
View File

@ -0,0 +1,90 @@
#-------------------------
# Operating Specific Junk Files
#-------------------------
# OS X
.DS_Store
.AppleDouble
.LSOverride
# OS X Thumbnails
._*
# Windows image file caches
Thumbs.db
ehthumbs.db
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
# Linux
*~
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
#-------------------------
# Temporary Files
#-------------------------
writeable/cache/*
!writeable/cache/index.html
!writeable/cache/.htaccess
writeable/logs/*
!writeable/logs/index.html
!writeable/logs/.htaccess
writeable/uploads/*
!writeable/uploads/index.html
!writeable/uploads/.htaccess
#-------------------------
# User Guide Temp Files
#-------------------------
user_guide_src/build/*
user_guide_src/cilexer/build/*
user_guide_src/cilexer/dist/*
user_guide_src/cilexer/pycilexer.egg-info/*
#-------------------------
# Composer
#-------------------------
vendor/
#-------------------------
# IDE Files
#-------------------------
# Jetbrains editors (PHPStorm, etc)
.idea/
*.iml
# Netbeans
nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml
.nb-gradle/
## Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project

12
README.md Normal file
View File

@ -0,0 +1,12 @@
# CodeIgniter 4 Development
This repo contains work that may or may not make it into the official version of CodeIgniter.
More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums.
## Contributing
We are not accepting contributions from the public until a stable enough base has been formed, and our plans fleshed out and things settle down a little bit. At that point, we will welcome your comments and help creating the best framework for our community.
## Server Requirements
PHP version 7 is required.
You can obtain a working Vagrant box from Rasmus Lerdorf [here](https://github.com/rlerdorf/php7dev).

6
application/.htaccess Normal file
View File

@ -0,0 +1,6 @@
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>

11
application/index.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

15
composer.json Normal file
View File

@ -0,0 +1,15 @@
{
"description": "The CodeIgniter framework v4",
"name": "codeigniter/framework",
"type": "project",
"homepage": "http://codeigniter.com",
"support": {
"forum": "http://forum.codeigniter.com/",
"wiki": "https://github.com/bcit-ci/CodeIgniter/wiki",
"irc": "irc://irc.freenode.net/codeigniter",
"source": "https://github.com/bcit-ci/CodeIgniter"
},
"require": {
"php": ">=7.0"
}
}

1
index.php Normal file
View File

@ -0,0 +1 @@
<h1>Welcome To CodeIgniter 4</h1>

21
phpdoc.dist.xml Normal file
View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
<title>CodeIgniter v3.0.0 API</title>
<parser>
<target>./api/</target>
</parser>
<transformer>
<target>./api/</target>
</transformer>
<files>
<directory>./system</directory>
</files>
<logging>
<level>warn</level>
<paths>
<default>./api/log/{DATE}.log</default>
<errors>./api/{DATE}.errors.log</errors>
</paths>
</logging>
</phpdoc>

6
system/.htaccess Normal file
View File

@ -0,0 +1,6 @@
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>

11
system/index.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,160 @@
PHP Coding style guide
----------------------
The following document declares a set of coding convention rules to be
followed when contributing PHP code to the CodeIgniter project.
Some of these rules, like naming conventions for example, *may* be
incorporated into the framework's logic and therefore be functionally
enforced (which would be separately documented), but while we would
recommend it, there's no requirement that you follow these conventions in
your own applications.
TODO: Add acknowledgement notice in the footer, referencing popular
coding style conventions that we've derived content from.
*The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to
be interpreted as described in [RFC 2119](http://www.ietf.org/rfc/rfc2119.txt).*
*Note: When used below, the term "class" refers to all kinds of classes,
interfaces and traits.*
Files
=====
Formatting
##########
- Files MUST use UTF-8 character set encoding without BOM.
- Files MUST use UNIX line endings (LF: `\n`).
- Files MUST end with a single empty line (i.e. LF: `\n`).
TODO: Add (links for?) instructions to configure popular IDEs and plain-text editors.
Structure
#########
- A single file SHOULD NOT declare more than one class.
- Files SHOULD either declare symbols (i.e. classes, functions, constants)
or execute non-declarative logic, but SHOULD NOT do both.
Naming
######
- File names MUST end with a ".php" name extension and MUST NOT have
multiple name extensions.
- A file that declares a class (Files declaring classes MUST have names
exactly matching the classes that they declare (obviously excluding
the ".php" name extension).
- Files declaring functions SHOULD be named in *snake_case.php*.
Whitespace, indentation and alignment
=====================================
- Indentation MUST use only tabs.
- Alignment MUST use only spaces.
TODO: Add examples for indentation vs. alignment.
- Unnecessary whitespace characters MUST NOT be present anywhere within a
script.
That includes trailing whitespace after a line of code, two or
more spaces used when only one is necessary (excluding alignment), as
well as any other whitespace usage that is not functionally required or
explicitly described in this document.
Code
====
PHP tags
########
- Opening tags MUST only use the `<?php` and `<?=` forms.
- Scripts producing output SHOULD use the "short echo" `<?=` tag.
- Scripts declaring and/or using conditional logic SHOULD use the "long"
`<?php` tag.
- Closing `?>` tags SHOULD NOT be used, unless the intention is to start
direct output.
- Scripts that don't produce output MUST NOT use the closing `?>` tag.
Namespaces and classes
######################
- Class names and namespaces SHOULD be declared in `UpperCamelCase`, unless
another form is *functionally* required.
- Abbreviations in namespaces, class names and method names SHOULD be
written in capital letters (e.g. PHP).
- Class constants MUST be declared in `CAPITALS_SEPARATED_BY_UNDERSCORES`.
- Class methods, property names and other variables MUST be declared in
`lowerCamelCase()`.
- Class methods and properties MUST have visibility declarations (i.e.
`public`, `private` or `protected`).
Procedural code
###############
- Function and variable names SHOULD be declared in `snake_case()` (all
lowercase letters, separated by underscores), unless another form is
*functionally* required.
- Constants MUST be declared in `CAPITALS_SEPARATED_BY_UNDERSCORES`.
Formatting
##########
Keywords
********
- All keywords MUST be written in lowercase letters. This includes "scalar"
types, but does NOT include core PHP classes such as `stdClass` or
`Exception`.
- Adjacent keywords are separated by a single space character.
- The keywords `require`, `require_once`, `include`, `include_once` MUST
be followed by a single space character and MUST NOT be followed by a
parenthesis anywhere within the declaration.
- The `function` keyword MUST be immediately followed by either an opening
parenthesis or a single space and a function name.
- Other keywords not explicitly mentioned in this section MUST be separated
by a single space character from any printable characters around them and
on the same line.
Operators
*********
- The single dot concatenation, incrementing, decrementing, error
suppression operators and references MUST NOT be separated from their
subjects.
- Other operators not explicitly mentioned in this section MUST be
separated by a single space character from any printable characters
around them and on the same line.
- An operator MUST NOT be the last set of printable characters on a line.
- An operator MAY be the first set of printable characters on a line.
Other
*****
- Argument separators (comma: `,`) MUST NOT be preceeded by a whitespace
character and MUST be followed by a space character or a newline
(LF: `\n`).
- Semi-colons (i.e. `;`) MUST NOT be preceeded by a whitespace character
and MUST be followed by a newline (LF: `\n`).
- Opening parentheses SHOULD NOT be followed by a space character.
- Closing parentheses SHOULD NOT be preceeded by a space character.
- Opening square brackets SHOULD NOT be followed by a space character,
unless when using the "short array" declaration syntax.
- Closing square backets SHOULD NOT be followed by a space character,
unless when using the "short array" declaration syntax.
- A curly brace SHOULD be the only printable character on a line, unless:
- When declaring an anonymous function.
- Inside a "variable variable" (i.e. `${$foo}` or `${'foo'.$bar}`).
- Around a variable in a double-quoted string (i.e. `"Foo {$bar}"`).

6
writeable/cache/.htaccess vendored Normal file
View File

@ -0,0 +1,6 @@
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>

11
writeable/cache/index.html vendored Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

11
writeable/logs/index.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>