[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/phpbb/ -> finder.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 547 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

finder:: (21 methods):
  __construct()
  set_extensions()
  core_path()
  suffix()
  extension_suffix()
  core_suffix()
  prefix()
  extension_prefix()
  core_prefix()
  directory()
  extension_directory()
  core_directory()
  sanitise_directory()
  get_classes()
  get_classes_from_files()
  get_directories()
  get_files()
  find_with_root_path()
  find()
  find_from_extension()
  find_from_paths()


Class: finder  - X-Ref

The finder provides a simple way to locate files in the core and a set of extensions

__construct(\phpbb\filesystem\filesystem_interface $filesystem, $phpbb_root_path = '', \phpbb\cache\service $cache = null, $php_ext = 'php', $cache_name = '_ext_finder')   X-Ref
Creates a new finder instance with its dependencies

param: \phpbb\filesystem\filesystem_interface $filesystem Filesystem instance
param: string $phpbb_root_path Path to the phpbb root directory
param: \phpbb\cache\service $cache A cache instance or null
param: string $php_ext php file extension
param: string $cache_name The name of the cache variable, defaults to

set_extensions(array $extensions, $replace_list = true)   X-Ref
Set the array of extensions

param: array $extensions        A list of extensions that should be searched as well
param: bool $replace_list        Should the list be emptied before adding the extensions
return: \phpbb\finder This object for chaining calls

core_path($core_path)   X-Ref
Sets a core path to be searched in addition to extensions

param: string $core_path The path relative to phpbb_root_path
return: \phpbb\finder This object for chaining calls

suffix($suffix)   X-Ref
Sets the suffix all files found in extensions and core must match.

There is no default file extension, so to find PHP files only, you will
have to specify .php as a suffix. However when using get_classes, the .php
file extension is automatically added to suffixes.

param: string $suffix A filename suffix
return: \phpbb\finder This object for chaining calls

extension_suffix($extension_suffix)   X-Ref
Sets a suffix all files found in extensions must match

There is no default file extension, so to find PHP files only, you will
have to specify .php as a suffix. However when using get_classes, the .php
file extension is automatically added to suffixes.

param: string $extension_suffix A filename suffix
return: \phpbb\finder This object for chaining calls

core_suffix($core_suffix)   X-Ref
Sets a suffix all files found in the core path must match

There is no default file extension, so to find PHP files only, you will
have to specify .php as a suffix. However when using get_classes, the .php
file extension is automatically added to suffixes.

param: string $core_suffix A filename suffix
return: \phpbb\finder This object for chaining calls

prefix($prefix)   X-Ref
Sets the prefix all files found in extensions and core must match

param: string $prefix A filename prefix
return: \phpbb\finder This object for chaining calls

extension_prefix($extension_prefix)   X-Ref
Sets a prefix all files found in extensions must match

param: string $extension_prefix A filename prefix
return: \phpbb\finder This object for chaining calls

core_prefix($core_prefix)   X-Ref
Sets a prefix all files found in the core path must match

param: string $core_prefix A filename prefix
return: \phpbb\finder This object for chaining calls

directory($directory)   X-Ref
Sets a directory all files found in extensions and core must be contained in

Automatically sets the core_directory if its value does not differ from
the current directory.

param: string $directory
return: \phpbb\finder This object for chaining calls

extension_directory($extension_directory)   X-Ref
Sets a directory all files found in extensions must be contained in

param: string $extension_directory
return: \phpbb\finder This object for chaining calls

core_directory($core_directory)   X-Ref
Sets a directory all files found in the core path must be contained in

param: string $core_directory
return: \phpbb\finder This object for chaining calls

sanitise_directory($directory)   X-Ref
Removes occurrences of /./ and makes sure path ends without trailing slash

param: string $directory A directory pattern
return: string A cleaned up directory pattern

get_classes($cache = true)   X-Ref
Finds classes matching the configured options if they follow phpBB naming rules.

The php file extension is automatically added to suffixes.

Note: If a file is matched but contains a class name not following the
phpBB naming rules an incorrect class name will be returned.

param: bool $cache Whether the result should be cached
return: array An array of found class names

get_classes_from_files($files)   X-Ref
Get class names from a list of files

param: array $files Array of files (from find())
return: array Array of class names

get_directories($cache = true, $extension_keys = false)   X-Ref
Finds all directories matching the configured options

param: bool $cache Whether the result should be cached
param: bool $extension_keys Whether the result should have extension name as array key
return: array An array of paths to found directories

get_files($cache = true)   X-Ref
Finds all files matching the configured options.

param: bool $cache Whether the result should be cached
return: array An array of paths to found files

find_with_root_path($cache = true, $is_dir = false, $extension_keys = false)   X-Ref
A wrapper around the general find which prepends a root path to results

param: bool $cache Whether the result should be cached
param: bool $is_dir Directories will be returned when true, only files
param: bool $extension_keys If true, result will be associative array
return: array An array of paths to found items

find($cache = true, $is_dir = false)   X-Ref
Finds all file system entries matching the configured options

param: bool $cache Whether the result should be cached
param: bool $is_dir Directories will be returned when true, only files
return: array An array of paths to found items

find_from_extension($extension_name, $extension_path, $cache = true, $is_dir = false)   X-Ref
Finds all file system entries matching the configured options for one
specific extension

param: string $extension_name Name of the extension
param: string $extension_path Relative path to the extension root directory
param: bool $cache Whether the result should be cached
param: bool $is_dir Directories will be returned when true, only files
return: array An array of paths to found items

find_from_paths($extensions, $cache = true, $is_dir = false)   X-Ref
Finds all file system entries matching the configured options from
an array of paths

param: array $extensions Array of extensions (name => full relative path)
param: bool $cache Whether the result should be cached
param: bool $is_dir Directories will be returned when true, only files
return: array An array of paths to found items



Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1