Retrieve the class path in the application pool.

@param string $pClassName Class name
@return string Class path
169334
private static function _loadFromApp($pClassName)
    {
        $classNameArr = explode('_', StringData::fromCamelCase($pClassName));
        $pool         = array_pop($classNameArr);

        return APP_PATH
               . Agl::APP_PHP_DIR
               . $pool
               . DS
               . implode(DS, $classNameArr)
               . Agl::PHP_EXT;
    }
1180844
protected function getReflectionClass($className) {
		if (isset($this->reflectionClasses[$className])) {
			return $this->reflectionClasses[$className];
		}

		try {
			$reflectionClass = new ReflectionClass($className);
		} catch (ReflectionException $e) {
			throw new NotFoundException("Class $className is not found");
		}

		if (!$reflectionClass->isInstantiable()) {
			throw new NotInstantiableException("$className is not an instantiable class");
		}

		$this->reflectionClasses[$className] = $reflectionClass;

		return $reflectionClass;
	}
243009
public function fetchClass(string $classname) :? object
    {
        $this->stmt->setFetchMode(\PDO::FETCH_CLASS, $classname);
        return $this->fetch();
    }
690970
private function getOptionsFromClass($sClassName)
    {
        if(!key_exists($sClassName, $this->aClassOptions))
        {
            return null; // Class not registered
        }
        return $this->aClassOptions[$sClassName];
    }
425391
protected function getClassSchema($className)
    {
        $classSchema = $this->reflectionService->getClassSchema($className);
        if (!$classSchema) {
            throw new ClassSchemaNotFoundException('No class schema found for "' . $className . '".', 1295973082);
        }

        return $classSchema;
    }
1216977
public static function getMailerClassName($className)
    {
        if (class_exists($className)) {
            return $className;
        }

        // replace underscores with namespace marker, PSR-0 style
        $fullyQualified = '\\Omnimail\\' . str_replace('_', '\\', $className);
        if (!class_exists($fullyQualified)) {
            $fullyQualified = $fullyQualified . '\\Mailer';
            if (!class_exists($fullyQualified)) {
                throw new \Exception("Class '${className}' not found");
            }
        }

        return $fullyQualified;
    }
304656
public function GetConfigurationFilePath($fileName) {
        return "APP_ROOT_DIR" . \Puzzlout\Framework\Enums\ApplicationFolderName::AppsFolderName . \Puzzlout\Framework\Helpers\CommonHelper::GetAppName() . '/Config/' . $fileName;
    }
79300
public function getProxyClassName($className)
    {
        $suffix = ltrim($className, '\\');
        
        if ($this->proxyClassSuffix !== null) {
            $suffix .= $this->proxyClassSuffix;    
        }
        
        return rtrim($this->proxyNamespace, '\\') . '\\'.self::MARKER.'\\' . $suffix;
    }
682395
protected function getClassName($className) {
        if (strpos($className, ':') !== false) {
           list($namespaceAlias, $simpleClassName) = explode(':', $className);
           $className = $this->doctrine->getManager()->getConfiguration()
               ->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
        }
        return $className;
    }
1115166
private function extractClass(string $className): string
    {
        // If class name contain ":" symbol
        if (strpos($className, ':') !== false) {
            $classArray = explode(':', $className);
            $className = $classArray[0];
        }
        return $className;
    }
1216823
private static function getClassName($filename)
    {
        $directoriesAndFilename = explode('/', $filename);
        $filename = array_pop($directoriesAndFilename);
        $nameAndExtension = explode('.', $filename);
        $className = array_shift($nameAndExtension);

        return $className;
    }
58410
public static function getClassName($className)
    {
        if (is_object($className)) {
            $className = get_class($className);
        }
        $className = array_slice(explode('\\', $className), - 1);
        return $className[0];
    }
281885
public function findPath($classname, $basepath = null)
    {
        $path = false;

        $word = preg_replace('/(?<=\\w)([A-Z])/', ' \\1', $classname);
        $parts = explode(' ', $word);

        // If class start with a 'An' it is a anahita framework class and we handle it
        if (array_shift($parts) == $this->_prefix) {
            $path = strtolower(implode('/', $parts));

            if (count($parts) == 1) {
                $path = $path.'/'.$path;
            }

            if (!is_file($this->_basepath.'/'.$path.'.php')) {
                $path = $path.'/'.strtolower(array_pop($parts));
            }

            $path = $this->_basepath.'/'.$path.'.php';
        }

        return $path;
    }
262847
public function autoload($pClassName)
    {
        if(strpos($pClassName, '_') !== false){
            
    		$tokens = explode("_", $pClassName);
    		$size = count($tokens);
    		$path = '';
    		for ( $i = 0 ; $i<$size-1 ; $i++){
    			$path .= $tokens[$i].'/';
    		}
    		
            // Search for class.X.php
    		$filePath = '/' . $path . 'class.'.$tokens[$size-1] . '.php';
    		if (file_exists($this->root .'generis'.DIRECTORY_SEPARATOR .$filePath)){
    			require_once $this->root .'generis'.DIRECTORY_SEPARATOR .$filePath;
    			return;
    		}
            
            // Search for interface.X.php
    		$filePathInterface = '/' . $path . 'interface.'.$tokens[$size-1] . '.php';
    		if (file_exists($this->root .'generis'.DIRECTORY_SEPARATOR .$filePathInterface)){
    			require_once $this->root .'generis'.DIRECTORY_SEPARATOR .$filePathInterface;
    			return;
    		}
            
            // Search for trait.X.php
            $filePathTrait = '/' . $path . 'trait.'.$tokens[$size-1] . '.php';
    		if (file_exists($this->root .'generis'.DIRECTORY_SEPARATOR .$filePathTrait)){
    			require_once $this->root .'generis'.DIRECTORY_SEPARATOR .$filePathTrait;
    			return;
    		}
    		
    		if (file_exists($this->root .$filePath)){
    			require_once $this->root .$filePath;
    			return;
    		} elseif (file_exists($this->root .$filePathInterface)){
    		        require_once $this->root .$filePathInterface;
    		        return;
    		}
    		
    		$legacyPrefix = false;
    		foreach ($this->legacyPrefixes as $key => $namespace) {
    		    if (substr($pClassName, 0, strlen($key)) == $key) {
    		        $newClass = $namespace.strtr(substr($pClassName, strlen($key)), '_', '\\');
    		        $this->wrapClass($pClassName, $newClass);
    		        return;
    		    }
    		}
    	}
    }
928307
protected final function fileName(string $className): string
    {
        $fileName = "";
        if (array_key_exists($className, $this->className)) {
            $fileName = $this->className[$className];
            $this->removeClass($className);
        }
        return $fileName;
    }
1098201
public function getPathForFutureClass(string $className)
    {
        $classLoader = $this->getClassLoader();

        // lookup is obviously modeled off of Composer's autoload logic
        foreach ($classLoader->getPrefixesPsr4() as $prefix => $paths) {
            if (0 === strpos($className, $prefix)) {
                return $paths[0].'/'.str_replace('\\', '/', substr($className, \strlen($prefix))).'.php';
            }
        }

        foreach ($classLoader->getPrefixes() as $prefix => $paths) {
            if (0 === strpos($className, $prefix)) {
                return $paths[0].'/'.str_replace('\\', '/', $className).'.php';
            }
        }

        if ($classLoader->getFallbackDirsPsr4()) {
            return $classLoader->getFallbackDirsPsr4()[0].'/'.str_replace('\\', '/', $className).'.php';
        }

        if ($classLoader->getFallbackDirs()) {
            return $classLoader->getFallbackDirs()[0].'/'.str_replace('\\', '/', $className).'.php';
        }

        return null;
    }
543560
private function getClassName($methodName)
    {
        $parts = explode($this->separator, $methodName);
        array_pop($parts); // Remove method

        foreach ($parts as &$part) {
            $part = ucwords($part);
        }

        return $this->namespace . join('\\', $parts);
    }