Set the file path to the class

@param string $className
@param string $classPath
@return boolean
@throws \Exception
500306
public function setClass($className, $classPath) {
		$className = strtolower($className);
		$path = null;
		if(
			// Pure object naming with only lib name and exact class name
			existsPathOf(LIBSDIR.$classPath.'/'.$className.'.php', $path) ||
			// Pure object naming
			existsPathOf(LIBSDIR.$classPath.'.php', $path) ||
			// Old Orpheus naming
			existsPathOf(LIBSDIR.$classPath.'_class.php', $path) ||
			// Full path
			existsPathOf(LIBSDIR.$classPath, $path)
		) {
			$this->classes[$className] = $path;
			
		} else {
			throw new \Exception("ClassLoader : File \"{$classPath}\" of class \"{$className}\" not found.");
		}
		return true;
		
	}
223043
public function setDataFile($path)
    {
        if (false === file_exists($path)) {
            throw new \Exception(sprintf("%s does not exist", $path));
        }   
        
        $this->path = $path;
        
        return true;
    }
108192
protected function buildClassPathWithPsr0(array $classNameParts, string $classPath): string
    {
        $fileName = implode('/', $classNameParts) . '.php';

        return $classPath . $fileName;
    }
809072
public function setClassName(string $className): self
    {
        if (!class_exists($className)) {
            throw new \InvalidArgumentException(sprintf(
                'Class %s does not exist',
                $className
            ));
        }
        $this->className = $className;

        return $this;
    }
852955
public void setClasspath(Path src) {
        if (classpath == null) {
            classpath = src;
        } else {
            classpath.append(src);
        }
    }
1113559
protected function classMapFromPath($subPath, $namespace = null)
    {
        $messages = array();
        $classMap = $this->generator->scan($subPath, null, $namespace, $messages);

        if ($messages) {
            foreach ($messages as $message) {
                $this->report->warn(new GenericViolation($message));
            }
        }

        foreach ($classMap as $class => $file) {
            try {
                $this->classMap->add($class, $file);
            } catch (ClassAlreadyRegisteredException $exception) {
                $this->report->append(
                    new ClassAddedMoreThanOnceViolation(
                        $this->getName(),
                        $class,
                        array(
                            $exception->getFileName(),
                            $file
                        )
                    )
                );
            }
        }

        return $classMap;
    }
762772
public function setFilePath($filepath)
    {
        if (!isset($filepath) || empty($filepath)) {
            throw new PageCacheException(__CLASS__ . ' file path not set or empty');
        }

        $this->filepath = $filepath;
    }
682906
public function locate($class, $basepath = null)
    {
        if (substr($class, 0, 3) === 'Mod')
        {
            /*
             * Exception rule for Exception classes
             *
             * Transform class to lower case to always load the exception class from the /exception/ folder.
             */
            if ($pos = strpos($class, 'Exception'))
            {
                $filename = substr($class, $pos + strlen('Exception'));
                $class    = str_replace($filename, ucfirst(strtolower($filename)), $class);
            }

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

            array_shift($parts);
            $package   = array_shift($parts);
            $namespace = ucfirst($package);

            $module = 'mod_'.$package;
            $file 	= array_pop($parts);

            if(count($parts))
            {
                if($parts[0] === 'view') {
                    $parts[0] = KStringInflector::pluralize($parts[0]);
                }

                $path = implode('/', $parts);
                $path = $path.'/'.$file;
            }
            else $path = $file;

            //Switch basepath
            if(!$this->getNamespace($namespace)) {
                $basepath = $this->getNamespace('\\');
            } else {
                $basepath = $this->getNamespace($namespace);
            }

            return $basepath.'/'.$module.'/'.$path.'.php';
        }

        return false;
    }
947047
public static function fromFile( string $filename, $className )
	{
		$zipArchive = new ZipArchive();

		try
		{
			if ( $zipArchive->open( $filename ) !== true )
			{
				$zipArchive = false;
				throw new Exception("An attempt has been made to open an invalid zip file");
			}
			return self::fromZip( $zipArchive, $className );
		}
		catch ( Exception $ex )
		{
			if ( $zipArchive ) $zipArchive->close();
			throw XBRL_TaxonomyPackageException::withError( "tpe:invalidArchiveFormat", $ex->getMessage() );
		}

		return false;
	}
419942
public function createClasspath(): \Path
    {
        if ($this->classpath === null) {
            $this->classpath = new Path();
        }

        return $this->classpath->createPath();
    }
493687
public function setBasePath($basePath = null) {
        if ($basePath === null) {
            $filename = (isset($this->SERVER['SCRIPT_FILENAME']))
                      ? basename($this->SERVER['SCRIPT_FILENAME'])
                      : '';

            $baseUrl = $this->getBaseUrl();
            if (empty($baseUrl)) {
                $this->_basePath = '';
                return $this;
            }

            if (basename($baseUrl) === $filename) {
                $basePath = dirname($baseUrl);
            } else {
                $basePath = $baseUrl;
            }
        }

        if (substr(PHP_OS, 0, 3) === 'WIN') {
            $basePath = str_replace('\\', '/', $basePath);
        }

        $this->_basePath = rtrim($basePath, '/');
        return $this;
    }
592385
public function setPath($path)
        {
            if (realpath($path) === false) {
                throw new Exception("Path must be absolute.");
            }

            $this->_path = realpath($path) . DS;
            return $this;
        }
1137788
public function setBackupPath($filePath)
    {
        $path = realpath(dirname($filePath));
        if (!is_dir($path)) {
            throw new FilesystemException(sprintf(
                'The backup directory does not exist: %s.', $path
            ));
        }
        if (!is_writable($path)) {
            throw new FilesystemException(sprintf(
                'The backup directory is not writeable: %s.', $path
            ));
        }
        $this->backupPath = $filePath;
    }
43282
public static File getFileFromDirectoryInClassPath(String fileName, String classPath) {

		Collection<String> paths = StringSupport.split(classPath, ";:", false);

		for(String singlePath : paths) {
			File dir = new File(singlePath);
			if (dir.isDirectory()) {
				File file = new File(singlePath + '/' + fileName);
				if (file.exists()) {
					return file;
				}
			}
		}
		return null;
	}
791385
public function setLogFile($filePath)
    {
        if ($this->logFile != $filePath && $this->fp) {
            @fclose($this->fp);
            $this->fp = null;
        }
        $logDir = dirname($filePath);
        if (!file_exists($logDir)) {
            @mkdir($logDir, 0755, true);
        }

        if (!file_exists($logDir)) {
            throw new Exception(sprintf('Can\'t create log directory "%s".', $logDir), 'logger');
        }

        if (!$this->fp = @fopen($filePath, 'a+')) {
            throw new Exception(sprintf('Can\'t create log file "%s".', $filePath), 'logger');
        }

        $this->logFile = $filePath;
        return $this;
    }
1202991
public function setPath( $path )
	{
#		if( $path && !file_exists( $path ) )
#			throw new RuntimeException( 'Invalid path' );
		$path	= str_replace( DIRECTORY_SEPARATOR, "/", $path );
		$path	= preg_replace( "@(.+)/$@", "\\1", $path )."/";
		$this->path	= $path;
	}
1286168
private function prepareStoragePathForClass($className)
    {
        $filePath = $this->buildStoragePath($className);
        if (!file_exists($filePath)) {
            mkdir($filePath, $this->fileModeBits, true);
        }
        return $filePath;
    }