PHP 클래스 lazyrecord\schema\SchemaGenerator

파일 보기 프로젝트 열기: corneltek/lazyrecord 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$config
$forceUpdate

공개 메소드들

메소드 설명
__construct ( ConfigLoader $config )
generate ( array $schemas ) : array Given a schema class list, generate schema files.
generateCollectionClass ( DeclareSchema $schema ) : array Generate collection class from a schema object.
generateModelClass ( DeclareSchema $schema ) Generate modal class file, overwrite by default.
generateSchemaFiles ( LazyRecord\Schema\SchemaInterface $schema )
setForceUpdate ( $force = true )

보호된 메소드들

메소드 설명
getBaseCollectionClass ( )
getBaseModelClass ( )
updateClassFile ( ClassTemplate\ClassFile $cTemplate, DeclareSchema $schema, $canOverwrite = false ) This method checks the exising schema file and the generated class file mtime.
writeClassTemplateToPath ( ClassTemplate\ClassFile $cTemplate, $filepath ) : array Write class template to the schema directory.

메소드 상세

__construct() 공개 메소드

public __construct ( ConfigLoader $config )
$config LazyRecord\ConfigLoader

generate() 공개 메소드

Given a schema class list, generate schema files.
public generate ( array $schemas ) : array
$schemas array
리턴 array class map array of schema class and file path.

generateCollectionClass() 공개 메소드

Generate collection class from a schema object.
public generateCollectionClass ( DeclareSchema $schema ) : array
$schema DeclareSchema
리턴 array class name, class file path

generateModelClass() 공개 메소드

Generate modal class file, overwrite by default.
public generateModelClass ( DeclareSchema $schema )
$schema DeclareSchema

generateSchemaFiles() 공개 메소드

public generateSchemaFiles ( LazyRecord\Schema\SchemaInterface $schema )
$schema LazyRecord\Schema\SchemaInterface

getBaseCollectionClass() 보호된 메소드

protected getBaseCollectionClass ( )

getBaseModelClass() 보호된 메소드

protected getBaseModelClass ( )

setForceUpdate() 공개 메소드

public setForceUpdate ( $force = true )

updateClassFile() 보호된 메소드

If the schema file is newer or the forceUpdate flag is specified, then the generated class files should be updated.
protected updateClassFile ( ClassTemplate\ClassFile $cTemplate, DeclareSchema $schema, $canOverwrite = false )
$cTemplate ClassTemplate\ClassFile
$schema DeclareSchema

writeClassTemplateToPath() 보호된 메소드

Write class template to the schema directory.
protected writeClassTemplateToPath ( ClassTemplate\ClassFile $cTemplate, $filepath ) : array
$cTemplate ClassTemplate\ClassFile
리턴 array

프로퍼티 상세

$config 보호되어 있는 프로퍼티

protected $config

$forceUpdate 보호되어 있는 프로퍼티

protected $forceUpdate