[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/phpbb/extension/ -> metadata_manager.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: 343 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

metadata_manager:: (11 methods):
  __construct()
  get_metadata()
  fetch_metadata_from_file()
  sanitize_json()
  validate()
  validate_authors()
  validate_enable()
  validate_dir()
  validate_require_phpbb()
  validate_require_php()
  output_template_data()


Class: metadata_manager  - X-Ref

The extension metadata manager validates and gets meta-data for extensions

__construct($ext_name, \phpbb\config\config $config, \phpbb\extension\manager $extension_manager, \phpbb\template\template $template = null, \phpbb\user $user, $phpbb_root_path)   X-Ref
Creates the metadata manager

param: string                $ext_name            Name (including vendor) of the extension
param: \phpbb\config\config        $config                phpBB Config instance
param: \phpbb\extension\manager    $extension_manager    An instance of the phpBB extension manager
param: \phpbb\template\template    $template            phpBB Template instance or null
param: \phpbb\user         $user                 User instance
param: string                $phpbb_root_path    Path to the phpbb includes directory.

get_metadata($element = 'all')   X-Ref
Processes and gets the metadata requested

param: string $element            All for all metadata that it has and is valid, otherwise specify which section you want by its shorthand term.
return: array                    Contains all of the requested metadata, throws an exception on failure

fetch_metadata_from_file()   X-Ref
Sets the path of the metadata file, gets its contents and cleans loaded file


sanitize_json(&$value, $key)   X-Ref
Sanitize input from JSON array using htmlspecialchars()

param: mixed        $value    Value of array row
param: string    $key    Key of array row

validate($name = 'display')   X-Ref
Validate fields

param: string $name  ("all" for display and enable validation
return: Bool True if valid, throws an exception if invalid

validate_authors()   X-Ref
Validates the contents of the authors field

return: boolean True when passes validation, throws exception if invalid

validate_enable()   X-Ref
This array handles the verification that this extension can be enabled on this board

return: bool True if validation succeeded, throws an exception if invalid

validate_dir()   X-Ref
Validates the most basic directory structure to ensure it follows <vendor>/<ext> convention.

return: boolean True when passes validation, throws an exception if invalid

validate_require_phpbb()   X-Ref
Validates the contents of the phpbb requirement field

return: boolean True when passes validation, throws an exception if invalid

validate_require_php()   X-Ref
Validates the contents of the php requirement field

return: boolean True when passes validation, throws an exception if invalid

output_template_data()   X-Ref
Outputs the metadata into the template

return: null



Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1