PHP Класс Inpsyde\MultilingualPress\Factory\GenericFactory

С версии: 3.0.0
Наследование: implements Inpsyde\MultilingualPress\Common\Factory
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.