Overview

Namespaces

  • None
  • RedBeanPHP
    • Adapter
    • BeanHelper
    • Cursor
    • Driver
    • Logger
      • RDefault
    • QueryWriter
    • RedException
    • Repository
    • Util

Classes

  • AssociationManager
  • BeanCollection
  • DuplicationManager
  • Facade
  • Finder
  • Jsonable
  • LabelMaker
  • Observable
  • OODB
  • OODBBean
  • R
  • Repository
  • SimpleModel
  • SimpleModelHelper
  • TagManager
  • ToolBox

Interfaces

  • Adapter
  • BeanHelper
  • Cursor
  • Driver
  • Logger
  • Observer
  • Plugin
  • QueryWriter

Exceptions

  • RedException
  • Overview
  • Namespace
  • Class

Class SimpleModel

SimpleModel Base Model For All RedBeanPHP Models using FUSE.

RedBeanPHP FUSE is a mechanism to connect beans to posthoc models. Models are connected to beans by naming conventions. Actions on beans will result in actions on models.

Direct known subclasses

RedBean_SimpleModel
Namespace: RedBeanPHP
Copyright:

copyright (c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community This source file is subject to the BSD/GPLv2 License that is bundled with this source code in the file license.txt.


License: BSD/GPLv2
Author: Gabor de Mooij and the RedBeanPHP Team
File: RedBeanPHP/SimpleModel.php
Located at SimpleModel.php
Methods summary
public
# loadBean( RedBeanPHP\OODBBean $bean )

Used by FUSE: the ModelHelper class to connect a bean to a model. This method loads a bean in the model.

Used by FUSE: the ModelHelper class to connect a bean to a model. This method loads a bean in the model.

Parameters

$bean
bean to load
public mixed
# __get( string $prop )

Magic Getter to make the bean properties available from the $this-scope.

Magic Getter to make the bean properties available from the $this-scope.

Parameters

$prop
property to get

Returns

mixed

Note

this method returns a value, not a reference! To obtain a reference unbox the bean first!


public
# __set( string $prop, mixed $value )

Magic Setter. Sets the value directly as a bean property.

Magic Setter. Sets the value directly as a bean property.

Parameters

$prop
property to set value of
$value
value to set
public boolean
# __isset( string $key )

Isset implementation. Implements the isset function for array-like access.

Isset implementation. Implements the isset function for array-like access.

Parameters

$key
key to check

Returns

boolean
public RedBeanPHP\SimpleModel
# box( )

Box the bean using the current model. This method wraps the current bean in this model. This method can be reached using FUSE through a simple OODBBean. The method returns a RedBeanPHP Simple Model. This is useful if you would like to rely on PHP type hinting. You can box your beans before passing them to functions or methods with typed parameters.

Box the bean using the current model. This method wraps the current bean in this model. This method can be reached using FUSE through a simple OODBBean. The method returns a RedBeanPHP Simple Model. This is useful if you would like to rely on PHP type hinting. You can box your beans before passing them to functions or methods with typed parameters.

Returns

RedBeanPHP\SimpleModel
public RedBeanPHP\OODBBean
# unbox( )

Unbox the bean from the model. This method returns the bean inside the model.

Unbox the bean from the model. This method returns the bean inside the model.

Returns

RedBeanPHP\OODBBean
Properties summary
protected RedBeanPHP\OODBBean $bean
#
API documentation generated by ApiGen