Download the PHP package gabordemooij/redbean without Composer
On this page you can find all versions of the php package gabordemooij/redbean. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gabordemooij/redbean
More information about gabordemooij/redbean
Files in gabordemooij/redbean
Package redbean
Short Description RedBeanPHP ORM
License BSD-3-Clause
Homepage https://redbeanphp.com/
Informations about the package redbean
RedBeanPHP 5
RedBeanPHP is an easy to use ORM tool for PHP.
- Automatically creates tables and columns as you go
- No configuration, just fire and forget
- No complicated package tools, no autoloaders, just ONE file
Installation (recommended)
Download RedBeanPHP from the website:
https://redbeanphp.com/download
Extract the archive and put it in your PHP project, voila!
Optional: sha256sum and check signature.
Installation via Composer (not recommended)
Just open your composer.json file and add the package name in your require list.
NOTE:
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
alias, you can add a use
statement at the beginning of your code:
NOTE:
It is important to note that when using RedBeanPHP with Composer, there are some extra precautions needed when working with Models. Due to the namespace requirements of Composer, when creating Models we need to use the SimpleModel
to extend, not RedBean_SimpleModel
. Furthermore, we need to specify the namespace of the SimpleModel
, so a full example of using a Model with RedBean with Composer is as follows:
Notice that we also need to add the use \RedBeanPHP\R
statement so that we can use the R::
shortcut within the Model.
Quick Example
How we store a book object with RedBeanPHP:
Yep, it's that simple.
More information
For more information about RedBeanPHP please consult the RedBeanPHP website: