Skip to content
This repository was archived by the owner on Dec 5, 2018. It is now read-only.

Framework:Model

gehrc edited this page Nov 28, 2014 · 1 revision

###Description

Contains the 'Model' class, which defines the basic properties for a Model.

##Properties

protected

  • reflectionClass
    • ReflectionClass object for the object, which contains information about itself

####__construct()

public

Constructor for the 'Model' class, which returns a 'Model' object.

Params

  • N/A

Notes

All this does is populate the ReflectionClass property. It should be called via parent::__construct() in the extended class if you need to override it; right now, the order its called does not matter.


####__get()

public

Gets a property's value from the Model

Params

  • string $name Name of the property

Returns

mixed Property Value


####__set()

_public)

Sets a property's value in the Model

Params

  • string $name Property Name
  • mixed $value Property Value

Returns

mixed The newly set property's value


####toArray() Returns all properties of the Model to an array in a key->value format

Params

  • N/A

Returns

mixed[] Model properties in key-val format. The key is the property name, while the value corresponds to its value.

Clone this wiki locally