db backup prior to drupal security update
[yaffs-website] / vendor / gabordemooij / redbean / README.markdown
1 RedBeanPHP 4
2 ============
3
4 ![Build Status](https://travis-ci.org/gabordemooij/redbean.svg?branch=master)
5
6 RedBeanPHP is an easy to use ORM tool for PHP.
7
8 * Automatically creates tables and columns as you go
9 * No configuration, just fire and forget
10 * No complicated package tools, no autoloaders, just ONE file
11
12 Installation via Composer
13 -------------------------
14
15 Just open your composer.json file and add the package name ```(e.g. "gabordemooij/redbean": "dev-master")``` in your require list.
16
17 ```json
18 {
19     "require": {
20         "gabordemooij/redbean": "dev-master"
21     }
22 }
23 ```
24
25 **NOTE**: 
26 You will find many examples on the redbean website make use of RedBean's `R` class. Because of namespaced autoloading in composer, this class will be available as `\RedbeanPHP\R` instead of `R`. If you desire to use the much shorter `R` class, you can utilize PHP's `class_alias()` function to take care of the job for you as so:
27
28 ```php
29 class_alias('\RedBeanPHP\R','\R');
30 ```
31
32 If you are not using composer then [try it.](http://redbeanphp.com/install)
33
34
35 Quick Example
36 -------------
37
38 How we store a book object with RedBeanPHP:
39 ```php
40 $book = R::dispense("book");
41 $book->author = "Santa Claus";
42 $book->title = "Secrets of Christmas";
43 $id = R::store( $book );
44 ```
45
46 Yep, it's that simple.
47
48
49 More information
50 ----------------
51
52 For more information about RedBeanPHP please consult
53 the RedBeanPHP website:
54
55 http://www.redbeanphp.com/