Beispiel #1
0
 /**
  * Routes service requests to the proper service
  *
  * @return void
  **/
 public static function serve()
 {
     $services = dirname(ShoppLoader()->basepath()) . '/services';
     // Image Server request handling
     if (self::images()) {
         return require "{$services}/image.php";
     }
     // Script Server request handling
     if (self::scripts()) {
         return require "{$services}/scripts.php";
     }
     // Script Server request handling
     if (self::styles()) {
         return require "{$services}/styles.php";
     }
 }
Beispiel #2
0
            if (false !== ($pos = strpos($filepath, 'wp-content/plugins'))) {
                $wp_abspath = substr($filepath, 0, --$pos);
            }
        }
        $wp_load_file = self::sanitize($wp_abspath) . "/{$loadfile}";
        if (false !== $wp_load_file) {
            if (SHOPP_LOADER_APC) {
                apc_store($apccache, $wp_abspath);
            }
            return $wp_load_file;
        }
        return false;
    }
    /**
     * Indicates if Shopp is being activated. This can be useful for systems such as the Settings object
     * which will wish to avoid database operations before the schema is available, etc.
     *
     * @return bool
     */
    public static function is_activating()
    {
        global $action, $plugin;
        return ($action === 'activate' || $action === 'error_scrape') && $plugin === SHOPP_PLUGINFILE;
    }
}
function &ShoppLoader()
{
    return ShoppLoader::object();
}
ShoppLoader()->basepath(dirname(dirname(__FILE__)));
ShoppLoader::map(array('address' => '/library/Deprecated.php', 'admincontroller' => '/library/Deprecated.php', 'alsoboughtproducts' => '/model/Collection.php', 'amountvoidedevent' => '/model/Events.php', 'amountvoidedeventrenderer' => '/ui/orders/events.php', 'authedorderevent' => '/model/Events.php', 'authedordereventrenderer' => '/ui/orders/events.php', 'authfailorderevent' => '/model/Events.php', 'authfailordereventrenderer' => '/ui/orders/events.php', 'authorderevent' => '/model/Events.php', 'authordereventrenderer' => '/ui/orders/events.php', 'autoobjectframework' => '/library/Framework.php', 'bestsellerproducts' => '/model/Collection.php', 'billingaddress' => '/model/Address.php', 'booleanparser' => '/model/Search.php', 'capturedorderevent' => '/model/Events.php', 'capturedordereventrenderer' => '/ui/orders/events.php', 'capturefailorderevent' => '/model/Events.php', 'capturefailordereventrenderer' => '/ui/orders/events.php', 'captureorderevent' => '/model/Events.php', 'captureordereventrenderer' => '/ui/orders/events.php', 'cart' => '/library/Deprecated.php', 'cartdiscounts' => '/library/Deprecated.php', 'cartpromotions' => '/library/Deprecated.php', 'cartshipping' => '/library/Deprecated.php', 'carttax' => '/library/Deprecated.php', 'carttotals' => '/library/Deprecated.php', 'catalogproducts' => '/model/Collection.php', 'categoryimage' => '/model/Asset.php', 'contentindex' => '/model/Search.php', 'contentparser' => '/model/Search.php', 'creditordereventmessage' => '/model/Events.php', 'customer' => '/library/Deprecated.php', 'customeraccountpage' => '/model/Customer.php', 'customerscsvexport' => '/model/Customer.php', 'customersexport' => '/model/Customer.php', 'customersreport' => '/ui/reports/customers.php', 'customerstabexport' => '/model/Customer.php', 'customersxlsexport' => '/model/Customer.php', 'databaseobject' => '/library/Deprecated.php', 'db' => '/library/DB.php', 'debitordereventmessage' => '/model/Events.php', 'decryptorderevent' => '/model/Events.php', 'decryptordereventrenderer' => '/ui/orders/events.php', 'discountsreport' => '/ui/reports/discounts.php', 'downloadasset' => '/model/Asset.php', 'downloadorderevent' => '/model/Events.php', 'downloadordereventrenderer' => '/ui/orders/events.php', 'emogrifier' => '/library/Email.php', 'failureordereventrender' => '/ui/orders/events.php', 'featuredproducts' => '/model/Collection.php', 'fileasset' => '/model/Asset.php', 'flowcontroller' => '/library/Deprecated.php', 'formpostframework' => '/library/Framework.php', 'shoppfreeorder' => '/model/Gateway.php', 'gatewayframework' => '/model/Gateway.php', 'gatewaymodule' => '/model/Gateway.php', 'gatewaymodules' => '/model/Gateway.php', 'gatewaysettingsui' => '/model/Gateway.php', 'imageasset' => '/model/Asset.php', 'imageprocessor' => '/model/Image.php', 'imageserver' => '/image.php', 'imagesetting' => '/model/Asset.php', 'imagesettings' => '/model/Asset.php', 'indexproduct' => '/model/Search.php', 'inventoryreport' => '/ui/reports/inventory.php', 'invoicedorderevent' => '/model/Events.php', 'invoicedordereventrenderer' => '/ui/orders/events.php', 'item' => '/model/Item.php', 'listframework' => '/library/Framework.php', 'locationsreport' => '/ui/reports/locations.php', 'lookup' => '/library/Lookup.php', 'markdowntext' => '/library/Markdown.php', 'markdownfilter' => '/library/Markdown.php', 'markdownline' => '/library/Markdown.php', 'markdownstack' => '/library/Markdown.php', 'markdownblockquote' => '/library/Markdown.php', 'markdowncode' => '/library/Markdown.php', 'markdownemphasis' => '/library/Markdown.php', 'markdownentities' => '/library/Markdown.php', 'markdownheaderatx' => '/library/Markdown.php', 'markdownheadersetext' => '/library/Markdown.php', 'markdownhr' => '/library/Markdown.php', 'markdownimg' => '/library/Markdown.php', 'markdownlinebreak' => '/library/Markdown.php', 'markdownlink' => '/library/Markdown.php', 'markdownlists' => '/library/Markdown.php', 'markdownlistsbulleted' => '/library/Markdown.php', 'markdownlistsnumbered' => '/library/Markdown.php', 'markdownparagraph' => '/library/Markdown.php', 'markdownunescape' => '/library/Markdown.php', 'memberaccess' => '/model/Membership.php', 'membercontent' => '/model/Membership.php', 'memberplan' => '/model/Membership.php', 'members' => '/flow/Members.php', 'membership' => '/model/Membership.php', 'memberstage' => '/model/Membership.php', 'metaobject' => '/library/Deprecated.php', 'metasetobject' => '/model/Meta.php', 'mixproducts' => '/model/Collection.php', 'modulefile' => '/library/Modules.php', 'moduleloader' => '/library/Modules.php', 'modulesettingsui' => '/library/Modules.php', 'newproducts' => '/model/Collection.php', 'noteorderevent' => '/model/Events.php', 'noteordereventrenderer' => '/ui/orders/events.php', 'noticeorderevent' => '/model/Events.php', 'noticeordereventrenderer' => '/ui/orders/events.php', 'nusoap_base' => '/library/SOAP.php', 'nusoap_client' => '/library/SOAP.php', 'nusoap_fault' => '/library/SOAP.php', 'nusoap_parser' => '/library/SOAP.php', 'nusoap_xmlschema' => '/library/SOAP.php', 'objectmeta' => '/model/Meta.php', 'onsaleproducts' => '/model/Collection.php', 'orderamountaccountcredit' => '/model/Totals.php', 'orderamountcartitem' => '/model/Totals.php', 'orderamountcartitemquantity' => '/model/Totals.php', 'orderamountcredit' => '/model/Totals.php', 'orderamountdebit' => '/model/Totals.php', 'orderamountdiscount' => '/model/Totals.php', 'orderamountfee' => '/model/Totals.php', 'orderamountgiftcard' => '/model/Totals.php', 'orderamountgiftcertificate' => '/model/Totals.php', 'orderamountitem' => '/model/Totals.php', 'orderamountitemdiscounts' => '/model/Totals.php', 'orderamountitemquantity' => '/model/Totals.php', 'orderamountitemtax' => '/model/Totals.php', 'orderamountshipping' => '/model/Totals.php', 'orderamountshippingtax' => '/model/Totals.php', 'orderamounttax' => '/model/Totals.php', 'orderevent' => '/model/Events.php', 'ordereventmessage' => '/model/Events.php', 'ordereventrenderer' => '/ui/orders/events.php', 'ordertotal' => '/model/Totals.php', 'ordertotalamount' => '/model/Totals.php', 'ordertotalregisters' => '/model/Totals.php', 'ordertotals' => '/model/Totals.php', 'paycard' => '/model/Gateway.php', 'paymenttypesreport' => '/ui/reports/payment-types.php', 'porterstemmer' => '/model/Search.php', 'postcodemapping' => '/model/Address.php', 'price' => '/library/Deprecated.php', 'product' => '/library/Deprecated.php', 'productcategory' => '/model/Collection.php', 'productcategoryfacet' => '/model/Collection.php', 'productcategoryfacetfilter' => '/model/Collection.php', 'productcollection' => '/model/Collection.php', 'productdownload' => '/model/Asset.php', 'productimage' => '/model/Asset.php', 'productsreport' => '/ui/reports/products.php', 'productsummary' => '/model/Product.php', 'producttag' => '/model/Collection.php', 'producttaxonomy' => '/model/Collection.php', 'promoproducts' => '/model/Collection.php', 'promotion' => '/library/Deprecated.php', 'purchase' => '/library/Deprecated.php', 'purchased' => '/library/Deprecated.php', 'purchaseorderevent' => '/model/Events.php', 'purchasescsvexport' => '/model/Purchase.php', 'purchasesexport' => '/model/Purchase.php', 'purchasesiifexport' => '/model/Purchase.php', 'purchasestabexport' => '/model/Purchase.php', 'purchasestockallocation' => '/model/Purchase.php', 'purchasesxlsexport' => '/model/Purchase.php', 'randomproducts' => '/model/Collection.php', 'rebillorderevent' => '/model/Events.php', 'recapturedorderevent' => '/model/Events.php', 'recapturefailorderevent' => '/model/Events.php', 'refundedorderevent' => '/model/Events.php', 'refundedordereventrenderer' => '/ui/orders/events.php', 'refundfailorderevent' => '/model/Events.php', 'refundfailordereventrenderer' => '/ui/orders/events.php', 'refundorderevent' => '/model/Events.php', 'refundordereventrenderer' => '/ui/orders/events.php', 'relatedproducts' => '/model/Collection.php', 'revieworderevent' => '/model/Events.php', 'reviewordereventrenderer' => '/ui/orders/events.php', 'saleorderevent' => '/model/Events.php', 'saleordereventrenderer' => '/ui/orders/events.php', 'salesreport' => '/ui/reports/sales.php', 'sdb' => '/library/DB.php', 'searchparser' => '/model/Search.php', 'searchresults' => '/model/Collection.php', 'searchtextfilters' => '/model/Search.php', 'shoppsessionframework' => '/library/Session.php', 'shippedorderevent' => '/model/Events.php', 'shippedordereventrenderer' => '/ui/orders/events.php', 'shippingaddress' => '/model/Address.php', 'shippingcarrier' => '/model/Shipping.php', 'shippingframework' => '/model/Shipping.php', 'shippingmodule' => '/model/Shipping.php', 'shippingmodules' => '/model/Shipping.php', 'shippingoption' => '/model/Cart.php', 'shippingpackage' => '/model/Shipping.php', 'shippingpackageinterface' => '/model/Shipping.php', 'shippingpackageitem' => '/model/Shipping.php', 'shippingpackager' => '/model/Shipping.php', 'shippingpackaginginterface' => '/model/Shipping.php', 'shippingreport' => '/ui/reports/shipping.php', 'shippingsettingsui' => '/model/Shipping.php', 'shopp' => '/library/Shopp.php', 'shoppaccountdashboardpage' => '/flow/Pages.php', 'shoppaccountpage' => '/flow/Pages.php', 'shoppaccountwidget' => '/ui/widgets/account.php', 'shoppaddon_upgrader' => '/flow/Install.php', 'shoppaddress' => '/model/Address.php', 'shoppadmin' => '/flow/Admin.php', 'shoppadminaccount' => '/flow/Account.php', 'shoppadmincategorize' => '/flow/Categorize.php', 'shoppadmincontroller' => '/flow/Flow.php', 'shoppadmindashboard' => '/flow/Dashboard.php', 'shoppadmindiscounter' => '/flow/Discounter.php', 'shoppadminlisttable' => '/flow/Admin.php', 'shoppadminpage' => '/flow/Admin.php', 'shoppadminreport' => '/flow/Report.php', 'shoppadminservice' => '/flow/Service.php', 'shoppadminsetup' => '/flow/Setup.php', 'shoppadminsystem' => '/flow/System.php', 'shoppadminupgrade' => '/flow/Upgrade.php', 'shoppadminwarehouse' => '/flow/Warehouse.php', 'shoppadminwelcome' => '/flow/Welcome.php', 'shoppajax' => '/flow/Ajax.php', 'shoppapi' => '/library/API.php', 'shoppapifile' => '/library/API.php', 'shoppapimodules' => '/library/API.php', 'shoppcart' => '/model/Cart.php', 'shoppcartitem' => '/model/Item.php', 'shoppcartpage' => '/flow/Pages.php', 'shoppcartwidget' => '/ui/widgets/cart.php', 'shoppcatalog' => '/library/Catalog.php', 'shoppcatalogpage' => '/flow/Pages.php', 'shoppcategorieswidget' => '/ui/widgets/categories.php', 'shoppcategorysectionwidget' => '/ui/widgets/section.php', 'shoppcheckout' => '/flow/Checkout.php', 'shoppcheckoutpage' => '/flow/Pages.php', 'shoppcollectionpage' => '/flow/Pages.php', 'shoppconfirmpage' => '/flow/Pages.php', 'shoppcore' => '/library/Core.php', 'shoppcore_upgrader' => '/flow/Install.php', 'shoppcustomer' => '/model/Customer.php', 'shoppdatabaseobject' => '/library/DB.php', 'shoppdeveloperapi' => '/library/API.php', 'shoppdiscountrule' => '/model/Discounts.php', 'shoppdiscounts' => '/model/Discounts.php', 'shoppemaildefaultfilters' => '/library/Email.php', 'shoppemailfilters' => '/library/Email.php', 'shopperror' => '/library/Error.php', 'shopperrorlogging' => '/library/Error.php', 'shopperrornotification' => '/library/Error.php', 'shopperrors' => '/library/Error.php', 'shopperrorstorefrontnotices' => '/library/Error.php', 'shoppfacetedmenuwidget' => '/ui/widgets/facetedmenu.php', 'shoppflow' => '/flow/Flow.php', 'shoppflowcontroller' => '/flow/Flow.php', 'shoppformvalidation' => '/library/Validation.php', 'shoppimagingmodule' => '/model/Image.php', 'shoppimagingmodules' => '/model/Image.php', 'shopping' => '/model/Shopping.php', 'shoppingobject' => '/model/Shopping.php', 'shoppinstallation' => '/flow/Install.php', 'shoppitemtax' => '/model/Tax.php', 'shopploader' => '/library/Loader.php', 'shopplogin' => '/flow/Login.php', 'shopplogingenerator' => '/library/Loginname.php', 'shoppmaintenancepage' => '/flow/Pages.php', 'shoppmetaobject' => '/model/Meta.php', 'shopporder' => '/flow/Order.php', 'shopporderdiscount' => '/model/Discounts.php', 'shopporderpromo' => '/model/Discounts.php', 'shopppage' => '/flow/Pages.php', 'shopppages' => '/flow/Pages.php', 'shopppaymentoption' => '/model/Payments.php', 'shopppayments' => '/model/Payments.php', 'shoppprice' => '/model/Price.php', 'shoppproduct' => '/model/Product.php', 'shoppproductpage' => '/flow/Pages.php', 'shoppproductwidget' => '/ui/widgets/product.php', 'shopppromo' => '/model/Promotion.php', 'shopppromotions' => '/model/Discounts.php', 'shopppurchase' => '/model/Purchase.php', 'shopppurchased' => '/model/Purchased.php', 'shopppurchasediscount' => '/model/Discounts.php', 'shoppregistration' => '/flow/Registration.php', 'shoppreport' => '/flow/Report.php', 'shoppreportchart' => '/flow/Report.php', 'shoppreportcsvexport' => '/flow/Report.php', 'shoppreportexportframework' => '/flow/Report.php', 'shoppreportframework' => '/flow/Report.php', 'shoppreporttabexport' => '/flow/Report.php', 'shoppreportxlsexport' => '/flow/Report.php', 'shoppresources' => '/flow/Resources.php', 'shoppscripts' => '/flow/Scripts.php', 'shoppsearchwidget' => '/ui/widgets/search.php', 'shoppsettings' => '/model/Settings.php', 'shoppshippableitem' => '/model/Shiprates.php', 'shoppshiprates' => '/model/Shiprates.php', 'shoppshiprateservice' => '/model/Shiprates.php', 'shoppshopperswidget' => '/ui/widgets/shoppers.php', 'shoppshortcodes' => '/flow/Pages.php', 'shoppstorefront' => '/flow/Storefront.php', 'shoppsupport' => '/library/Support.php', 'shopptagcloudwidget' => '/ui/widgets/tagcloud.php', 'shopptax' => '/model/Tax.php', 'shopptaxableitem' => '/model/Tax.php', 'shoppthankspage' => '/flow/Pages.php', 'shopptmceloader' => '/ui/behaviors/tinymce/dialog.php', 'shoppui' => '/flow/Admin.php', 'shopp_upgrader' => '/flow/Install.php', 'shopp_upgrader_skin' => '/flow/Install.php', 'shoppversion' => '/library/Version.php', 'shortwordparser' => '/model/Search.php', 'singletonframework' => '/library/Framework.php', 'smartcollection' => '/model/Collection.php', 'soapclient' => '/library/SOAP.php', 'soapval' => '/library/SOAP.php', 'soap_fault' => '/library/SOAP.php', 'soap_parser' => '/library/SOAP.php', 'soap_transport_http' => '/library/SOAP.php', 'spec' => '/model/Product.php', 'spldoublylinkedlist' => '/library/Deprecated.php', 'splqueue' => '/library/Deprecated.php', 'splstack' => '/library/Deprecated.php', 'storageengine' => '/model/Storage.php', 'storageengines' => '/model/Storage.php', 'storagemodule' => '/model/Storage.php', 'storagesettingsui' => '/model/Storage.php', 'storefront' => '/library/Deprecated.php', 'subscriberframework' => '/model/library/Framework.php', 'tagproducts' => '/model/Collection.php', 'taxreport' => '/ui/reports/tax.php', 'templateshippingui' => '/model/Shipping.php', 'textify' => '/library/Email.php', 'textifya' => '/library/Email.php', 'textifyaddress' => '/library/Email.php', 'textifyblockelement' => '/library/Email.php', 'textifyblockquote' => '/library/Email.php', 'textifybr' => '/library/Email.php', 'textifycode' => '/library/Email.php', 'textifydd' => '/library/Email.php', 'textifydiv' => '/library/Email.php', 'textifydl' => '/library/Email.php', 'textifydt' => '/library/Email.php', 'textifyem' => '/library/Email.php', 'textifyfieldset' => '/library/Email.php', 'textifyh1' => '/library/Email.php', 'textifyh2' => '/library/Email.php', 'textifyh3' => '/library/Email.php', 'textifyh4' => '/library/Email.php', 'textifyh5' => '/library/Email.php', 'textifyh6' => '/library/Email.php', 'textifyheader' => '/library/Email.php', 'textifyhr' => '/library/Email.php', 'textifyinlineelement' => '/library/Email.php', 'textifylegend' => '/library/Email.php', 'textifyli' => '/library/Email.php', 'textifylistcontainer' => '/library/Email.php', 'textifyol' => '/library/Email.php', 'textifyp' => '/library/Email.php', 'textifystrong' => '/library/Email.php', 'textifytable' => '/library/Email.php', 'textifytabletag' => '/library/Email.php', 'textifytag' => '/library/Email.php', 'textifytd' => '/library/Email.php', 'textifyth' => '/library/Email.php', 'textifytr' => '/library/Email.php', 'textifyul' => '/library/Email.php', 'txnfailordereventrenderer' => '/ui/orders/events.php', 'txnordereventrenderer' => '/ui/orders/events.php', 'unstockorderevent' => '/model/Events.php', 'unstockordereventrenderer' => '/ui/orders/events.php', 'viewedproducts' => '/model/Collection.php', 'voidedorderevent' => '/model/Events.php', 'voidedordereventrenderer' => '/ui/orders/events.php', 'voidfailorderevent' => '/model/Events.php', 'voidfailordereventrenderer' => '/ui/orders/events.php', 'voidorderevent' => '/model/Events.php', 'voidordereventrenderer' => '/ui/orders/events.php', 'wpdatabaseobject' => '/library/DB.php', 'wpshoppobject' => '/library/DB.php', 'wsdl' => '/library/SOAP.php', 'xmlquery' => '/library/XML.php', 'xmlschema' => '/library/SOAP.php'));
Beispiel #3
0
 /**
  * Handles request services like the image server and script server
  *
  * @author Jonathan Davis
  * @since 1.3
  *
  * @return boolean The service load status
  **/
 public static function services()
 {
     if (WP_DEBUG) {
         define('SHOPP_MEMORY_PROFILE_BEFORE', memory_get_peak_usage(true));
     }
     $services = dirname(ShoppLoader()->basepath()) . '/services';
     // Image Server request handling
     if (isset($_GET['siid']) || 1 == preg_match('{^/.+?/images/\\d+/.*$}', $_SERVER['REQUEST_URI'])) {
         return require "{$services}/image.php";
     }
     // Script Server request handling
     if (isset($_GET['sjsl'])) {
         return require "{$services}/scripts.php";
     }
 }