[DEPRECATED]

Nathaniel van Diepen aa0ebc7b48 Fix image class 6 éve
App f8b4a3ec1f Handle path failures better. Throw errors when encryption fails. Filter out bad encryption methods. 7 éve
Data 121a07a638 Make EArrays serializable and json serializable. Allow getting variables based on other variables in templates 7 éve
Http 604fd8fb29 Fix headers overwriting each other 7 éve
Net b7d2a37e41 Better error reporting 7 éve
ORM 5b95f9b694 * Fix up base being set on apps 7 éve
PDO 11124dd5d8 Allow custom filters 7 éve
README.md 0651f03624 Add link to readme 7 éve
app.class.php 08072a61e3 Fix issue where duplicate routes with different methods will block each other 7 éve
base.abstract.class.php f1b18e933c * Use different style for formatting 7 éve
events.trait.php f1b18e933c * Use different style for formatting 7 éve
image.class.php aa0ebc7b48 Fix image class 6 éve
msgfmt.class.php 9cf1a6b552 Automatically generate *.mo files if they don't exist 7 éve
orm.abstract.class.php 4861154b06 Fix belongs_to relationship. Fix exist/existelse being too greedy 7 éve
pdo.class.php ba22363884 Force unhandled quote values to be strings 7 éve
settings.class.php f2ab50c20c * Make the following JsonSerializable 7 éve

README.md

Juju-PHP

Eeems' PHP Framework

Concepts

PDO

Juju-PHP wraps the normal PDO class to make it do some magical things, like give you a Table class that you can use to make dropping/creating/modifying/accessing tables easier.

You can also use PDO to write migrations and have your application automatically upgrade it's database when a new migration is in place.

ORM

Piggybacking on top of the PDO concept, Juju-PHP also has an ORM framework that makes working with database data much easier. You no longer have to deal with the underlying sql queries, now you just need to modify a php class instance, tell it to commit it's changes and the data will magically save back to the correct tables. A similar concept is also applied to the has-many relationships configured.

Http

Juju-PHP provides a better interface for dealing with getting at the request information as well as the response data. There is also a helper class for working with URIs.

Events

Juju-PHP has an events trait that can be added to any class you create so that you can throw events that multiple points of code need to listen on. Fairly straight forward.

Data

Need an array that has a little bit of event magic on it? EArray has you covered. You can now get notified when this array-like class is modified and do something with that information. Do you need a place to store a password in memory but you don't really trust that something might not inspect your php programs memory and steal the password? Use a SecureString. It will store the string in an encrypted format and only give you the actual string representation when you need it.

Templates

Juju-PHP has a fairly powerful template engine that compiles the template into php code on the fly to irk out just a little bit more performance.

MVC-App

Juju-PHP has a loose MVC style. You can choose to use it as a MVC framework, or to use it without all that magic.

Here is some of the magic it includes:

  • Routing of requests that does a lot of the heavy lifting for determining what code needs to run to render the result for a request.
  • Controllers that will allow you to logically group your routes.
  • Views that help you to render your templates with less work
  • Settings access. Store your config in a single, or multiple files and easily get at the values with Settings::get('setting.name')

Hello World

use \Juju\App;
new App('Hello World', function($app){
  $app->route('/hello', function($req, $res){
    $res->write("Hello World!");
  });
});

Full Framework Example

Hearts