src/class-plugin-provider.php
public function register( Container $container ) {
		$container['check_site_job'] = function( Container $c ) {
			return new Check_Site_Job( $c['checker'], $c['options_manager'] );
		};

		$container['checker'] = function( Container $c ) {
			$checker = new Checker( new Api_Client( $c['http'] ), new WP_Package_Manager() );

			$checker->add_post_check_callback( function( $vulnerabilities, $response ) {
				do_action( 'soter_package_check_complete', $vulnerabilities, $response );
			} );

			return $checker;
		};

		$container['http'] = function( Container $c ) {
			return new Cached_Http_Client(
				new WP_Http_Client( $c['user_agent'] ),
				new WP_Transient_Cache( $c['prefix'], HOUR_IN_SECONDS )
			);
		};

		$container['notifier_manager'] = function( Container $c ) {
			$options = $c['options_manager'];

			return new Notifier_Manager( $options, [
				new Email_Notifier( $c['plates'], $options ),
				new Slack_Notifier( $options, $c['user_agent'] ),
			] );
		};

		$container['options_manager'] = function( Container $c ) {
			return new Options_Manager( new Options_Store( $c['prefix'] ) );
		};

		$container['options_page'] = function( Container $c ) {
			return new Options_Page( $c['options_manager'], $c['plates'] );
		};

		$container['plates'] = function( Container $c ) {
			$engine = new Engine( $c['dir'] . '/templates' );

			// Drop the file extension so we can also load .css files.
			$engine->setFileExtension( null );
			$engine->loadExtension( new Button_Extension() );
			$engine->addData(
				[
					'plugin_url' => $c['url'],
					'site_name' => get_bloginfo( 'name' ),
					'site_url' => site_url(),
				],
				[
					'emails/html/error.php',
					'emails/html/vulnerable.php',
					'emails/partials/footer.php',
					'emails/partials/header.php',
					'emails/text/error.php',
					'emails/text/vulnerable.php',
				]
			);

			return $engine;
		};

		$container['user_agent'] = function( Container $c ) {
			return sprintf(
				'%s (%s) | %s | v%s | %s',
				get_bloginfo( 'name' ),
				get_home_url(),
				$c['name'],
				$c['version'],
				$c['url']
			);
		};
	}
public function register( Container $container ) {
		$container['check_site_job'] = function( Container $c ) {
			return new Check_Site_Job( $c['checker'], $c['options_manager'] );
		};

		$container['checker'] = function( Container $c ) {
			$checker = new Checker( new Api_Client( $c['http'] ), new WP_Package_Manager() );

			$checker->add_post_check_callback( function( $vulnerabilities, $response ) {
				do_action( 'soter_package_check_complete', $vulnerabilities, $response );
			} );

			return $checker;
		};

		$container['http'] = function( Container $c ) {
			return new Cached_Http_Client(
				new WP_Http_Client( $c['user_agent'] ),
				new WP_Transient_Cache( $c['prefix'], HOUR_IN_SECONDS )
			);
		};

		$container['notifier_manager'] = function( Container $c ) {
			$options = $c['options_manager'];

			return new Notifier_Manager( $options, [
				new Email_Notifier( $c['plates'], $options ),
				new Slack_Notifier( $options, $c['user_agent'] ),
			] );
		};

		$container['options_manager'] = function( Container $c ) {
			return new Options_Manager( new Options_Store( $c['prefix'] ) );
		};

		$container['options_page'] = function( Container $c ) {
			return new Options_Page( $c['options_manager'], $c['plates'] );
		};

		$container['plates'] = function( Container $c ) {
			$engine = new Engine( $c['dir'] . '/templates' );

			// Drop the file extension so we can also load .css files.
			$engine->setFileExtension( null );
			$engine->loadExtension( new Button_Extension() );
			$engine->addData(
				[
					'plugin_url' => $c['url'],
					'site_name' => get_bloginfo( 'name' ),
					'site_url' => site_url(),
				],
				[
					'emails/html/error.php',
					'emails/html/vulnerable.php',
					'emails/partials/footer.php',
					'emails/partials/header.php',
					'emails/text/error.php',
					'emails/text/vulnerable.php',
				]
			);

			return $engine;
		};

		$container['user_agent'] = function( Container $c ) {
			return sprintf(
				'%s (%s) | %s | v%s | %s',
				get_bloginfo( 'name' ),
				get_home_url(),
				$c['name'],
				$c['version'],
				$c['url']
			);
		};
	}
public function register ( Container $ container ) { $ container [ 'check_site_job' ] = function ( Container $ c ) { return new Check_Site_Job ( $ c [ 'checker' ] , $ c [ 'options_manager' ] ) ; } ; $ container [ 'checker' ] = function ( Container $ c ) { $ checker = new Checker ( new Api_Client ( $ c [ 'http' ] ) , new WP_Package_Manager ( ) ) ; $ checker -> add_post_check_callback ( function ( $ vulnerabilities , $ response ) { do_action ( 'soter_package_check_complete' , $ vulnerabilities , $ response ) ; } ) ; return $ checker ; } ; $ container [ 'http' ] = function ( Container $ c ) { return new Cached_Http_Client ( new WP_Http_Client ( $ c [ 'user_agent' ] ) , new WP_Transient_Cache ( $ c [ 'prefix' ] , HOUR_IN_SECONDS ) ) ; } ; $ container [ 'notifier_manager' ] = function ( Container $ c ) { $ options = $ c [ 'options_manager' ] ; return new Notifier_Manager ( $ options , [ new Email_Notifier ( $ c [ 'plates' ] , $ options ) , new Slack_Notifier ( $ options , $ c [ 'user_agent' ] ) , ] ) ; } ; $ container [ 'options_manager' ] = function ( Container $ c ) { return new Options_Manager ( new Options_Store ( $ c [ 'prefix' ] ) ) ; } ; $ container [ 'options_page' ] = function ( Container $ c ) { return new Options_Page ( $ c [ 'options_manager' ] , $ c [ 'plates' ] ) ; } ; $ container [ 'plates' ] = function ( Container $ c ) { $ engine = new Engine ( $ c [ 'dir' ] . '/templates' ) ; // Drop the file extension so we can also load .css files. $ engine -> setFileExtension ( null ) ; $ engine -> loadExtension ( new Button_Extension ( ) ) ; $ engine -> addData ( [ 'plugin_url' => $ c [ 'url' ] , 'site_name' => get_bloginfo ( 'name' ) , 'site_url' => site_url ( ) , ] , [ 'emails/html/error.php' , 'emails/html/vulnerable.php' , 'emails/partials/footer.php' , 'emails/partials/header.php' , 'emails/text/error.php' , 'emails/text/vulnerable.php' , ] ) ; return $ engine ; } ; $ container [ 'user_agent' ] = function ( Container $ c ) { return sprintf ( '%s (%s) | %s | v%s | %s' , get_bloginfo ( 'name' ) , get_home_url ( ) , $ c [ 'name' ] , $ c [ 'version' ] , $ c [ 'url' ] ) ; } ; }
Provider-specific registration logic.

@param  Container $container Plugin container instance.

@return void
Provider - specific registration logic .