-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
408 lines (343 loc) · 15.4 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
<?php
if ($_SERVER['SERVER_NAME'] == 'ouzoframework.org') {
$production = true;
} else {
$production = false;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ouzo PHP Framework - MVC - ORM</title>
<meta name="description"
content="PHP MVC Framework with built-in ORM. Ouzo is the PHP framework, which makes writing web applications FUN again.">
<meta name="keywords" content="php unit testing tests orm mvc framework">
<meta name="author" content="Ouzo">
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="stylesheet" type="text/css" href="css/font-family.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div id="overlay"></div>
<nav class="navbar" role="navigation">
<a href="https://github.com/letsdrink/ouzo">
<img style="position: absolute; top: 0; right: 0; border: 0;"
src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png">
</a>
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="fa fa-bars"></span>
</button>
<a class="navbar-brand" href="#">Ouzo Framework</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav">
<li>
<a href="#why-use">WHY USE</a>
</li>
<li>
<a href="#what-you-need">NEEDED</a>
</li>
<li>
<a href="#start">QUICK START</a>
</li>
<li class="home">
<a href="#">
<img src="img/logo.png" alt="Home">
</a>
</li>
<li>
<a href="http://ouzo.readthedocs.org">DOCS</a>
</li>
<li>
<a href="http://blog.ouzoframework.org/">BLOG</a>
</li>
<li>
<a href="https://packagist.org/packages/letsdrink/ouzo">DOWNLOAD</a>
</li>
</ul>
</div>
</nav>
<section id="home">
<div class="container">
<div class="row text-center">
<div class="col-sm-12">
<div class="visible-xs">
<img src="img/logo.png" class="logo" alt="Home">
</div>
</div>
<div class="col-sm-12">
<p class="text-extra-large">
We value unit testing and beautiful design.
<br class="uk-hidden-small">
We believe in clean code and simplicity.
</p>
</div>
</div>
</div>
</section>
<section id="why-use">
<div class="why-use-overlay">
<div class="container">
<div class="row text-center">
<div class="col-sm-12">
<h1 class="heading-large section-color-1">Why use Ouzo Framework</h1>
</div>
<div class="col-sm-12">
<p class="text-large section-color-1">
Ouzo is the PHP framework, which makes writing web applications FUN again.<br>
It is an MVC framework with built-in ORM.
</p>
</div>
</div>
<div class="row text-center big-links">
<a href="http://ouzo.readthedocs.org/en/latest/tutorials/project_structure_explained.html"
class="col-sm-6 col-lg-3 why-use-item">
<div>
<i class="fa fa-gears"></i>
</div>
<div>
<h3 class="section-color-1">MVC</h3>
<p class="section-color-1">
Build coherent apps with Ouzo's Models, Views and Controllers. Multi-language
support included.
</p>
</div>
</a>
<a href="http://ouzo.readthedocs.org/en/latest/documentation/orm.html" class="col-sm-6 col-lg-3 why-use-item">
<div>
<i class="fa fa-sitemap"></i>
</div>
<div>
<h3 class="section-color-1">ORM</h3>
<p class="section-color-1">
No more awkward sql. Get everything you need with a simple and elegant query builder.
</p>
<pre style="width: 81%;">User::where(['login' => 'ouzo'])->fetch();</pre>
</div>
</a>
<a href="http://ouzo.readthedocs.org/en/latest/documentation/routes.html" class="col-sm-6 col-lg-3 why-use-item">
<div>
<i class="fa fa-random"></i>
</div>
<div>
<h3 class="section-color-1">REST</h3>
<p class="section-color-1">
Simply map all REST actions for your resource.<br/><br/>
</p>
<pre style="width: 82%;">Route::resource('users');</pre>
</div>
</a>
<a href="http://ouzo.readthedocs.org/en/latest/documentation/tests.html" class="col-sm-6 col-lg-3 why-use-item">
<div>
<i class="fa fa-stethoscope"></i>
</div>
<div>
<h3 class="section-color-1">Tests</h3>
<p class="section-color-1">
Fluent assertions, mocking, build-in support for testing controllers and models.<br/><br/>
</p>
<pre style="width: 82%;">Assert::thatArray($array)->contains('ouzo');</pre>
</div>
</a>
</div>
</div>
</div>
</section>
<section id="what-you-need">
<div class="container">
<div class="row text-center">
<div class="col-sm-12">
<h1 class="heading-large section-color-2">WHAT YOU NEED</h1>
</div>
<div class="col-sm-12">
<p class="text-large">
PHP 5.6+ and Apache
</p>
</div>
</div>
<div class="row text-center">
<div class="col-sm-6 col-lg-3 why-use-item">
<h3>PHP 5.6+</h3>
<p>Ouzo supports PHP version 5.6 or later. Builds are running continuously on 5.6, 7.0 and 7.1
Check out our <a href="https://travis-ci.org/letsdrink/ouzo">travis site</a>.</p>
</div>
<div class="col-sm-6 col-lg-3 why-use-item">
<h3>HTTP Server</h3>
<p>Apache is supported out-of-box, but you need mod_rewrite enabled.
It should be fairly easy to run your app under different web server. If you happen to do so, let us
know!</p>
</div>
<div class="col-sm-6 col-lg-3 why-use-item">
<h3>Database (optional)</h3>
<p>Ouzo is database agnostic. Currently it supports PostgreSQL, MySQL / MariaDB and SQLite.
With its flexible dialect system we are able to add support to other databases as well.</p>
</div>
<div class="col-sm-6 col-lg-3 why-use-item">
<h3>License</h3>
<p><a href="http://opensource.org/licenses/mit-license.php">MIT</a>.
Use Ouzo wherever you need, fork us, basically do whatever you want :) Full source code
is available on <a href="https://github.com/letsdrink/ouzo">Github</a>.</p>
</div>
</div>
<div class="col-sm-12">
<div class="row text-center">
<a href="https://github.com/letsdrink/ouzo-app#ouzo---5-minutes-tutorial" target="_blank" class="btn btn-2">5 minutes tutorial</a>
<div style="width:80px;height: 10px;display:inline-block"></div>
<a href="https://github.com/letsdrink/ouzo" target="_blank" class="btn btn-2">Source code @ Github</a>
<div style="width:80px;height: 10px;display:inline-block"></div>
<a href="https://travis-ci.org/letsdrink/ouzo" target="_blank" class="btn btn-2">Continuous integration</a>
</div>
</div>
<div class="col-sm-12" style="margin-top: 70px;">
<div class="row text-center">
<h3>- Commercial break - Ouzo is sponsored by -</h3>
</div>
<div class="row text-center">
<a href="http://thulium.eu"><img src="img/thulium.png" style="margin-top: 20px;"/></a>
</div>
</div>
</div>
</section>
<section id="start">
<div class="start-overlay">
<div class="container">
<div class="row text-center">
<div class="col-sm-12">
<h1 class="heading-large section-color-1">QUICK START</h1>
</div>
<div class="col-sm-12">
<p class="text-large section-color-1">
It takes only 4 steps to set up sample project and start experiencing Ouzo.<br>
</p>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<p class="section-color-1">
<h2>1. Set up project</h2>
<p>We recommend using composer (<a href="http://getcomposer.org">http://getcomposer.org</a>):</p>
<pre>composer.phar create-project letsdrink/ouzo-app:1.6.0 myproject</pre>
<p><br/>Change <code>myproject</code> to your project's name.</p>
</div>
</div>
<br/>
<br/>
<div class="row">
<div class="col-sm-12">
<p class="section-color-1">
<h2>2. Database Configuration</h2>
<p>After download is completed you will be asked to select a database for your project:</p>
<div style="text-align: center;">
<img src="img/composer.png" style="border: 6px solid black; border-radius: 6px;"
alt="Composer - screen"/>
</div>
<p><br/>Config files (<code>config/prod/config.php</code> and <code>config/test/config.php</code>)
will be created. You can
change your database configuration at any time.</p>
<p>Next step is to create your database and user and update config files accordingly.</p>
</div>
</div>
<br/>
<br/>
<div class="row">
<div class="col-sm-12">
<p class="section-color-1">
<h2>3. Migrations</h2>
<p>Your database is empty at the beginning. To demonstrate Ouzo capabilities we have created a
sample database.
Use <code>db.sh</code> (or <code>db.bat</code> under Windows) to apply migrations:</p>
<div style="text-align: center;">
<img src="img/migration.png" style="border: 6px solid black; border-radius: 6px;"
alt="Ruckusing migration - screen"/>
</div>
<p>
<br/>Ouzo uses Ruckusing framework for migrations (
<a href="https://github.com/ruckus/ruckusing-migrations">ruckusing-migrations</a>).
</p>
</div>
</div>
<br/>
<br/>
<div class="row">
<div class="col-sm-12">
<p class="section-color-1">
<h2>4. Web server</h2>
<p>All you need is Apache HTTP Server with mod_rewrite enabled.
Change <code>DocumentRoot</code> to your Ouzo project (e.g. <code>myproject</code>).</p>
<p>Open browser e.g. <code>http://localhost/myproject</code> and enjoy!</p>
</div>
</div>
<br/>
<br/>
<div class="row text-center">
<div class="col-sm-12">
<h2>For more information <b>check out:</b></h2>
<a href="https://github.com/letsdrink/ouzo-app" class="btn btn-2">
5 minutes tutorial
</a>
<div style="width:80px;height: 10px;display:inline-block"></div>
<a href="http://ouzo.readthedocs.org/en/latest/tutorials/project_structure_explained.html" class="btn btn-2">
Skeleton app explained
</a>
<div style="width:80px;height: 10px;display:inline-block"></div>
<a href="http://ouzo.readthedocs.org/en/latest/index.html" class="btn btn-2">
Ouzo documentation
</a>
</div>
</div>
</div>
</div>
</section>
<footer>
<div class="container text-center">
<div class="row">
<div class="col-sm-12">
<ul class="subnav list-inline">
<li><a href="#why-use">WHY USE</a></li>
<li><a href="#what-you-need">WHAT YOU NEED</a></li>
<li><a href="#start">QUICK START</a></li>
<li><a href="https://github.com/letsdrink/ouzo">DOWNLOAD</a></li>
</ul>
</div>
<div class="col-sm-12">
<p>
made by <a href="https://github.com/letsdrink/ouzo">Ouzo developers</a><br>
</p>
</div>
</div>
</div>
</footer>
<?php if ($production): ?>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<?php else: ?>
<script src="js/jquery.js"></script>
<?php endif; ?>
<script src="js/bootstrap.js"></script>
<?php if ($production): ?>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-48479903-1', 'ouzoframework.org');
ga('send', 'pageview');
</script>
<?php endif; ?>
</body>
</html>