PHP 클래스 GDS\Schema

저자: Tom Walder ([email protected])
파일 보기 프로젝트 열기: tomwalder/php-gds 1 사용 예제들

공개 메소드들

메소드 설명
__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

메소드 상세

__construct() 공개 메소드

Kind is required
public __construct ( $str_kind )
$str_kind

addBoolean() 공개 메소드

Add a boolean field to the schema
public addBoolean ( $str_name, boolean $bol_index = TRUE ) : Schema
$str_name
$bol_index boolean
리턴 Schema

addDatetime() 공개 메소드

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

addFloat() 공개 메소드

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

addGeopoint() 공개 메소드

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

addInteger() 공개 메소드

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

addProperty() 공개 메소드

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() 공개 메소드

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

addStringList() 공개 메소드

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
리턴 Schema

createEntity() 최종 공개 메소드

Create a new instance of this GDS Entity class
final public createEntity ( ) : Entity
리턴 Entity

getKind() 공개 메소드

Get the Kind
public getKind ( ) : string
리턴 string

getProperties() 공개 메소드

Get the configured fields
public getProperties ( ) : array
리턴 array

setEntityClass() 최종 공개 메소드

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