What is Osynapsy?
Osynapsy is a MVC php framework.
##Installation It's recommended that you use Composer to install Osynapsy.
$ composer require osynapsy.org/osynapsy "^0.2.0"
This install osynapsy and all required dependencies. Osynapsy require PHP 5.5.0 or newer.
Usage
The webroot directory and index file
Create and enter in webroot directory:
mkdir webroot
cd webroot
Create an index.php file with the following contents:
<?php
require '../vendor/autoload.php';
$kernel = new Osynapsy\Core\Kernel('../etc/site.xml');
echo $kernel->run();
The etc directory and instance configuration file
Create and enter into etc directory:
mkdir etc
cd etc
Create an instance.xml config file with the following contents:
<?xml version='1.0' standalone='yes'?>
<configuration>
<app>
<Test_App>
<datasources>
<db id="dba">mysql:127.0.0.1:osytest:testuser:testpassword</db>
</datasources>
<parameters>
<parameter name="siteName" value="Test app" />
<parameter name="uploadRoot" value="/upload/" />
</parameters>
</Test_App>
</app>
</configuration>
The configuration file parts are:
- configuration tag and app subtag.
- your own app tag (Test_App in example)
- datasources section in your app tag tell osynapsy db connection to create
- parameters section in your app tag define instance parameters for your app