Plugin Directory

Changeset 2986436


Ignore:
Timestamp:
10/30/2023 11:03:03 PM (2 years ago)
Author:
arraycodes
Message:

Version 3.0.0

Location:
datalayer-for-ecommerce-free
Files:
14 added
20 edited

Legend:

Unmodified
Added
Removed
  • datalayer-for-ecommerce-free/trunk/datalayer-for-ecommerce-free.php

    r2928876 r2986436  
    44 * Plugin URI:  https://wordpress.org/plugins/datalayer-for-ecommerce-free/
    55 * Description: DataLayer is an object that makes available in real time the information that is executed by users while browsing the WooCommerce Store.
    6  * Version:     2.7.0
     6 * Version:     3.0.0
    77 * Requires at least: 5.2.0
    8  * Tested up to: 6.2.2
     8 * Tested up to: 6.3.2
    99 * Requires PHP:      7.2
    10  * Author:      Array Codes
     10 * Author:      Array.codes
    1111 * Author URI:  https://array.codes/
    1212 * Developer: Heitor Sousa
     
    1616 * *
    1717 * WC requires at least: 4.8.0
    18  * WC tested up to: 7.8.0
     18 * WC tested up to: 8.2.1
    1919 *
    2020 * License: GNU General Public License v3.0
  • datalayer-for-ecommerce-free/trunk/readme.txt

    r2928876 r2986436  
    5959== Screenshots ==
    6060
    61 1. Configurations screen plugin.
    62 2. Tags Universal Analytics with Google Analytics 4 tags as a complement imported
    63 3. Tags Google Analytics 4 imported
     611. Google Tag Manager Settings screen plugin.
     622. Ecommerce Settings screen plugin.
     633. Ecommerce Advanced screen plugin.
     644. Tags Universal Analytics with Google Analytics 4 tags as a complement imported
     655. Tags Google Analytics 4 imported
    6466
    6567== Changelog ==
     68= 3.0.0 - 2023-10-30 =
     69* New: Full compatibility with WooCommerce Blocks
     70* New: New Modern Admin Page
     71* Support: Support -> WP 6.3.2 WC 8.2.1
     72
    6673= 2.7.0 - 2023-06-21 =
    6774* New: Select if user information show or not when logged
  • datalayer-for-ecommerce-free/trunk/src/DataLayer.php

    r2752271 r2986436  
    6363         */
    6464        public static function is_data_layer_ua() {
    65             $options = get_option( 'tracking_option_pro' );
     65            $options = get_option( 'options_tracking_option_free' );
    6666            if ( isset( $options['data_layer_google_tag_manager_enhanced_ecommerce'] ) ) {
    6767                if ( $options['data_layer_google_tag_manager_enhanced_ecommerce'] ) {
     
    7878         */
    7979        public static function is_data_layer_ga4() {
    80             $options = get_option( 'tracking_option_pro' );
     80            $options = get_option( 'options_tracking_option_free' );
    8181            if ( isset( $options['data_layer_google_tag_manager_ecommerce_ga4'] ) ) {
    8282                if ( $options['data_layer_google_tag_manager_ecommerce_ga4'] ) {
  • datalayer-for-ecommerce-free/trunk/src/Init.php

    r2928876 r2986436  
    3636         * Return an instance of this class.
    3737         *
    38          * @return static::$instance
     38         * @return self::$instance
    3939         */
    4040        public static function instance() {
    41             if ( null === static::$instance ) {
    42                 static::$instance = new static();
     41            if ( null === self::$instance ) {
     42                self::$instance = new self();
    4343            }
    44             return static::$instance;
     44            return self::$instance;
    4545        }
    4646
     
    7373         */
    7474        private function register_admin_classes() {
    75             if ( is_admin() ) {
    76                 if ( ! class_exists( 'AdminPage' ) ) :
    77                     AdminPage::instance();
    78                 endif;
    79             }
     75
    8076        }
    8177
     
    9086                RenderDataLayerPro::instance();
    9187            endif;
     88            if ( ! class_exists( 'AdminPageReact' ) ) :
     89                AdminPageReact::instance();
     90            endif;
    9291        }
    9392
     
    9897            if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
    9998                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', 'datalayer-for-ecommerce-free/datalayer-for-ecommerce-free.php', true );
     99                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', 'datalayer-for-ecommerce-free/datalayer-for-ecommerce-free.php', true );
    100100            }
    101101        }
  • datalayer-for-ecommerce-free/trunk/src/RegisterTagManager.php

    r2752271 r2986436  
    3838
    3939        /**
    40          * Register Tag Manager
     40         * Return an instance of this class.
    4141         *
    42          * @return RegisterTagManager|null
     42         * @return self::$instance
    4343         */
    4444        public static function instance() {
    45             if ( null === static::$instance ) {
    46                 static::$instance = new static();
     45            if ( null === self::$instance ) {
     46                self::$instance = new self();
    4747            }
    48             return static::$instance;
     48            return self::$instance;
    4949        }
    5050
     
    6767         */
    6868        public function hook_google_tag_manager_head() {
    69             $this->options = get_option( 'tracking_option_pro' );
    70             if ( isset( $this->options['google_tag_manager'] ) && ! empty( $this->options['google_tag_manager'] ) ) {
    71                 if ( $this->options['google_tag_manager'] ) :
    72                     $google_tag_manager = $this->options['google_tag_manager'];
     69            $this->options = get_option( 'options_tracking_option_free' );
     70            if ( isset( $this->options['tracking_google_tag_manager'] ) && ! empty( $this->options['tracking_google_tag_manager'] ) ) {
     71                if ( $this->options['tracking_google_tag_manager'] ) :
     72                    $google_tag_manager = $this->options['tracking_google_tag_manager'];
    7373                    printf(
    7474                        "<!-- Google Tag Manager -->
     
    9191         */
    9292        public function hook_google_tag_manager_body() {
    93             $this->options = get_option( 'tracking_option_pro' );
    94             if ( isset( $this->options['google_tag_manager'] ) && ! empty( $this->options['google_tag_manager'] ) ) {
    95                 if ( $this->options['google_tag_manager'] ) :
    96                     $google_tag_manager = $this->options['google_tag_manager'];
     93            $this->options = get_option( 'options_tracking_option_free' );
     94            if ( isset( $this->options['tracking_google_tag_manager'] ) && ! empty( $this->options['tracking_google_tag_manager'] ) ) {
     95                if ( $this->options['tracking_google_tag_manager'] ) :
     96                    $google_tag_manager = $this->options['tracking_google_tag_manager'];
    9797                    printf(
    9898                        "<!-- Google Tag Manager (noscript) -->
  • datalayer-for-ecommerce-free/trunk/src/RenderCheckout.php

    r2928876 r2986436  
    3636            $visitor_contact_info = array();
    3737
    38             if ( 'Yes' === RenderUser::show_user_info() ) {
     38            if ( RenderUser::show_user_info() ) {
    3939                $email        = $order->get_billing_email();
    4040                $phone_number = $order->get_billing_phone();
     
    7676            $data_layer_ga4 = DataLayer::is_data_layer_ga4();
    7777            $currency_code  = get_option( 'woocommerce_currency' );
    78 
    7978            $items = self::prepare_order_items( $order, $data_layer_ua, $data_layer_ga4);
    8079
  • datalayer-for-ecommerce-free/trunk/src/RenderDataLayerPro.php

    r2788397 r2986436  
    3737         */
    3838        private function __construct() {
    39             $this->options = get_option( 'tracking_option_pro' );
     39            $this->options = get_option( 'options_tracking_option_free' );
    4040            $checked_ua    = 0;
    4141            if ( isset( $this->options['data_layer_google_tag_manager_enhanced_ecommerce'] ) ) {
     
    5252            if ( $checked_ua || $checked_ga4 ) :
    5353                if ( ! $this->has_valid_requirements() ) {
    54                     add_action( 'admin_notices', array( $this, 'show_admin_notice' ) );
     54                    add_action( 'admin_notices', array( Notices::class, 'add_notice_requires_woocommerce_activated' ) );
    5555                    return;
    5656                }
     57
     58                if ( $checked_ua ) :
     59                    add_action('admin_init', array( Notices::class, 'add_notice_datalayer_ua_deprecated' ) );
     60                endif;
     61
    5762                add_action( 'wp_head', array( $this, 'search_page_trigger' ), 30 );
    5863                add_action( 'woocommerce_thankyou', array( $this, 'purchase_trigger' ), 40 );
    5964            endif;
    60         }
    61 
    62         /**
    63          *  Admin Notice
    64          *
    65          * @name 'show_admin_notice'
    66          */
    67         public function show_admin_notice() {
    68             echo "<div class='notice notice-warning is-dismissible'>
    69                 <p><b>DataLayer for WooCommerce FREE</b> requires WooCommerce activated.</p>
    70                 <button type='button' class='notice-dismiss'>
    71                     <span class='screen-reader-text'>Dismiss this notice.</span>
    72                 </button>
    73             </div>";
    7465        }
    7566
     
    10192         */
    10293        public static function instance() {
    103             if ( null === static::$instance ) {
    104                 static::$instance = new static();
     94            if ( null === self::$instance ) {
     95                self::$instance = new self();
    10596            }
    106             return static::$instance;
     97            return self::$instance;
    10798        }
    108 
    109         /** IMPRESSIONS, PRODUCTS */
    11099
    111100        /**
  • datalayer-for-ecommerce-free/trunk/src/RenderProduct.php

    r2888756 r2986436  
    2828        public static function mount_measuring_views_of_product_details_data_layer( $product, $products_related ) {
    2929
    30             $event_id                    = DataLayer::generate_event_id_datalayer();
    31             $data_layer_ua               = DataLayer::is_data_layer_ua();
    32             $data_layer_ga4              = DataLayer::is_data_layer_ga4();
    33             $currency_code               = get_option( 'woocommerce_currency' );
    34 
    35             $category_ids = $product->get_category_ids();
    36             $category     = '';
    37             if ( isset( $category_ids[0] ) ) {
    38                 $category = get_the_category_by_ID( $category_ids[0] );
    39             }
     30            $event_id       = DataLayer::generate_event_id_datalayer();
     31            $data_layer_ua  = DataLayer::is_data_layer_ua();
     32            $data_layer_ga4 = DataLayer::is_data_layer_ga4();
     33            $currency_code  = get_option( 'woocommerce_currency' );
     34            $products       = array( $product );
     35
     36            $impressions = self::prepare_impressions_items( $products, null, 1, $data_layer_ua, $data_layer_ga4, false );
    4037
    4138            if ( $data_layer_ua ) {
     
    6764                        'currencyCode' => $currency_code,
    6865                        'detail'       => array(
    69                             'products' => array(
    70                                 'name'     => $product->get_name(),
    71                                 'id'       => $product->get_id(),
    72                                 'sku'      => $product->get_sku(),
    73                                 'price'    => (float) $product->get_price(),
    74                                 'category' => $category,
    75                                 /** 'variant'=>$variant, */
    76                             ),
     66                            'products' => $impressions
    7767                        ),
    7868                        'impressions'  => $impressions_related,
    7969                    ),
    8070                );
     71                DataLayer::push_to_data_layer( $data_layer );
    8172            }
    8273            if ( $data_layer_ga4 ) {
     
    8677                    'ecommerce' => array(
    8778                        'currency' => $currency_code,
    88                         'items'    => array(
    89                             array(
    90                                 'item_name'     => $product->get_name(),
    91                                 'item_id'       => $product->get_id(),
    92                                 'price'         => (float) $product->get_price(),
    93                                 'item_category' => $category,
    94                                 'quantity'      => 1,
    95                                 /** 'item_variant': Gray, */
    96                             ),
    97                         ),
     79                        'value' => $impressions[0]['price'],
     80                        'items'    => $impressions
    9881                    ),
    9982                );
     83                DataLayer::push_to_data_layer_sleep( $data_layer );
    10084            }
    10185
    102             DataLayer::push_to_data_layer_sleep( $data_layer );
    103 
     86        }
     87
     88        /**
     89         * Prepare impressions items
     90         *
     91         * @param array  $products          Receive products objects.
     92         * @param int|null     $variation_id      Variation_id.
     93         * @param int     $quantity      Variation_id.
     94         * @param boolean $data_layer_ua     Receive datalayer if ua variable.
     95         * @param boolean $data_layer_ga4    Receive datalayer if ga4 variable.
     96         * @param boolean $enqueue_script    Receive enqueue_script if impressions will go to javascript.
     97         * @name 'prepare_impressions_items'
     98         */
     99        public static function prepare_impressions_items( $products, $variation_id, $quantity, $data_layer_ua, $data_layer_ga4, $enqueue_script ) {
     100
     101            $product_brand_taxonomy_slug    = '';
     102            $impressions                    = array();
     103            $count                          = 1;
     104            foreach ( $products as $key => $product ) :
     105                $category_ids     = $product->get_category_ids();
     106                $count_categories = 1;
     107                $category         = array();
     108                foreach ($category_ids as $category_id) {
     109                    $category_key            = ( 1 === $count_categories ) ? 'item_category' : 'item_category' . $count_categories;
     110                    $category[$category_key] = get_the_category_by_ID($category_id);
     111                    $count_categories++;
     112                }
     113
     114                $brand_ids = wc_get_product_term_ids($product->get_id(), $product_brand_taxonomy_slug);
     115                $brand     = '';
     116                if ( isset( $brand_ids[0] ) ) {
     117                    $term = get_term_by('id', $brand_ids[0], $product_brand_taxonomy_slug);
     118                    if ( isset($term) ) {
     119                        $brand = $term->name;
     120                    }
     121                }
     122
     123                $variant = '';
     124                $price   = $product->get_price();
     125
     126                $name = $product->get_name();
     127
     128                $product_id = $product->get_id();
     129
     130                if ( $product->is_type( 'variable' ) && isset( $variation_id ) ) {
     131                    $product_variable = new \WC_Product_Variation( $variation_id );
     132                    $variations_data  = $product_variable->get_attributes();
     133                    $price            = $product_variable->get_price();
     134
     135                    if ( is_array( $variations_data ) && ! empty( $variations_data ) ) {
     136                        foreach ( $variations_data as $variation_data ) {
     137                            if ( end($variations_data) === $variation_data ) {
     138                                $variant .= $variation_data;
     139                            } else {
     140                                $variant .= $variation_data . ',';
     141                            }
     142                        }
     143                    }
     144                }
     145
     146                $list = '';
     147                if ( is_shop() ) {
     148                    $list = 'Shop';
     149                }
     150                if ( is_search() ) {
     151                    $list = 'Search';
     152                }
     153                if ( is_product_category() ) {
     154                    $list = 'Category';
     155                }
     156                if ( is_product_tag() ) {
     157                    $list = 'Tag';
     158                }
     159                if ( is_product() ) {
     160                    $list = 'Product Detail';
     161                }
     162
     163                if ( $data_layer_ua ) {
     164                    $category = '';
     165                    if ( isset( $category_ids[0] ) ) {
     166                        $category = get_the_category_by_ID( $category_ids[0] );
     167                    }
     168                    $impressions[$key] = array(
     169                        'name'     => $name,
     170                        'id'       => $product_id,
     171                        'price'    => (float) $price,
     172                        'brand' => $brand,
     173                        'category' => $category,
     174                        'variant'  => $variant,
     175                        'list'     => $list,
     176                        'position' => $count,
     177                    );
     178                }
     179
     180                if ( $data_layer_ga4 ) {
     181                    $impressions[$key] = array(
     182                        'item_id'        => $product_id,
     183                        'item_name'      => $name,
     184                        'price'          => (float) $price,
     185                        'item_list_name' => $list,
     186                        'index'          => $count,
     187                        'quantity' => $quantity,
     188                        'item_brand' => $brand,
     189                        'item_variant'   => $variant
     190                        /** 'item_list_id' => */
     191                        /** 'discount' => */
     192                    );
     193                    $impressions[$key] += $category;
     194                }
     195
     196                $count++;
     197            endforeach;
     198            return $impressions;
    104199        }
    105200
  • datalayer-for-ecommerce-free/trunk/src/RenderUser.php

    r2928876 r2986436  
    2424         */
    2525        public static function show_user_info() {
    26             $options = get_option( 'tracking_option_pro' );
    27             if ( isset( $options['data_layer_google_tag_manager_show_user_info'] ) ) {
    28                 if ( 'No' === $options['data_layer_google_tag_manager_show_user_info'] ) {
    29                     return 'No';
    30                 }
    31                 return 'Yes';
    32             }
    33             return 'Yes';
     26            $options = get_option( 'options_tracking_option_free' );
     27            return $options['data_layer_google_tag_manager_show_user_info'];
    3428        }
    3529    }
  • datalayer-for-ecommerce-free/trunk/vendor/autoload.php

    r2752271 r2986436  
    33// autoload.php @generated by Composer
    44
     5if (PHP_VERSION_ID < 50600) {
     6    if (!headers_sent()) {
     7        header('HTTP/1.1 500 Internal Server Error');
     8    }
     9    $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
     10    if (!ini_get('display_errors')) {
     11        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
     12            fwrite(STDERR, $err);
     13        } elseif (!headers_sent()) {
     14            echo $err;
     15        }
     16    }
     17    trigger_error(
     18        $err,
     19        E_USER_ERROR
     20    );
     21}
     22
    523require_once __DIR__ . '/composer/autoload_real.php';
    624
  • datalayer-for-ecommerce-free/trunk/vendor/composer/ClassLoader.php

    r2752271 r2986436  
    4343class ClassLoader
    4444{
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
     48    /** @var string|null */
    4549    private $vendorDir;
    4650
    4751    // PSR-4
     52    /**
     53     * @var array<string, array<string, int>>
     54     */
    4855    private $prefixLengthsPsr4 = array();
     56    /**
     57     * @var array<string, list<string>>
     58     */
    4959    private $prefixDirsPsr4 = array();
     60    /**
     61     * @var list<string>
     62     */
    5063    private $fallbackDirsPsr4 = array();
    5164
    5265    // PSR-0
     66    /**
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
     72     */
    5373    private $prefixesPsr0 = array();
     74    /**
     75     * @var list<string>
     76     */
    5477    private $fallbackDirsPsr0 = array();
    5578
     79    /** @var bool */
    5680    private $useIncludePath = false;
     81
     82    /**
     83     * @var array<string, string>
     84     */
    5785    private $classMap = array();
     86
     87    /** @var bool */
    5888    private $classMapAuthoritative = false;
     89
     90    /**
     91     * @var array<string, bool>
     92     */
    5993    private $missingClasses = array();
     94
     95    /** @var string|null */
    6096    private $apcuPrefix;
    6197
     98    /**
     99     * @var array<string, self>
     100     */
    62101    private static $registeredLoaders = array();
    63102
     103    /**
     104     * @param string|null $vendorDir
     105     */
    64106    public function __construct($vendorDir = null)
    65107    {
    66108        $this->vendorDir = $vendorDir;
    67     }
    68 
     109        self::initializeIncludeClosure();
     110    }
     111
     112    /**
     113     * @return array<string, list<string>>
     114     */
    69115    public function getPrefixes()
    70116    {
     
    76122    }
    77123
     124    /**
     125     * @return array<string, list<string>>
     126     */
    78127    public function getPrefixesPsr4()
    79128    {
     
    81130    }
    82131
     132    /**
     133     * @return list<string>
     134     */
    83135    public function getFallbackDirs()
    84136    {
     
    86138    }
    87139
     140    /**
     141     * @return list<string>
     142     */
    88143    public function getFallbackDirsPsr4()
    89144    {
     
    91146    }
    92147
     148    /**
     149     * @return array<string, string> Array of classname => path
     150     */
    93151    public function getClassMap()
    94152    {
     
    97155
    98156    /**
    99      * @param array $classMap Class to filename map
     157     * @param array<string, string> $classMap Class to filename map
     158     *
     159     * @return void
    100160     */
    101161    public function addClassMap(array $classMap)
     
    112172     * appending or prepending to the ones previously set for this prefix.
    113173     *
    114      * @param string       $prefix  The prefix
    115      * @param array|string $paths   The PSR-0 root directories
    116      * @param bool         $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
     177     *
     178     * @return void
    117179     */
    118180    public function add($prefix, $paths, $prepend = false)
    119181    {
     182        $paths = (array) $paths;
    120183        if (!$prefix) {
    121184            if ($prepend) {
    122185                $this->fallbackDirsPsr0 = array_merge(
    123                     (array) $paths,
     186                    $paths,
    124187                    $this->fallbackDirsPsr0
    125188                );
     
    127190                $this->fallbackDirsPsr0 = array_merge(
    128191                    $this->fallbackDirsPsr0,
    129                     (array) $paths
     192                    $paths
    130193                );
    131194            }
     
    136199        $first = $prefix[0];
    137200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    138             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    139202
    140203            return;
     
    142205        if ($prepend) {
    143206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    144                 (array) $paths,
     207                $paths,
    145208                $this->prefixesPsr0[$first][$prefix]
    146209            );
     
    148211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    149212                $this->prefixesPsr0[$first][$prefix],
    150                 (array) $paths
     213                $paths
    151214            );
    152215        }
     
    157220     * appending or prepending to the ones previously set for this namespace.
    158221     *
    159      * @param string       $prefix  The prefix/namespace, with trailing '\\'
    160      * @param array|string $paths   The PSR-4 base directories
    161      * @param bool         $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    162225     *
    163226     * @throws \InvalidArgumentException
     227     *
     228     * @return void
    164229     */
    165230    public function addPsr4($prefix, $paths, $prepend = false)
    166231    {
     232        $paths = (array) $paths;
    167233        if (!$prefix) {
    168234            // Register directories for the root namespace.
    169235            if ($prepend) {
    170236                $this->fallbackDirsPsr4 = array_merge(
    171                     (array) $paths,
     237                    $paths,
    172238                    $this->fallbackDirsPsr4
    173239                );
     
    175241                $this->fallbackDirsPsr4 = array_merge(
    176242                    $this->fallbackDirsPsr4,
    177                     (array) $paths
     243                    $paths
    178244                );
    179245            }
     
    185251            }
    186252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    187             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    188254        } elseif ($prepend) {
    189255            // Prepend directories for an already registered namespace.
    190256            $this->prefixDirsPsr4[$prefix] = array_merge(
    191                 (array) $paths,
     257                $paths,
    192258                $this->prefixDirsPsr4[$prefix]
    193259            );
     
    196262            $this->prefixDirsPsr4[$prefix] = array_merge(
    197263                $this->prefixDirsPsr4[$prefix],
    198                 (array) $paths
     264                $paths
    199265            );
    200266        }
     
    205271     * replacing any others previously set for this prefix.
    206272     *
    207      * @param string       $prefix The prefix
    208      * @param array|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
     275     *
     276     * @return void
    209277     */
    210278    public function set($prefix, $paths)
     
    221289     * replacing any others previously set for this namespace.
    222290     *
    223      * @param string       $prefix The prefix/namespace, with trailing '\\'
    224      * @param array|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    225293     *
    226294     * @throws \InvalidArgumentException
     295     *
     296     * @return void
    227297     */
    228298    public function setPsr4($prefix, $paths)
     
    244314     *
    245315     * @param bool $useIncludePath
     316     *
     317     * @return void
    246318     */
    247319    public function setUseIncludePath($useIncludePath)
     
    266338     *
    267339     * @param bool $classMapAuthoritative
     340     *
     341     * @return void
    268342     */
    269343    public function setClassMapAuthoritative($classMapAuthoritative)
     
    286360     *
    287361     * @param string|null $apcuPrefix
     362     *
     363     * @return void
    288364     */
    289365    public function setApcuPrefix($apcuPrefix)
     
    306382     *
    307383     * @param bool $prepend Whether to prepend the autoloader or not
     384     *
     385     * @return void
    308386     */
    309387    public function register($prepend = false)
     
    325403    /**
    326404     * Unregisters this instance as an autoloader.
     405     *
     406     * @return void
    327407     */
    328408    public function unregister()
     
    339419     *
    340420     * @param  string    $class The name of the class
    341      * @return bool|null True if loaded, null otherwise
     421     * @return true|null True if loaded, null otherwise
    342422     */
    343423    public function loadClass($class)
    344424    {
    345425        if ($file = $this->findFile($class)) {
    346             includeFile($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    347428
    348429            return true;
    349430        }
     431
     432        return null;
    350433    }
    351434
     
    393476
    394477    /**
    395      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    396      *
    397      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    398481     */
    399482    public static function getRegisteredLoaders()
     
    402485    }
    403486
     487    /**
     488     * @param  string       $class
     489     * @param  string       $ext
     490     * @return string|false
     491     */
    404492    private function findFileWithExtension($class, $ext)
    405493    {
     
    467555        return false;
    468556    }
     557
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
     562    {
     563        if (self::$includeFile !== null) {
     564            return;
     565        }
     566
     567        /**
     568         * Scope isolated include.
     569         *
     570         * Prevents access to $this/self from included files.
     571         *
     572         * @param  string $file
     573         * @return void
     574         */
     575        self::$includeFile = \Closure::bind(static function($file) {
     576            include $file;
     577        }, null, null);
     578    }
    469579}
    470 
    471 /**
    472  * Scope isolated include.
    473  *
    474  * Prevents access to $this/self from included files.
    475  */
    476 function includeFile($file)
    477 {
    478     include $file;
    479 }
  • datalayer-for-ecommerce-free/trunk/vendor/composer/InstalledVersions.php

    r2752271 r2986436  
    11<?php
    22
    3 
    4 
    5 
    6 
    7 
    8 
    9 
    10 
    11 
     3/*
     4 * This file is part of Composer.
     5 *
     6 * (c) Nils Adermann <naderman@naderman.de>
     7 *     Jordi Boggiano <j.boggiano@seld.be>
     8 *
     9 * For the full copyright and license information, please view the LICENSE
     10 * file that was distributed with this source code.
     11 */
    1212
    1313namespace Composer;
     
    1616use Composer\Semver\VersionParser;
    1717
    18 
    19 
    20 
    21 
    22 
     18/**
     19 * This class is copied in every Composer installed project and available to all
     20 *
     21 * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
     22 *
     23 * To require its presence, you can require `composer-runtime-api ^2.0`
     24 *
     25 * @final
     26 */
    2327class InstalledVersions
    2428{
    25 private static $installed = array (
    26   'root' =>
    27   array (
    28     'pretty_version' => '1.0.0+no-version-set',
    29     'version' => '1.0.0.0',
    30     'aliases' =>
    31     array (
    32     ),
    33     'reference' => NULL,
    34     'name' => 'heitor/datalayer-for-woocommerce-free',
    35   ),
    36   'versions' =>
    37   array (
    38     'heitor/datalayer-for-woocommerce-free' =>
    39     array (
    40       'pretty_version' => '1.0.0+no-version-set',
    41       'version' => '1.0.0.0',
    42       'aliases' =>
    43       array (
    44       ),
    45       'reference' => NULL,
    46     ),
    47   ),
    48 );
    49 private static $canGetVendors;
    50 private static $installedByVendor = array();
    51 
    52 
    53 
    54 
    55 
    56 
    57 
    58 public static function getInstalledPackages()
    59 {
    60 $packages = array();
    61 foreach (self::getInstalled() as $installed) {
    62 $packages[] = array_keys($installed['versions']);
     29    /**
     30     * @var mixed[]|null
     31     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
     32     */
     33    private static $installed;
     34
     35    /**
     36     * @var bool|null
     37     */
     38    private static $canGetVendors;
     39
     40    /**
     41     * @var array[]
     42     * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
     43     */
     44    private static $installedByVendor = array();
     45
     46    /**
     47     * Returns a list of all package names which are present, either by being installed, replaced or provided
     48     *
     49     * @return string[]
     50     * @psalm-return list<string>
     51     */
     52    public static function getInstalledPackages()
     53    {
     54        $packages = array();
     55        foreach (self::getInstalled() as $installed) {
     56            $packages[] = array_keys($installed['versions']);
     57        }
     58
     59        if (1 === \count($packages)) {
     60            return $packages[0];
     61        }
     62
     63        return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
     64    }
     65
     66    /**
     67     * Returns a list of all package names with a specific type e.g. 'library'
     68     *
     69     * @param  string   $type
     70     * @return string[]
     71     * @psalm-return list<string>
     72     */
     73    public static function getInstalledPackagesByType($type)
     74    {
     75        $packagesByType = array();
     76
     77        foreach (self::getInstalled() as $installed) {
     78            foreach ($installed['versions'] as $name => $package) {
     79                if (isset($package['type']) && $package['type'] === $type) {
     80                    $packagesByType[] = $name;
     81                }
     82            }
     83        }
     84
     85        return $packagesByType;
     86    }
     87
     88    /**
     89     * Checks whether the given package is installed
     90     *
     91     * This also returns true if the package name is provided or replaced by another package
     92     *
     93     * @param  string $packageName
     94     * @param  bool   $includeDevRequirements
     95     * @return bool
     96     */
     97    public static function isInstalled($packageName, $includeDevRequirements = true)
     98    {
     99        foreach (self::getInstalled() as $installed) {
     100            if (isset($installed['versions'][$packageName])) {
     101                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
     102            }
     103        }
     104
     105        return false;
     106    }
     107
     108    /**
     109     * Checks whether the given package satisfies a version constraint
     110     *
     111     * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
     112     *
     113     *   Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
     114     *
     115     * @param  VersionParser $parser      Install composer/semver to have access to this class and functionality
     116     * @param  string        $packageName
     117     * @param  string|null   $constraint  A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
     118     * @return bool
     119     */
     120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
     121    {
     122        $constraint = $parser->parseConstraints((string) $constraint);
     123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
     124
     125        return $provided->matches($constraint);
     126    }
     127
     128    /**
     129     * Returns a version constraint representing all the range(s) which are installed for a given package
     130     *
     131     * It is easier to use this via isInstalled() with the $constraint argument if you need to check
     132     * whether a given version of a package is installed, and not just whether it exists
     133     *
     134     * @param  string $packageName
     135     * @return string Version constraint usable with composer/semver
     136     */
     137    public static function getVersionRanges($packageName)
     138    {
     139        foreach (self::getInstalled() as $installed) {
     140            if (!isset($installed['versions'][$packageName])) {
     141                continue;
     142            }
     143
     144            $ranges = array();
     145            if (isset($installed['versions'][$packageName]['pretty_version'])) {
     146                $ranges[] = $installed['versions'][$packageName]['pretty_version'];
     147            }
     148            if (array_key_exists('aliases', $installed['versions'][$packageName])) {
     149                $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
     150            }
     151            if (array_key_exists('replaced', $installed['versions'][$packageName])) {
     152                $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
     153            }
     154            if (array_key_exists('provided', $installed['versions'][$packageName])) {
     155                $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
     156            }
     157
     158            return implode(' || ', $ranges);
     159        }
     160
     161        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     162    }
     163
     164    /**
     165     * @param  string      $packageName
     166     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
     167     */
     168    public static function getVersion($packageName)
     169    {
     170        foreach (self::getInstalled() as $installed) {
     171            if (!isset($installed['versions'][$packageName])) {
     172                continue;
     173            }
     174
     175            if (!isset($installed['versions'][$packageName]['version'])) {
     176                return null;
     177            }
     178
     179            return $installed['versions'][$packageName]['version'];
     180        }
     181
     182        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     183    }
     184
     185    /**
     186     * @param  string      $packageName
     187     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
     188     */
     189    public static function getPrettyVersion($packageName)
     190    {
     191        foreach (self::getInstalled() as $installed) {
     192            if (!isset($installed['versions'][$packageName])) {
     193                continue;
     194            }
     195
     196            if (!isset($installed['versions'][$packageName]['pretty_version'])) {
     197                return null;
     198            }
     199
     200            return $installed['versions'][$packageName]['pretty_version'];
     201        }
     202
     203        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     204    }
     205
     206    /**
     207     * @param  string      $packageName
     208     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
     209     */
     210    public static function getReference($packageName)
     211    {
     212        foreach (self::getInstalled() as $installed) {
     213            if (!isset($installed['versions'][$packageName])) {
     214                continue;
     215            }
     216
     217            if (!isset($installed['versions'][$packageName]['reference'])) {
     218                return null;
     219            }
     220
     221            return $installed['versions'][$packageName]['reference'];
     222        }
     223
     224        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     225    }
     226
     227    /**
     228     * @param  string      $packageName
     229     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
     230     */
     231    public static function getInstallPath($packageName)
     232    {
     233        foreach (self::getInstalled() as $installed) {
     234            if (!isset($installed['versions'][$packageName])) {
     235                continue;
     236            }
     237
     238            return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
     239        }
     240
     241        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     242    }
     243
     244    /**
     245     * @return array
     246     * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
     247     */
     248    public static function getRootPackage()
     249    {
     250        $installed = self::getInstalled();
     251
     252        return $installed[0]['root'];
     253    }
     254
     255    /**
     256     * Returns the raw installed.php data for custom implementations
     257     *
     258     * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
     259     * @return array[]
     260     * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
     261     */
     262    public static function getRawData()
     263    {
     264        @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
     265
     266        if (null === self::$installed) {
     267            // only require the installed.php file if this file is loaded from its dumped location,
     268            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
     269            if (substr(__DIR__, -8, 1) !== 'C') {
     270                self::$installed = include __DIR__ . '/installed.php';
     271            } else {
     272                self::$installed = array();
     273            }
     274        }
     275
     276        return self::$installed;
     277    }
     278
     279    /**
     280     * Returns the raw data of all installed.php which are currently loaded for custom implementations
     281     *
     282     * @return array[]
     283     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
     284     */
     285    public static function getAllRawData()
     286    {
     287        return self::getInstalled();
     288    }
     289
     290    /**
     291     * Lets you reload the static array from another file
     292     *
     293     * This is only useful for complex integrations in which a project needs to use
     294     * this class but then also needs to execute another project's autoloader in process,
     295     * and wants to ensure both projects have access to their version of installed.php.
     296     *
     297     * A typical case would be PHPUnit, where it would need to make sure it reads all
     298     * the data it needs from this class, then call reload() with
     299     * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
     300     * the project in which it runs can then also use this class safely, without
     301     * interference between PHPUnit's dependencies and the project's dependencies.
     302     *
     303     * @param  array[] $data A vendor/composer/installed.php data set
     304     * @return void
     305     *
     306     * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
     307     */
     308    public static function reload($data)
     309    {
     310        self::$installed = $data;
     311        self::$installedByVendor = array();
     312    }
     313
     314    /**
     315     * @return array[]
     316     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
     317     */
     318    private static function getInstalled()
     319    {
     320        if (null === self::$canGetVendors) {
     321            self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
     322        }
     323
     324        $installed = array();
     325
     326        if (self::$canGetVendors) {
     327            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     328                if (isset(self::$installedByVendor[$vendorDir])) {
     329                    $installed[] = self::$installedByVendor[$vendorDir];
     330                } elseif (is_file($vendorDir.'/composer/installed.php')) {
     331                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     332                    $required = require $vendorDir.'/composer/installed.php';
     333                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
     334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
     335                        self::$installed = $installed[count($installed) - 1];
     336                    }
     337                }
     338            }
     339        }
     340
     341        if (null === self::$installed) {
     342            // only require the installed.php file if this file is loaded from its dumped location,
     343            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
     344            if (substr(__DIR__, -8, 1) !== 'C') {
     345                /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     346                $required = require __DIR__ . '/installed.php';
     347                self::$installed = $required;
     348            } else {
     349                self::$installed = array();
     350            }
     351        }
     352
     353        if (self::$installed !== array()) {
     354            $installed[] = self::$installed;
     355        }
     356
     357        return $installed;
     358    }
    63359}
    64 
    65 
    66 if (1 === \count($packages)) {
    67 return $packages[0];
    68 }
    69 
    70 return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
    71 }
    72 
    73 
    74 
    75 
    76 
    77 
    78 
    79 
    80 
    81 public static function isInstalled($packageName)
    82 {
    83 foreach (self::getInstalled() as $installed) {
    84 if (isset($installed['versions'][$packageName])) {
    85 return true;
    86 }
    87 }
    88 
    89 return false;
    90 }
    91 
    92 
    93 
    94 
    95 
    96 
    97 
    98 
    99 
    100 
    101 
    102 
    103 
    104 
    105 public static function satisfies(VersionParser $parser, $packageName, $constraint)
    106 {
    107 $constraint = $parser->parseConstraints($constraint);
    108 $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    109 
    110 return $provided->matches($constraint);
    111 }
    112 
    113 
    114 
    115 
    116 
    117 
    118 
    119 
    120 
    121 
    122 public static function getVersionRanges($packageName)
    123 {
    124 foreach (self::getInstalled() as $installed) {
    125 if (!isset($installed['versions'][$packageName])) {
    126 continue;
    127 }
    128 
    129 $ranges = array();
    130 if (isset($installed['versions'][$packageName]['pretty_version'])) {
    131 $ranges[] = $installed['versions'][$packageName]['pretty_version'];
    132 }
    133 if (array_key_exists('aliases', $installed['versions'][$packageName])) {
    134 $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
    135 }
    136 if (array_key_exists('replaced', $installed['versions'][$packageName])) {
    137 $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
    138 }
    139 if (array_key_exists('provided', $installed['versions'][$packageName])) {
    140 $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
    141 }
    142 
    143 return implode(' || ', $ranges);
    144 }
    145 
    146 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    147 }
    148 
    149 
    150 
    151 
    152 
    153 public static function getVersion($packageName)
    154 {
    155 foreach (self::getInstalled() as $installed) {
    156 if (!isset($installed['versions'][$packageName])) {
    157 continue;
    158 }
    159 
    160 if (!isset($installed['versions'][$packageName]['version'])) {
    161 return null;
    162 }
    163 
    164 return $installed['versions'][$packageName]['version'];
    165 }
    166 
    167 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    168 }
    169 
    170 
    171 
    172 
    173 
    174 public static function getPrettyVersion($packageName)
    175 {
    176 foreach (self::getInstalled() as $installed) {
    177 if (!isset($installed['versions'][$packageName])) {
    178 continue;
    179 }
    180 
    181 if (!isset($installed['versions'][$packageName]['pretty_version'])) {
    182 return null;
    183 }
    184 
    185 return $installed['versions'][$packageName]['pretty_version'];
    186 }
    187 
    188 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    189 }
    190 
    191 
    192 
    193 
    194 
    195 public static function getReference($packageName)
    196 {
    197 foreach (self::getInstalled() as $installed) {
    198 if (!isset($installed['versions'][$packageName])) {
    199 continue;
    200 }
    201 
    202 if (!isset($installed['versions'][$packageName]['reference'])) {
    203 return null;
    204 }
    205 
    206 return $installed['versions'][$packageName]['reference'];
    207 }
    208 
    209 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    210 }
    211 
    212 
    213 
    214 
    215 
    216 public static function getRootPackage()
    217 {
    218 $installed = self::getInstalled();
    219 
    220 return $installed[0]['root'];
    221 }
    222 
    223 
    224 
    225 
    226 
    227 
    228 
    229 public static function getRawData()
    230 {
    231 return self::$installed;
    232 }
    233 
    234 
    235 
    236 
    237 
    238 
    239 
    240 
    241 
    242 
    243 
    244 
    245 
    246 
    247 
    248 
    249 
    250 
    251 
    252 public static function reload($data)
    253 {
    254 self::$installed = $data;
    255 self::$installedByVendor = array();
    256 }
    257 
    258 
    259 
    260 
    261 private static function getInstalled()
    262 {
    263 if (null === self::$canGetVendors) {
    264 self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
    265 }
    266 
    267 $installed = array();
    268 
    269 if (self::$canGetVendors) {
    270 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
    271 if (isset(self::$installedByVendor[$vendorDir])) {
    272 $installed[] = self::$installedByVendor[$vendorDir];
    273 } elseif (is_file($vendorDir.'/composer/installed.php')) {
    274 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
    275 }
    276 }
    277 }
    278 
    279 $installed[] = self::$installed;
    280 
    281 return $installed;
    282 }
    283 }
  • datalayer-for-ecommerce-free/trunk/vendor/composer/autoload_classmap.php

    r2752271 r2986436  
    33// autoload_classmap.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • datalayer-for-ecommerce-free/trunk/vendor/composer/autoload_namespaces.php

    r2752271 r2986436  
    33// autoload_namespaces.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • datalayer-for-ecommerce-free/trunk/vendor/composer/autoload_psr4.php

    r2752271 r2986436  
    33// autoload_psr4.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • datalayer-for-ecommerce-free/trunk/vendor/composer/autoload_real.php

    r2752271 r2986436  
    2424
    2525        spl_autoload_register(array('ComposerAutoloaderInitb2278d98629c5d3498d64528ec5f980d', 'loadClassLoader'), true, true);
    26         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
     26        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    2727        spl_autoload_unregister(array('ComposerAutoloaderInitb2278d98629c5d3498d64528ec5f980d', 'loadClassLoader'));
    2828
    29         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    30         if ($useStaticLoader) {
    31             require __DIR__ . '/autoload_static.php';
    32 
    33             call_user_func(\Composer\Autoload\ComposerStaticInitb2278d98629c5d3498d64528ec5f980d::getInitializer($loader));
    34         } else {
    35             $map = require __DIR__ . '/autoload_namespaces.php';
    36             foreach ($map as $namespace => $path) {
    37                 $loader->set($namespace, $path);
    38             }
    39 
    40             $map = require __DIR__ . '/autoload_psr4.php';
    41             foreach ($map as $namespace => $path) {
    42                 $loader->setPsr4($namespace, $path);
    43             }
    44 
    45             $classMap = require __DIR__ . '/autoload_classmap.php';
    46             if ($classMap) {
    47                 $loader->addClassMap($classMap);
    48             }
    49         }
     29        require __DIR__ . '/autoload_static.php';
     30        call_user_func(\Composer\Autoload\ComposerStaticInitb2278d98629c5d3498d64528ec5f980d::getInitializer($loader));
    5031
    5132        $loader->register(true);
  • datalayer-for-ecommerce-free/trunk/vendor/composer/installed.php

    r2752271 r2986436  
    1 <?php return array (
    2   'root' =>
    3   array (
    4     'pretty_version' => '1.0.0+no-version-set',
    5     'version' => '1.0.0.0',
    6     'aliases' =>
    7     array (
     1<?php return array(
     2    'root' => array(
     3        'name' => 'heitor/datalayer-for-ecommerce-free',
     4        'pretty_version' => 'dev-master',
     5        'version' => 'dev-master',
     6        'reference' => '12b18987d141fda52ecf348bb0be4c16e4452ea9',
     7        'type' => 'library',
     8        'install_path' => __DIR__ . '/../../',
     9        'aliases' => array(),
     10        'dev' => false,
    811    ),
    9     'reference' => NULL,
    10     'name' => 'heitor/datalayer-for-woocommerce-free',
    11   ),
    12   'versions' =>
    13   array (
    14     'heitor/datalayer-for-woocommerce-free' =>
    15     array (
    16       'pretty_version' => '1.0.0+no-version-set',
    17       'version' => '1.0.0.0',
    18       'aliases' =>
    19       array (
    20       ),
    21       'reference' => NULL,
     12    'versions' => array(
     13        'heitor/datalayer-for-ecommerce-free' => array(
     14            'pretty_version' => 'dev-master',
     15            'version' => 'dev-master',
     16            'reference' => '12b18987d141fda52ecf348bb0be4c16e4452ea9',
     17            'type' => 'library',
     18            'install_path' => __DIR__ . '/../../',
     19            'aliases' => array(),
     20            'dev_requirement' => false,
     21        ),
    2222    ),
    23   ),
    2423);
Note: See TracChangeset for help on using the changeset viewer.