• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WooCommerce a2z

WooCommerce a2z

WooCommerce

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / ClassLoader::findFile() – Finds the path to the file where the class is defined.

You appear to be a bot. Output may be restricted

Description

Finds the path to the file where the class is defined.

Usage

$string|false = ClassLoader::findFile( $class );

Parameters

$class
( string ) required – The name of the class

Returns

string|false The path if found, false otherwise

Source

File name: woocommerce/packages/woocommerce-admin/vendor/composer/ClassLoader.php
Lines:

1 to 34 of 34
    public function findFile($class)
    {
        // class map lookup
        if (isset($this->classMap[$class])) {
            return $this->classMap[$class];
        }
        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
            return false;
        }
        if (null !== $this->apcuPrefix) {
            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
            if ($hit) {
                return $file;
            }
        }

        $file = $this->findFileWithExtension($class, '.php');

        // Search for Hack files if we are running on HHVM
        if (false === $file && defined('HHVM_VERSION')) {
            $file = $this->findFileWithExtension($class, '.hh');
        }

        if (null !== $this->apcuPrefix) {
            apcu_add($this->apcuPrefix.$class, $file);
        }

        if (false === $file) {
            // Remember that this class does not exist.
            $this->missingClasses[$class] = true;
        }

        return $file;
    }
 

 View on GitHub View on Trac

Published: 26th November 2019 | Last updated: 6th April 2020

Primary Sidebar

Information

Function name: ClassLoader::findFile
Class ref: ClassLoader
Plugin ref: WooCommerce
Version: 4.8.0
Sourcefile: packages/woocommerce-admin/vendor/composer/ClassLoader.php
File ref: packages/woocommerce-admin/vendor/composer/ClassLoader.php
Deprecated?: No
API Letters: C,F

Footer

WooCommerce a2z
WooCommerce a2z
WooCommerce
WordPress 5.6
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  woocommerce.wp-a2z.org
© Copyright WooCommerce a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites