PHP Class Inpsyde\MultilingualPress\Factory\FallbackErrorFactory

Since: 3.0.0
Inheritance: implements Inpsyde\MultilingualPress\Factory\ErrorFactory
Show file Open project: inpsyde/multilingual-press

Public Methods

Method Description
__construct ( string $default_class = ErrorFactory::DEFAULT_CLASS ) Constructor. Sets up the properties.
create ( array $args = [], string $class = '' ) : WP_Error Returns a new WordPress error object, instantiated with the given arguments.

Method Details

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( string $default_class = ErrorFactory::DEFAULT_CLASS )
$default_class string Optional. Fully qualified name of the default class. Defaults to ErrorFactory::DEFAULT_CLASS.

create() public method

Returns a new WordPress error object, instantiated with the given arguments.
Since: 3.0.0
public create ( array $args = [], string $class = '' ) : WP_Error
$args array Optional. Constructor arguments. Defaults to empty array.
$class string Optional. Fully qualified class name. Defaults to empty string.
return WP_Error WordPress error object.