PHP 클래스 Inpsyde\MultilingualPress\Factory\GenericFactory

부터: 3.0.0
상속: implements Inpsyde\MultilingualPress\Common\Factory
파일 보기 프로젝트 열기: inpsyde/multilingual-press 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $base, string $default_class = '' ) Constructor. Sets up the properties.
create ( array $args = [], string $class = '' ) : object Returns a new object of the given (or default) class, instantiated with the given arguments.
with_default_class ( string $base, string $default_class ) : static Returns a new factory object, instantiated with the given arguments.

비공개 메소드들

메소드 설명
check_class ( string $class ) : void Checks if the class with the given name is valid with respect to the defined base.

메소드 상세

__construct() 공개 메소드

Constructor. Sets up the properties.
부터: 3.0.0
public __construct ( string $base, string $default_class = '' )
$base string Fully qualified name of the base class or interface.
$default_class string Optional. Fully qualified name of the default class. Defaults to empty string.

create() 공개 메소드

Returns a new object of the given (or default) class, instantiated with the given arguments.
부터: 3.0.0
public create ( array $args = [], string $class = '' ) : object
$args array Optional. Constructor arguments. Defaults to empty array.
$class string Optional. Fully qualified class name. Defaults to empty string.
리턴 object Object of the given (or default) class, instantiated with the given arguments.

with_default_class() 공개 정적인 메소드

Returns a new factory object, instantiated with the given arguments.
부터: 3.0.0
public static with_default_class ( string $base, string $default_class ) : static
$base string Fully qualified name of the base class or interface.
$default_class string Fully qualified name of the default class.
리턴 static Factory object.