Module::__construct( string $prefix, array $services )

Constructor.

Description

See also

Parameters

$prefix

(string) (Required) The instance prefix.

$services

(array) (Required) Array of service instances.

  • 'manager'
    (Module_Manager) The module manager instance.
  • 'error_handler'
    (Error_Handler) The error handler instance.

Source

File: src/modules/module.php

	public function __construct( $prefix, $services ) {
		$this->set_prefix( $prefix );
		$this->set_services( $services );

		$this->bootstrap();

		$this->logging_context = array(
			'module' => $this->get_slug(),
		);

		$this->setup_hooks();
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.