-
Notifications
You must be signed in to change notification settings - Fork 10
Home
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.
See Installation for more information.
composer require arzynik/tipsy
$tipsy = new Tipsy;
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');
});
All views are phtml. Create a file called home.phtml
<div class="content">
<h1>Welcome <?=$user?>!</h1>
</div>
Once you have defined your stuff you can start the process like below.
$tipsy->start();
- Home
- Getting Started
- Server Config
- Installation
- Installing Composer
- App
- Route Shorthand
- Config
- Routes
- Methods
- Controller Types
- Params & Regex
- Aliases
- Dependency Injection
- Advanced Routing
- Services
- User Defined Services
- Built in Services
- Middleware
- Views
- Templates
- Scope
- Resource
- Factory
- Looper
- Examples
- Plugins
- About