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