Skip to content

Commit 0261e0a

Browse files
committed
Publish framework
0 parents  commit 0261e0a

34 files changed

+1995
-0
lines changed

.htaccess

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
#-------------------------------------------------
2+
#**
3+
# Enable rewrite engine
4+
#**
5+
RewriteEngine On
6+
#-------------------------------------------------
7+
8+
#-------------------------------------------------
9+
#**
10+
# Public folder
11+
#**
12+
RewriteRule ^public/ - [L]
13+
#-------------------------------------------------
14+
15+
#-------------------------------------------------
16+
#**
17+
# Run index.php
18+
#**
19+
RewriteCond %{REQUEST_FILENAME} -f [OR]
20+
RewriteCond %{REQUEST_FILENAME} !-f [OR]
21+
RewriteRule ^(.*)$ index.php [L,QSA]
22+
23+
RewriteRule !index\.php$ index.php [L]
24+
#-------------------------------------------------
25+
26+
#-------------------------------------------------
27+
#**
28+
# Indexes false
29+
#**
30+
Options -Indexes
31+
#-------------------------------------------------
32+
33+
#-------------------------------------------------
34+
#**
35+
# Hiding Your .htaccess file
36+
#**
37+
<Files .htaccess>
38+
order allow,deny
39+
deny from all
40+
</Files>
41+
#-------------------------------------------------
42+
43+
#-------------------------------------------------
44+
#**
45+
# Error
46+
#**
47+
ErrorDocument 403 /%{REQUEST_URI}
48+
#-------------------------------------------------
49+
50+
#-------------------------------------------------
51+
#**
52+
# Caching
53+
#**
54+
<IfModule mod_expires.c>
55+
ExpiresActive on
56+
ExpiresDefault "access plus 1 month"
57+
# CSS
58+
ExpiresByType text/css "access plus 1 year"
59+
# Data interchange
60+
ExpiresByType application/json "access plus 0 seconds"
61+
ExpiresByType application/xml "access plus 0 seconds"
62+
ExpiresByType text/xml "access plus 0 seconds"
63+
# Favicon (cannot be renamed!)
64+
ExpiresByType image/x-icon "access plus 1 week"
65+
# HTML components (HTCs)
66+
ExpiresByType text/x-component "access plus 1 month"
67+
# HTML
68+
ExpiresByType text/html "access plus 0 seconds"
69+
# JavaScript
70+
ExpiresByType application/javascript "access plus 1 year"
71+
# Manifest files
72+
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
73+
ExpiresByType text/cache-manifest "access plus 0 seconds"
74+
# Media
75+
ExpiresByType audio/ogg "access plus 1 month"
76+
ExpiresByType image/gif "access plus 1 month"
77+
ExpiresByType image/jpeg "access plus 1 month"
78+
ExpiresByType image/png "access plus 1 month"
79+
ExpiresByType video/mp4 "access plus 1 month"
80+
ExpiresByType video/ogg "access plus 1 month"
81+
ExpiresByType video/webm "access plus 1 month"
82+
# Web feeds
83+
ExpiresByType application/atom+xml "access plus 1 hour"
84+
ExpiresByType application/rss+xml "access plus 1 hour"
85+
# Web fonts
86+
ExpiresByType application/font-woff2 "access plus 1 month"
87+
ExpiresByType application/font-woff "access plus 1 month"
88+
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
89+
ExpiresByType application/x-font-ttf "access plus 1 month"
90+
ExpiresByType font/opentype "access plus 1 month"
91+
ExpiresByType image/svg+xml "access plus 1 month"
92+
</IfModule>
93+
#-------------------------------------------------
94+
95+
#-------------------------------------------------
96+
#**
97+
# Compress HTML, CSS, JavaScript, Text, XML and fonts
98+
#**
99+
<IfModule mod_deflate.c>
100+
AddOutputFilterByType DEFLATE application/javascript
101+
AddOutputFilterByType DEFLATE application/rss+xml
102+
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
103+
AddOutputFilterByType DEFLATE application/x-font
104+
AddOutputFilterByType DEFLATE application/x-font-opentype
105+
AddOutputFilterByType DEFLATE application/x-font-otf
106+
AddOutputFilterByType DEFLATE application/x-font-truetype
107+
AddOutputFilterByType DEFLATE application/x-font-ttf
108+
AddOutputFilterByType DEFLATE application/x-javascript
109+
AddOutputFilterByType DEFLATE application/xhtml+xml
110+
AddOutputFilterByType DEFLATE application/xml
111+
AddOutputFilterByType DEFLATE font/opentype
112+
AddOutputFilterByType DEFLATE font/otf
113+
AddOutputFilterByType DEFLATE font/ttf
114+
AddOutputFilterByType DEFLATE image/svg+xml
115+
AddOutputFilterByType DEFLATE image/x-icon
116+
AddOutputFilterByType DEFLATE text/css
117+
AddOutputFilterByType DEFLATE text/html
118+
AddOutputFilterByType DEFLATE text/javascript
119+
AddOutputFilterByType DEFLATE text/plain
120+
AddOutputFilterByType DEFLATE text/xml
121+
122+
# Remove browser bugs (only needed for really old browsers)
123+
BrowserMatch ^Mozilla/4 gzip-only-text/html
124+
BrowserMatch ^Mozilla/4\.0[678] no-gzip
125+
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
126+
Header append Vary User-Agent
127+
</IfModule>
128+
#-------------------------------------------------
129+
130+
#-------------------------------------------------
131+
#**
132+
# MIME types on Your Server
133+
#**
134+
AddType application/macbinhex-40 hqx
135+
AddType application/netalive net
136+
AddType application/netalivelink nel
137+
AddType application/octet-stream bin exe
138+
AddType application/oda oda
139+
AddType application/pdf pdf
140+
AddType application/postscript ai eps ps
141+
AddType application/rtf rtf
142+
AddType application/x-bcpio bcpio
143+
AddType application/x-cpio cpio
144+
AddType application/x-csh csh
145+
AddType application/x-director dcr
146+
AddType application/x-director dir
147+
AddType application/x-director dxr
148+
AddType application/x-dvi dvi
149+
AddType application/x-gtar gtar
150+
AddType application/x-hdf hdf
151+
AddType application/x-httpd-cgi cgi
152+
AddType application/x-latex latex
153+
AddType application/x-mif mif
154+
AddType application/x-netcdf nc cdf
155+
AddType application/x-onlive sds
156+
AddType application/x-sh sh
157+
AddType application/x-shar shar
158+
AddType application/x-sv4cpio sv4cpio
159+
AddType application/x-sv4crc sv4crc
160+
AddType application/x-tar tar
161+
AddType application/x-tcl tcl
162+
AddType application/x-tex tex
163+
AddType application/x-texinfo texinfo texi
164+
AddType application/x-troff t tr roff
165+
AddType application/x-troff-man man
166+
AddType application/x-troff-me me
167+
AddType application/x-troff-ms ms
168+
AddType application/x-ustar ustar
169+
AddType application/x-wais-source src
170+
AddType application/zip zip
171+
AddType audio/basic au snd
172+
AddType audio/x-aiff aif aiff aifc
173+
AddType audio/x-midi mid
174+
AddType audio/x-pn-realaudio ram
175+
AddType audio/x-wav wav
176+
AddType image/gif gif GIF
177+
AddType image/ief ief
178+
AddType image/jpeg jpeg jpg jpe JPG
179+
AddType image/tiff tiff tif
180+
AddType image/x-cmu-raster ras
181+
AddType image/x-portable-anymap pnm
182+
AddType image/x-portable-bitmap pbm
183+
AddType image/x-portable-graymap pgm
184+
AddType image/x-portable-pixmap ppm
185+
AddType image/x-rgb rgb
186+
AddType image/x-xbitmap xbm
187+
AddType image/x-xpixmap xpm
188+
AddType image/x-xwindowdump xwd
189+
AddType text/html html htm
190+
AddType text/plain txt
191+
AddType text/richtext rtx
192+
AddType text/tab-separated-values tsv
193+
AddType text/x-server-parsed-html shtml sht
194+
AddType text/x-setext etx
195+
AddType video/mpeg mpeg mpg mpe
196+
AddType video/quicktime qt mov
197+
AddType video/x-msvideo avi
198+
AddType video/x-sgi-movie movie
199+
AddType x-world/x-vrml wrl
200+
#-------------------------------------------------

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Kiaan
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## About Kiaan framework
2+
3+
Kiaan is a web application framework for PHP.
4+
5+
Kiaan is easy, flexible and professional.
6+
7+
## Documentation
8+
You can learn kiaan with the [documentation](https://kiaanphp.gitbook.io/kiaan-php-framwork).
9+
10+
## Security Vulnerabilities
11+
12+
If you discover a security vulnerability within Kiaan, please send an e-mail to Hassan Kerdash via [[email protected]](mailto:[email protected]).
13+
14+
## License
15+
16+
The Kiaan framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

application/cli/Hello_World.php

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?php
2+
3+
/*
4+
|---------------------------------------------------
5+
| Namespace
6+
|---------------------------------------------------
7+
*/
8+
namespace App\Application\Cli;
9+
10+
/*
11+
|---------------------------------------------------
12+
| Uses
13+
|---------------------------------------------------
14+
*/
15+
use Kiaan\Dev\Cli\Build\CliBuild;
16+
use Kiaan\Cli;
17+
18+
/*
19+
|---------------------------------------------------
20+
| Class
21+
|---------------------------------------------------
22+
*/
23+
class Hello_world implements CliBuild {
24+
25+
/**
26+
* Handle
27+
*
28+
**/
29+
public function handle()
30+
{
31+
return [
32+
"menu" => "menu_handle",
33+
"test" => "test"
34+
];
35+
}
36+
37+
/**
38+
* Menu handle
39+
*
40+
**/
41+
public function menu_handle()
42+
{
43+
Cli::menu(["test : test action"]);
44+
}
45+
46+
/**
47+
* Test action
48+
*
49+
**/
50+
public function test()
51+
{
52+
return "Hello_World";
53+
}
54+
55+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/*
4+
|---------------------------------------------------
5+
| Namespace
6+
|---------------------------------------------------
7+
*/
8+
namespace App\Application\Controllers;
9+
10+
/*
11+
|---------------------------------------------------
12+
| Uses
13+
|---------------------------------------------------
14+
*/
15+
use Kiaan\Dev\Controller\Build\ControllerBuild;
16+
17+
/*
18+
|---------------------------------------------------
19+
| Controller
20+
|---------------------------------------------------
21+
*/
22+
class WelcomeController implements ControllerBuild {
23+
24+
public function index() {
25+
page("welcome");
26+
}
27+
28+
}

application/events/WelcomeEvent.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
/*
4+
|---------------------------------------------------
5+
| Namespace
6+
|---------------------------------------------------
7+
*/
8+
namespace App\Application\Events;
9+
10+
/*
11+
|---------------------------------------------------
12+
| Uses
13+
|---------------------------------------------------
14+
*/
15+
use Kiaan\Dev\Event\Build\EventBuild;
16+
17+
/*
18+
|---------------------------------------------------
19+
| Event
20+
|---------------------------------------------------
21+
*/
22+
class WelcomeEvent implements EventBuild {
23+
24+
/*
25+
* index
26+
*/
27+
public function index() {
28+
echo "Welcome";
29+
}
30+
31+
}

application/helpers/helper.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
/*
4+
|---------------------------------------------------
5+
| Helpers
6+
|---------------------------------------------------
7+
*/
8+
9+
#--------------------------------------------------
10+
/**
11+
* Hello World
12+
*
13+
*/
14+
if (!function_exists('Hello_World')) {
15+
function Hello_World() {
16+
return 'Hello World';
17+
}
18+
}
19+
#--------------------------------------------------

application/helpers/helpers.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
/*
4+
|---------------------------------------------------
5+
| Helpers
6+
|---------------------------------------------------
7+
*/
8+
9+
#--------------------------------------------------
10+
/**
11+
* Include
12+
*
13+
*/
14+
include __DIR__.DIRECTORY_SEPARATOR.'helper.php';
15+
#--------------------------------------------------

0 commit comments

Comments
 (0)