https://github.com/ccampbell/sonic
fast, lightweight PHP 5.3 MVC framework
https://github.com/ccampbell/sonic
Last synced: 3 months ago
JSON representation
fast, lightweight PHP 5.3 MVC framework
- Host: GitHub
- URL: https://github.com/ccampbell/sonic
- Owner: ccampbell
- License: apache-2.0
- Created: 2010-09-29T03:06:54.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2012-03-20T02:25:35.000Z (almost 14 years ago)
- Last Synced: 2025-09-13T06:48:44.784Z (4 months ago)
- Language: PHP
- Homepage: http://www.sonicframework.com
- Size: 696 KB
- Stars: 63
- Watchers: 6
- Forks: 11
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About
Sonic Framework is a blazing fast PHP 5 MVC framework.
### Version
1.1 beta
### System Requirements
PHP 5.3+
### Recommended Server Requirements
MySQL 5, Memcached
### Recommended PHP Extensions
Memcache, APC, PDO
### Simple Installation
```sh
wget http://sonicframework.com/sonic.tar.gz
mkdir sonic && tar xzvf sonic.tar.gz -C sonic && cd sonic
./install /path/to/install/to AppName
```
Follow instructions in ``/path/to/install/to/SETUP`` file
### Advanced Installation
1. Download latest source from: [http://www.sonicframework.com/sonic.tar.gz]
2. Create a directory somewhere where you want the application to live
3. Within that directory add the sonic library from step 1 and some other
directories and files that the app will need.
You want your application structure to look like this:
```
[] = directory
• = file
[] application_name
[] configs
• app.ini
• routes.php
[] controllers
• main.php
[] libs
[] Sonic (downloaded in step 1)
[] MyApp
[] public_html
• .htaccess
[] assets
[] css
[] img
[] js
• index.php
[] views
[] main
• index.phtml
• error.phtml
```
4. In ``/public_html/.htaccess`` add the following:
```apache
SetEnv ENVIRONMENT development
RewriteEngine On
RewriteRule ^.htaccess$ - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule \.*$ /index.php
```
5. In ``/public_html/index.php`` add the following:
```php
setBasePath($base_path);
// if you would like to use an app delegate uncomment this line
// $app->setDelegate('{MyApp}\App\Delegate');
$app->start();
```
6. Setup an apache vhost to point to your /public_html directory with
DirectoryIndex set to index.php and add the server name to your /etc/hosts.
7. That's all there is to it, but your app won't work until you add some
controllers and views. For more tutorials visit:
http://www.sonicframework.com/tutorials