Esempio n. 1
0
    }
    /**
     * Constructor.
     *
     * @param \Aelia\WC\Settings settings_controller The controller that will handle
     * the plugin settings.
     * @param \Aelia\WC\Messages messages_controller The controller that will handle
     * the messages produced by the plugin.
     */
    public function __construct($settings_controller, $messages_controller)
    {
        // Load Composer autoloader
        require_once __DIR__ . '/vendor/autoload.php';
        parent::__construct($settings_controller, $messages_controller);
    }
    /**
     * Factory method.
     *
     * @return WC_Skrill_Gateway_Plugin
     */
    public static function factory()
    {
        // Load Composer autoloader
        require_once __DIR__ . '/vendor/autoload.php';
        $messages_controller = new Messages();
        $plugin_instance = new self(null, $messages_controller);
        return $plugin_instance;
    }
}
$GLOBALS[WC_Skrill_Gateway_Plugin::$plugin_slug] = WC_Skrill_Gateway_Plugin::factory();