Skip to content

Commit 0d92381

Browse files
committed
Initial import.
0 parents  commit 0d92381

File tree

15 files changed

+394
-0
lines changed

15 files changed

+394
-0
lines changed

.gitattributes

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This file tells which files and directories should be ignored and
2+
# NOT downloaded when using composer to pull down a project with
3+
# the --prefer-dist option selected. Used to remove development
4+
# specific files so user has a clean download.
5+
6+
# git files
7+
.gitattributes export-ignore
8+
# .gitignore
9+
10+
# helper config files
11+
.travis.yml export-ignore
12+
phpdoc.dist.xml export-ignore
13+
14+
# Misc other files
15+
readme.rst
16+
17+
# They don't want all of our tests...
18+
tests/codeigniter/ export-ignore
19+
tests/travis/ export-ignore
20+
21+
# User Guide Source Files
22+
user_guide_src

.gitignore

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#-------------------------
2+
# Operating Specific Junk Files
3+
#-------------------------
4+
5+
# OS X
6+
.DS_Store
7+
.AppleDouble
8+
.LSOverride
9+
10+
# OS X Thumbnails
11+
._*
12+
13+
# Windows image file caches
14+
Thumbs.db
15+
ehthumbs.db
16+
Desktop.ini
17+
18+
# Recycle Bin used on file shares
19+
$RECYCLE.BIN/
20+
21+
# Windows Installer files
22+
*.cab
23+
*.msi
24+
*.msm
25+
*.msp
26+
27+
# Windows shortcuts
28+
*.lnk
29+
30+
# Linux
31+
*~
32+
33+
# KDE directory preferences
34+
.directory
35+
36+
# Linux trash folder which might appear on any partition or disk
37+
.Trash-*
38+
39+
#-------------------------
40+
# Temporary Files
41+
#-------------------------
42+
writeable/cache/*
43+
!writeable/cache/index.html
44+
!writeable/cache/.htaccess
45+
46+
writeable/logs/*
47+
!writeable/logs/index.html
48+
!writeable/logs/.htaccess
49+
50+
writeable/uploads/*
51+
!writeable/uploads/index.html
52+
!writeable/uploads/.htaccess
53+
54+
#-------------------------
55+
# User Guide Temp Files
56+
#-------------------------
57+
user_guide_src/build/*
58+
user_guide_src/cilexer/build/*
59+
user_guide_src/cilexer/dist/*
60+
user_guide_src/cilexer/pycilexer.egg-info/*
61+
62+
#-------------------------
63+
# Composer
64+
#-------------------------
65+
vendor/
66+
67+
#-------------------------
68+
# IDE Files
69+
#-------------------------
70+
71+
# Jetbrains editors (PHPStorm, etc)
72+
.idea/
73+
*.iml
74+
75+
# Netbeans
76+
nbproject/private/
77+
build/
78+
nbbuild/
79+
dist/
80+
nbdist/
81+
nbactions.xml
82+
nb-configuration.xml
83+
.nb-gradle/
84+
85+
## Sublime Text
86+
*.tmlanguage.cache
87+
*.tmPreferences.cache
88+
*.stTheme.cache
89+
*.sublime-workspace
90+
*.sublime-project

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# CodeIgniter 4 Development
2+
This repo contains work that may or may not make it into the official version of CodeIgniter.
3+
4+
More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums.
5+
6+
## Contributing
7+
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.
8+
9+
## Server Requirements
10+
PHP version 7 is required.
11+
12+
You can obtain a working Vagrant box from Rasmus Lerdorf [here](https://github.com/rlerdorf/php7dev).

application/.htaccess

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<IfModule authz_core_module>
2+
Require all denied
3+
</IfModule>
4+
<IfModule !authz_core_module>
5+
Deny from all
6+
</IfModule>

application/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>403 Forbidden</title>
5+
</head>
6+
<body>
7+
8+
<p>Directory access is forbidden.</p>
9+
10+
</body>
11+
</html>

composer.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"description": "The CodeIgniter framework v4",
3+
"name": "codeigniter/framework",
4+
"type": "project",
5+
"homepage": "http://codeigniter.com",
6+
"support": {
7+
"forum": "http://forum.codeigniter.com/",
8+
"wiki": "https://github.com/bcit-ci/CodeIgniter/wiki",
9+
"irc": "irc://irc.freenode.net/codeigniter",
10+
"source": "https://github.com/bcit-ci/CodeIgniter"
11+
},
12+
"require": {
13+
"php": ">=7.0"
14+
}
15+
}

index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>Welcome To CodeIgniter 4</h1>

phpdoc.dist.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<phpdoc>
3+
<title>CodeIgniter v3.0.0 API</title>
4+
<parser>
5+
<target>./api/</target>
6+
</parser>
7+
<transformer>
8+
<target>./api/</target>
9+
</transformer>
10+
<files>
11+
<directory>./system</directory>
12+
</files>
13+
14+
<logging>
15+
<level>warn</level>
16+
<paths>
17+
<default>./api/log/{DATE}.log</default>
18+
<errors>./api/{DATE}.errors.log</errors>
19+
</paths>
20+
</logging>
21+
</phpdoc>

system/.htaccess

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<IfModule authz_core_module>
2+
Require all denied
3+
</IfModule>
4+
<IfModule !authz_core_module>
5+
Deny from all
6+
</IfModule>

system/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>403 Forbidden</title>
5+
</head>
6+
<body>
7+
8+
<p>Directory access is forbidden.</p>
9+
10+
</body>
11+
</html>
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
PHP Coding style guide
2+
----------------------
3+
4+
The following document declares a set of coding convention rules to be
5+
followed when contributing PHP code to the CodeIgniter project.
6+
7+
Some of these rules, like naming conventions for example, *may* be
8+
incorporated into the framework's logic and therefore be functionally
9+
enforced (which would be separately documented), but while we would
10+
recommend it, there's no requirement that you follow these conventions in
11+
your own applications.
12+
13+
TODO: Add acknowledgement notice in the footer, referencing popular
14+
coding style conventions that we've derived content from.
15+
16+
*The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
17+
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to
18+
be interpreted as described in [RFC 2119](http://www.ietf.org/rfc/rfc2119.txt).*
19+
20+
*Note: When used below, the term "class" refers to all kinds of classes,
21+
interfaces and traits.*
22+
23+
Files
24+
=====
25+
26+
Formatting
27+
##########
28+
29+
- Files MUST use UTF-8 character set encoding without BOM.
30+
- Files MUST use UNIX line endings (LF: `\n`).
31+
- Files MUST end with a single empty line (i.e. LF: `\n`).
32+
33+
TODO: Add (links for?) instructions to configure popular IDEs and plain-text editors.
34+
35+
Structure
36+
#########
37+
38+
- A single file SHOULD NOT declare more than one class.
39+
- Files SHOULD either declare symbols (i.e. classes, functions, constants)
40+
or execute non-declarative logic, but SHOULD NOT do both.
41+
42+
Naming
43+
######
44+
45+
- File names MUST end with a ".php" name extension and MUST NOT have
46+
multiple name extensions.
47+
- A file that declares a class (Files declaring classes MUST have names
48+
exactly matching the classes that they declare (obviously excluding
49+
the ".php" name extension).
50+
- Files declaring functions SHOULD be named in *snake_case.php*.
51+
52+
Whitespace, indentation and alignment
53+
=====================================
54+
55+
- Indentation MUST use only tabs.
56+
- Alignment MUST use only spaces.
57+
58+
TODO: Add examples for indentation vs. alignment.
59+
60+
- Unnecessary whitespace characters MUST NOT be present anywhere within a
61+
script.
62+
63+
That includes trailing whitespace after a line of code, two or
64+
more spaces used when only one is necessary (excluding alignment), as
65+
well as any other whitespace usage that is not functionally required or
66+
explicitly described in this document.
67+
68+
Code
69+
====
70+
71+
PHP tags
72+
########
73+
74+
- Opening tags MUST only use the `<?php` and `<?=` forms.
75+
76+
- Scripts producing output SHOULD use the "short echo" `<?=` tag.
77+
- Scripts declaring and/or using conditional logic SHOULD use the "long"
78+
`<?php` tag.
79+
80+
- Closing `?>` tags SHOULD NOT be used, unless the intention is to start
81+
direct output.
82+
83+
- Scripts that don't produce output MUST NOT use the closing `?>` tag.
84+
85+
Namespaces and classes
86+
######################
87+
88+
- Class names and namespaces SHOULD be declared in `UpperCamelCase`, unless
89+
another form is *functionally* required.
90+
91+
- Abbreviations in namespaces, class names and method names SHOULD be
92+
written in capital letters (e.g. PHP).
93+
94+
- Class constants MUST be declared in `CAPITALS_SEPARATED_BY_UNDERSCORES`.
95+
- Class methods, property names and other variables MUST be declared in
96+
`lowerCamelCase()`.
97+
- Class methods and properties MUST have visibility declarations (i.e.
98+
`public`, `private` or `protected`).
99+
100+
Procedural code
101+
###############
102+
103+
- Function and variable names SHOULD be declared in `snake_case()` (all
104+
lowercase letters, separated by underscores), unless another form is
105+
*functionally* required.
106+
- Constants MUST be declared in `CAPITALS_SEPARATED_BY_UNDERSCORES`.
107+
108+
Formatting
109+
##########
110+
111+
Keywords
112+
********
113+
114+
- All keywords MUST be written in lowercase letters. This includes "scalar"
115+
types, but does NOT include core PHP classes such as `stdClass` or
116+
`Exception`.
117+
- Adjacent keywords are separated by a single space character.
118+
- The keywords `require`, `require_once`, `include`, `include_once` MUST
119+
be followed by a single space character and MUST NOT be followed by a
120+
parenthesis anywhere within the declaration.
121+
- The `function` keyword MUST be immediately followed by either an opening
122+
parenthesis or a single space and a function name.
123+
- Other keywords not explicitly mentioned in this section MUST be separated
124+
by a single space character from any printable characters around them and
125+
on the same line.
126+
127+
Operators
128+
*********
129+
130+
- The single dot concatenation, incrementing, decrementing, error
131+
suppression operators and references MUST NOT be separated from their
132+
subjects.
133+
- Other operators not explicitly mentioned in this section MUST be
134+
separated by a single space character from any printable characters
135+
around them and on the same line.
136+
- An operator MUST NOT be the last set of printable characters on a line.
137+
- An operator MAY be the first set of printable characters on a line.
138+
139+
Other
140+
*****
141+
142+
- Argument separators (comma: `,`) MUST NOT be preceeded by a whitespace
143+
character and MUST be followed by a space character or a newline
144+
(LF: `\n`).
145+
- Semi-colons (i.e. `;`) MUST NOT be preceeded by a whitespace character
146+
and MUST be followed by a newline (LF: `\n`).
147+
148+
- Opening parentheses SHOULD NOT be followed by a space character.
149+
- Closing parentheses SHOULD NOT be preceeded by a space character.
150+
151+
- Opening square brackets SHOULD NOT be followed by a space character,
152+
unless when using the "short array" declaration syntax.
153+
- Closing square backets SHOULD NOT be followed by a space character,
154+
unless when using the "short array" declaration syntax.
155+
156+
- A curly brace SHOULD be the only printable character on a line, unless:
157+
158+
- When declaring an anonymous function.
159+
- Inside a "variable variable" (i.e. `${$foo}` or `${'foo'.$bar}`).
160+
- Around a variable in a double-quoted string (i.e. `"Foo {$bar}"`).

writeable/cache/.htaccess

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<IfModule authz_core_module>
2+
Require all denied
3+
</IfModule>
4+
<IfModule !authz_core_module>
5+
Deny from all
6+
</IfModule>

writeable/cache/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>403 Forbidden</title>
5+
</head>
6+
<body>
7+
8+
<p>Directory access is forbidden.</p>
9+
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)