Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/spacedevin/tipsy

An MVW PHP micro framework
https://github.com/spacedevin/tipsy

framework mvc mvc-framework mvw mvw-framework php php-7

Last synced: 8 days ago
JSON representation

An MVW PHP micro framework

Awesome Lists containing this project

README

        


Tipsy is an MVW (Model, View, Whatever) PHP micro framework inspired by [AngularJS](https://angularjs.org/). It provides a very lightweight, easy to use interface for websites, rest apis, and dependency injection.

[![Latest Stable Version](https://poser.pugx.org/tipsyphp/tipsy/v/stable)](https://packagist.org/packages/tipsyphp/tipsy)
[![Build Status](https://travis-ci.org/tipsyphp/tipsy.svg?branch=master)](https://travis-ci.org/tipsyphp/tipsy)
[![Coverage Status](https://coveralls.io/repos/tipsyphp/tipsy/badge.svg?branch=master&service=github)](https://coveralls.io/github/tipsyphp/tipsy?branch=master)
[![Slack Status](https://tipsy-slack.herokuapp.com/badge.svg)](https://tipsy-slack.herokuapp.com/)

---

### Example Usage

See [Examples](https://github.com/tipsyphp/tipsy/wiki/Examples) for more detailed examples. See [Documentation](https://github.com/tipsyphp/tipsy/wiki) for more information.

#### View Template Example

###### index.php
```php
$tipsy->router()
->home(function($Scope, $View) {
$Scope->user = 'Mai Tai';
$View->display('hello');
});
```

###### hello.phtml
```phtml

Hello =$user?>!


```

#### API Example

###### index.php

```php
$tipsy->router()
->delete('api/maitai/:id', function($Params) {
echo json_encode([message => $Params->id]);
});
```

###### DELETE /api/maitai/1
```
{"message": 1}
```

---

### Installation
To install using composer use the command below. For additional installation information see [Installation](https://github.com/tipsyphp/tipsy/wiki/Installation).

```sh
composer require tipsyphp/tipsy
```