Skip to content
Devin Smith edited this page Nov 29, 2015 · 37 revisions

Tipsy is an MVW (Model, View, Whatever) PHP framework inspired by AngularJS. It provides a very lightweight, easy to use framework, capable of handling most tasks.

Getting Started

1. Include Tipsy

See Installation for more information.

composer require arzynik/tipsy
2. Create a new instance of Tipsy
$tipsy = new Tipsy;
3. Add a route / page

Routes can be closures, classes, or class instances. Here we create a route using a closure, and assign the internal $Scope and $View properties.

$tipsy->router()
	->when('/', function($Scope, $View) {
		$Scope->user = 'Devin';
		$View->display('home');
	});
4. Create a View

All views are phtml. Create a file called home.phtml

<div class="content">
	<h1>Welcome <?=$user?>!</h1>
</div>
5. Start Tipsy

Once you have defined your stuff you can start the process like below.

$tipsy->start();