Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doomspork/modelite
models + sqlite
https://github.com/doomspork/modelite
Last synced: 6 days ago
JSON representation
models + sqlite
- Host: GitHub
- URL: https://github.com/doomspork/modelite
- Owner: doomspork
- Created: 2011-01-16T00:10:41.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-02-04T20:00:05.000Z (almost 14 years ago)
- Last Synced: 2024-11-05T14:54:43.336Z (about 2 months ago)
- Language: PHP
- Homepage:
- Size: 102 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
models + sqlite = modelite
Currently only supports PHP >= 5.3, sorry.
#roadmap
+ relationships!
+ ????
+ PROFIT!#examples
class Posts extends Model {
$validators = array(
'title' => array('required', 'alphanumeric')
'body' => array('required')
'slug' => array(new CustomValidator()));}
$posts = Posts::find(1) #id (sqlite's rowid)
$posts = Posts::find(array('title' => 'First Post'), array('limit' => 5));
$posts = Posts::find(array('or' => array('title' => 'First Post', 'slug' => 'second-post-slug')));