Torro_Forms::instantiate_core_services()

Instantiates the plugin core services.

Description

See also

Source

File: src/torro-forms.php

	protected function instantiate_core_services() {
		call_user_func( array( 'Leaves_And_Love\Plugin_Lib\Fields\Field_Manager', 'set_translations' ), $this->instantiate_plugin_class( 'Translations\Translations_Field_Manager' ) );

		$this->error_handler = $this->instantiate_plugin_service( 'Error_Handler', $this->prefix, $this->instantiate_plugin_class( 'Translations\Translations_Error_Handler' ) );

		$this->options = $this->instantiate_library_service( 'Options', $this->prefix );

		$this->cache = $this->instantiate_library_service( 'Cache', $this->prefix );

		$this->db = $this->instantiate_plugin_service( 'DB', $this->prefix, array(
			'options'       => $this->options,
			'error_handler' => $this->error_handler,
		), $this->instantiate_plugin_class( 'Translations\Translations_DB' ) );

		$this->meta = $this->instantiate_library_service( 'Meta', $this->prefix, array(
			'db'            => $this->db,
			'error_handler' => $this->error_handler,
		) );

		$this->assets = $this->instantiate_plugin_service( 'Assets', $this->prefix, array(
			'path_callback'  => array( $this, 'path' ),
			'url_callback'   => array( $this, 'url' ),
			'plugin_version' => $this->version,
		) );

		$this->template = $this->instantiate_library_service( 'Template', $this->prefix, array(
			'default_location' => $this->path( 'templates/' ),
		) );

		$this->ajax = $this->instantiate_library_service( 'AJAX', $this->prefix, $this->instantiate_plugin_class( 'Translations\Translations_AJAX' ) );

		$this->apiapi_config = $this->instantiate_plugin_class( 'APIAPI_Config', $this->prefix );
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.