Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/flexible-shipping-pro   php

Repository URL to install this package:

Version: 1.11.1 

/ wpdesk / wp-wpdesk-license / src / Page / LicensePageActions.php

<?php

namespace FSProVendor\WPDesk\License\Page;

use FSProVendor\WPDesk\License\Page\License\Action\LicenseActivation;
use FSProVendor\WPDesk\License\Page\License\Action\LicenseDeactivation;
use FSProVendor\WPDesk\License\Page\License\Action\Nothing;
/**
 * Action factory.
 *
 * @package WPDesk\License\Page\License
 */
class LicensePageActions
{
    /**
     * Creates action object according to given param
     *
     * @param string $action
     *
     * @return Action
     */
    public function create_action($action)
    {
        if ($action === 'activate') {
            return new \FSProVendor\WPDesk\License\Page\License\Action\LicenseActivation();
        }
        if ($action === 'deactivate') {
            return new \FSProVendor\WPDesk\License\Page\License\Action\LicenseDeactivation();
        }
        return new \FSProVendor\WPDesk\License\Page\License\Action\Nothing();
    }
}