PHP Class GDS\Schema

Author: Tom Walder ([email protected])
Afficher le fichier Open project: tomwalder/php-gds Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $str_kind ) Kind is required
addBoolean ( $str_name, boolean $bol_index = TRUE ) : Schema Add a boolean field to the schema
addDatetime ( $str_name, boolean $bol_index = TRUE ) : Schema Add a datetime field to the schema
addFloat ( $str_name, boolean $bol_index = TRUE ) : Schema Add a float|double field to the schema
addGeopoint ( $str_name, boolean $bol_index = TRUE ) : Schema Add a geopoint field to the schema
addInteger ( $str_name, boolean $bol_index = TRUE ) : Schema Add an integer field to the schema
addProperty ( $str_name, $int_type = self::PROPERTY_STRING, boolean $bol_index = TRUE ) Add a field to the known field array
addString ( $str_name, boolean $bol_index = TRUE ) : Schema Add a string field to the schema
addStringList ( $str_name, boolean $bol_index = TRUE ) : Schema Add a string-list (array of strings) field to the schema
createEntity ( ) : Entity Create a new instance of this GDS Entity class
getKind ( ) : string Get the Kind
getProperties ( ) : array Get the configured fields
setEntityClass ( $str_class ) Set the class to use when instantiating new Entity objects

Method Details

__construct() public méthode

Kind is required
public __construct ( $str_kind )
$str_kind

addBoolean() public méthode

Add a boolean field to the schema
public addBoolean ( $str_name, boolean $bol_index = TRUE ) : Schema
$str_name
$bol_index boolean
Résultat Schema

addDatetime() public méthode

Add a datetime field to the schema
public addDatetime ( $str_name, boolean $bol_index = TRUE ) : Schema
$str_name
$bol_index boolean
Résultat Schema

addFloat() public méthode

Add a float|double field to the schema
public addFloat ( $str_name, boolean $bol_index = TRUE ) : Schema
$str_name
$bol_index boolean
Résultat Schema

addGeopoint() public méthode

Add a geopoint field to the schema
public addGeopoint ( $str_name, boolean $bol_index = TRUE ) : Schema
$str_name
$bol_index boolean
Résultat Schema

addInteger() public méthode

Add an integer field to the schema
public addInteger ( $str_name, boolean $bol_index = TRUE ) : Schema
$str_name
$bol_index boolean
Résultat Schema

addProperty() public méthode

Add a field to the known field array
public addProperty ( $str_name, $int_type = self::PROPERTY_STRING, boolean $bol_index = TRUE )
$str_name
$int_type
$bol_index boolean

addString() public méthode

Add a string field to the schema
public addString ( $str_name, boolean $bol_index = TRUE ) : Schema
$str_name
$bol_index boolean
Résultat Schema

addStringList() public méthode

Add a string-list (array of strings) field to the schema
public addStringList ( $str_name, boolean $bol_index = TRUE ) : Schema
$str_name
$bol_index boolean
Résultat Schema

createEntity() final public méthode

Create a new instance of this GDS Entity class
final public createEntity ( ) : Entity
Résultat Entity

getKind() public méthode

Get the Kind
public getKind ( ) : string
Résultat string

getProperties() public méthode

Get the configured fields
public getProperties ( ) : array
Résultat array

setEntityClass() final public méthode

Must be GDS\Entity, or a sub-class of it
final public setEntityClass ( $str_class )
$str_class