PHP 클래스 Bolt\Storage\FieldManager

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

보호된 프로퍼티들

프로퍼티 타입 설명
$boltConfig Bolt\Config
$customHandlers
$em EntityManager
$handlers
$sanitiser Bolt\Storage\Field\Sanitiser\SanitiserInterface
$typemap

공개 메소드들

메소드 설명
__construct ( array $typemap, Config $config, Bolt\Storage\Field\Sanitiser\SanitiserInterface $sanitiser ) Constructor.
addFieldType ( $name, $handler ) Shorthand to add a field to both the new and legacy managers.
get ( $class, $mapping ) : mixed Gets the field instance for the supplied class.
getFieldFor ( $type ) : boolean | mixed Looks up a type from the typemap and returns a field class.
hasCustomHandler ( $name ) : boolean Note, this method is for Bolt use only, as a way to distinguish which fields have been added outside of the core system. It will be removed in a future version.
setEntityManager ( EntityManager $em = null ) Set an instance of EntityManager
setHandler ( $class, callable | object $handler ) Links the field name found in the config to a callable handler.

메소드 상세

__construct() 공개 메소드

Requires access to legacy Config class so that it can add fields to the old-style manager This can be removed once the templating has migrated to the new system.
public __construct ( array $typemap, Config $config, Bolt\Storage\Field\Sanitiser\SanitiserInterface $sanitiser )
$typemap array
$config Bolt\Config
$sanitiser Bolt\Storage\Field\Sanitiser\SanitiserInterface

addFieldType() 공개 메소드

Shorthand to add a field to both the new and legacy managers.
public addFieldType ( $name, $handler )
$name
$handler

get() 공개 메소드

Gets the field instance for the supplied class.
public get ( $class, $mapping ) : mixed
$class
$mapping
리턴 mixed

getFieldFor() 공개 메소드

Looks up a type from the typemap and returns a field class.
public getFieldFor ( $type ) : boolean | mixed
$type
리턴 boolean | mixed

hasCustomHandler() 공개 메소드

Note, this method is for Bolt use only, as a way to distinguish which fields have been added outside of the core system. It will be removed in a future version.
public hasCustomHandler ( $name ) : boolean
$name
리턴 boolean

setEntityManager() 공개 메소드

Set an instance of EntityManager
public setEntityManager ( EntityManager $em = null )
$em EntityManager

setHandler() 공개 메소드

Links the field name found in the config to a callable handler.
public setHandler ( $class, callable | object $handler )
$class
$handler callable | object

프로퍼티 상세

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

protected Config,Bolt $boltConfig
리턴 Bolt\Config

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

protected $customHandlers

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

protected EntityManager,Bolt\Storage $em
리턴 EntityManager

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

protected $handlers

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

protected SanitiserInterface,Bolt\Storage\Field\Sanitiser $sanitiser
리턴 Bolt\Storage\Field\Sanitiser\SanitiserInterface

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

protected $typemap