[ Index ]

PHP Cross Reference of phpBB-3.2.0-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

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

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

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

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.

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

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.

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

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.

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

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

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

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

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

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

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

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.

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

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

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

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

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

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

return: string A cleaned up directory pattern
param: string $directory A 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.

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

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

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

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

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

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

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

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

return: array An array of paths to found items
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

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

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

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

return: array An array of paths to found items
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

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

return: array An array of paths to found items
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



Generated: Sun Feb 19 19:47:08 2017 Cross-referenced by PHPXref 0.7.1