Last active
August 3, 2021 20:40
-
-
Save jasenmichael/851282b82c7059e41a9a89efcaf1f6ce to your computer and use it in GitHub Desktop.
to get VsCode snippets and intellesense for wordpress and acf php functions - add this file to your theme or plugin directory and install PHP Intelephense vscode extention.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* to get VsCode snippets and intellesense for wordpress and acf php functions | |
* add this file to your theme or plugin directory and install PHP Intelephense vscode extention. | |
* | |
* Generated stub declarations for WordPress. | |
* https://wordpress.org | |
* https://gist.githubusercontent.com/jasenmichael/851282b82c7059e41a9a89efcaf1f6ce/raw/d841c986ec1e11aa3b73b2203dd6e08ede17cafc/wp_stubs.php | |
*/ | |
/** | |
* The custom background script. | |
* | |
* @package WordPress | |
* @subpackage Administration | |
*/ | |
/** | |
* The custom background class. | |
* | |
* @since 3.0.0 | |
*/ | |
class Custom_Background | |
{ | |
/** | |
* Callback for administration header. | |
* | |
* @var callable | |
* @since 3.0.0 | |
*/ | |
public $admin_header_callback; | |
/** | |
* Callback for header div. | |
* | |
* @var callable | |
* @since 3.0.0 | |
*/ | |
public $admin_image_div_callback; | |
/** | |
* Used to trigger a success message when settings updated and set to true. | |
* | |
* @since 3.0.0 | |
* @var bool | |
*/ | |
private $updated; | |
/** | |
* Constructor - Register administration header callback. | |
* | |
* @since 3.0.0 | |
* @param callable $admin_header_callback | |
* @param callable $admin_image_div_callback Optional custom image div output callback. | |
*/ | |
public function __construct($admin_header_callback = '', $admin_image_div_callback = '') | |
{ | |
} | |
/** | |
* Set up the hooks for the Custom Background admin page. | |
* | |
* @since 3.0.0 | |
*/ | |
public function init() | |
{ | |
} | |
/** | |
* Set up the enqueue for the CSS & JavaScript files. | |
* | |
* @since 3.0.0 | |
*/ | |
public function admin_load() | |
{ | |
} | |
/** | |
* Execute custom background modification. | |
* | |
* @since 3.0.0 | |
*/ | |
public function take_action() | |
{ | |
} | |
/** | |
* Display the custom background page. | |
* | |
* @since 3.0.0 | |
*/ | |
public function admin_page() | |
{ | |
} | |
/** | |
* Handle an Image upload for the background image. | |
* | |
* @since 3.0.0 | |
*/ | |
public function handle_upload() | |
{ | |
} | |
/** | |
* Ajax handler for adding custom background context to an attachment. | |
* | |
* Triggers when the user adds a new background image from the | |
* Media Manager. | |
* | |
* @since 4.1.0 | |
*/ | |
public function ajax_background_add() | |
{ | |
} | |
/** | |
* @since 3.4.0 | |
* @deprecated 3.5.0 | |
* | |
* @param array $form_fields | |
* @return array $form_fields | |
*/ | |
public function attachment_fields_to_edit($form_fields) | |
{ | |
} | |
/** | |
* @since 3.4.0 | |
* @deprecated 3.5.0 | |
* | |
* @param array $tabs | |
* @return array $tabs | |
*/ | |
public function filter_upload_tabs($tabs) | |
{ | |
} | |
/** | |
* @since 3.4.0 | |
* @deprecated 3.5.0 | |
*/ | |
public function wp_set_background_image() | |
{ | |
} | |
} | |
/** | |
* The custom header image script. | |
* | |
* @package WordPress | |
* @subpackage Administration | |
*/ | |
/** | |
* The custom header image class. | |
* | |
* @since 2.1.0 | |
*/ | |
class Custom_Image_Header | |
{ | |
/** | |
* Callback for administration header. | |
* | |
* @var callable | |
* @since 2.1.0 | |
*/ | |
public $admin_header_callback; | |
/** | |
* Callback for header div. | |
* | |
* @var callable | |
* @since 3.0.0 | |
*/ | |
public $admin_image_div_callback; | |
/** | |
* Holds default headers. | |
* | |
* @var array | |
* @since 3.0.0 | |
*/ | |
public $default_headers = array(); | |
/** | |
* Used to trigger a success message when settings updated and set to true. | |
* | |
* @since 3.0.0 | |
* @var bool | |
*/ | |
private $updated; | |
/** | |
* Constructor - Register administration header callback. | |
* | |
* @since 2.1.0 | |
* @param callable $admin_header_callback | |
* @param callable $admin_image_div_callback Optional custom image div output callback. | |
*/ | |
public function __construct($admin_header_callback, $admin_image_div_callback = '') | |
{ | |
} | |
/** | |
* Set up the hooks for the Custom Header admin page. | |
* | |
* @since 2.1.0 | |
*/ | |
public function init() | |
{ | |
} | |
/** | |
* Adds contextual help. | |
* | |
* @since 3.0.0 | |
*/ | |
public function help() | |
{ | |
} | |
/** | |
* Get the current step. | |
* | |
* @since 2.6.0 | |
* | |
* @return int Current step | |
*/ | |
public function step() | |
{ | |
} | |
/** | |
* Set up the enqueue for the JavaScript files. | |
* | |
* @since 2.1.0 | |
*/ | |
public function js_includes() | |
{ | |
} | |
/** | |
* Set up the enqueue for the CSS files | |
* | |
* @since 2.7.0 | |
*/ | |
public function css_includes() | |
{ | |
} | |
/** | |
* Execute custom header modification. | |
* | |
* @since 2.6.0 | |
*/ | |
public function take_action() | |
{ | |
} | |
/** | |
* Process the default headers | |
* | |
* @since 3.0.0 | |
* | |
* @global array $_wp_default_headers | |
*/ | |
public function process_default_headers() | |
{ | |
} | |
/** | |
* Display UI for selecting one of several default headers. | |
* | |
* Show the random image option if this theme has multiple header images. | |
* Random image option is on by default if no header has been set. | |
* | |
* @since 3.0.0 | |
* | |
* @param string $type The header type. One of 'default' (for the Uploaded Images control) | |
* or 'uploaded' (for the Uploaded Images control). | |
*/ | |
public function show_header_selector($type = 'default') | |
{ | |
} | |
/** | |
* Execute JavaScript depending on step. | |
* | |
* @since 2.1.0 | |
*/ | |
public function js() | |
{ | |
} | |
/** | |
* Display JavaScript based on Step 1 and 3. | |
* | |
* @since 2.6.0 | |
*/ | |
public function js_1() | |
{ | |
} | |
/** | |
* Display JavaScript based on Step 2. | |
* | |
* @since 2.6.0 | |
*/ | |
public function js_2() | |
{ | |
} | |
/** | |
* Display first step of custom header image page. | |
* | |
* @since 2.1.0 | |
*/ | |
public function step_1() | |
{ | |
} | |
/** | |
* Display second step of custom header image page. | |
* | |
* @since 2.1.0 | |
*/ | |
public function step_2() | |
{ | |
} | |
/** | |
* Upload the file to be cropped in the second step. | |
* | |
* @since 3.4.0 | |
*/ | |
public function step_2_manage_upload() | |
{ | |
} | |
/** | |
* Display third step of custom header image page. | |
* | |
* @since 2.1.0 | |
* @since 4.4.0 Switched to using wp_get_attachment_url() instead of the guid | |
* for retrieving the header image URL. | |
*/ | |
public function step_3() | |
{ | |
} | |
/** | |
* Display last step of custom header image page. | |
* | |
* @since 2.1.0 | |
*/ | |
public function finished() | |
{ | |
} | |
/** | |
* Display the page based on the current step. | |
* | |
* @since 2.1.0 | |
*/ | |
public function admin_page() | |
{ | |
} | |
/** | |
* Unused since 3.5.0. | |
* | |
* @since 3.4.0 | |
* | |
* @param array $form_fields | |
* @return array $form_fields | |
*/ | |
public function attachment_fields_to_edit($form_fields) | |
{ | |
} | |
/** | |
* Unused since 3.5.0. | |
* | |
* @since 3.4.0 | |
* | |
* @param array $tabs | |
* @return array $tabs | |
*/ | |
public function filter_upload_tabs($tabs) | |
{ | |
} | |
/** | |
* Choose a header image, selected from existing uploaded and default headers, | |
* or provide an array of uploaded header data (either new, or from media library). | |
* | |
* @since 3.4.0 | |
* | |
* @param mixed $choice Which header image to select. Allows for values of 'random-default-image', | |
* for randomly cycling among the default images; 'random-uploaded-image', for randomly cycling | |
* among the uploaded images; the key of a default image registered for that theme; and | |
* the key of an image uploaded for that theme (the attachment ID of the image). | |
* Or an array of arguments: attachment_id, url, width, height. All are required. | |
*/ | |
public final function set_header_image($choice) | |
{ | |
} | |
/** | |
* Remove a header image. | |
* | |
* @since 3.4.0 | |
*/ | |
public final function remove_header_image() | |
{ | |
} | |
/** | |
* Reset a header image to the default image for the theme. | |
* | |
* This method does not do anything if the theme does not have a default header image. | |
* | |
* @since 3.4.0 | |
*/ | |
public final function reset_header_image() | |
{ | |
} | |
/** | |
* Calculate width and height based on what the currently selected theme supports. | |
* | |
* @since 3.9.0 | |
* | |
* @param array $dimensions | |
* @return array dst_height and dst_width of header image. | |
*/ | |
public final function get_header_dimensions($dimensions) | |
{ | |
} | |
/** | |
* Create an attachment 'object'. | |
* | |
* @since 3.9.0 | |
* | |
* @param string $cropped Cropped image URL. | |
* @param int $parent_attachment_id Attachment ID of parent image. | |
* @return array Attachment object. | |
*/ | |
public final function create_attachment_object($cropped, $parent_attachment_id) | |
{ | |
} | |
/** | |
* Insert an attachment and its metadata. | |
* | |
* @since 3.9.0 | |
* | |
* @param array $object Attachment object. | |
* @param string $cropped Cropped image URL. | |
* @return int Attachment ID. | |
*/ | |
public final function insert_attachment($object, $cropped) | |
{ | |
} | |
/** | |
* Gets attachment uploaded by Media Manager, crops it, then saves it as a | |
* new object. Returns JSON-encoded object details. | |
* | |
* @since 3.9.0 | |
*/ | |
public function ajax_header_crop() | |
{ | |
} | |
/** | |
* Given an attachment ID for a header image, updates its "last used" | |
* timestamp to now. | |
* | |
* Triggered when the user tries adds a new header image from the | |
* Media Manager, even if s/he doesn't save that change. | |
* | |
* @since 3.9.0 | |
*/ | |
public function ajax_header_add() | |
{ | |
} | |
/** | |
* Given an attachment ID for a header image, unsets it as a user-uploaded | |
* header image for the current theme. | |
* | |
* Triggered when the user clicks the overlay "X" button next to each image | |
* choice in the Customizer's Header tool. | |
* | |
* @since 3.9.0 | |
*/ | |
public function ajax_header_remove() | |
{ | |
} | |
/** | |
* Updates the last-used postmeta on a header image attachment after saving a new header image via the Customizer. | |
* | |
* @since 3.9.0 | |
* | |
* @param WP_Customize_Manager $wp_customize Customize manager. | |
*/ | |
public function customize_set_last_used($wp_customize) | |
{ | |
} | |
/** | |
* Gets the details of default header images if defined. | |
* | |
* @since 3.9.0 | |
* | |
* @return array Default header images. | |
*/ | |
public function get_default_header_images() | |
{ | |
} | |
/** | |
* Gets the previously uploaded header images. | |
* | |
* @since 3.9.0 | |
* | |
* @return array Uploaded header images. | |
*/ | |
public function get_uploaded_header_images() | |
{ | |
} | |
/** | |
* Get the ID of a previous crop from the same base image. | |
* | |
* @since 4.9.0 | |
* | |
* @param array $object A crop attachment object. | |
* @return int|false An attachment ID if one exists. False if none. | |
*/ | |
public function get_previous_crop($object) | |
{ | |
} | |
} | |
/** | |
* Upgrader API: WP_Upgrader_Skin class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Generic Skin for the WordPress Upgrader classes. This skin is designed to be extended for specific purposes. | |
* | |
* @since 2.8.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. | |
*/ | |
class WP_Upgrader_Skin | |
{ | |
public $upgrader; | |
public $done_header = \false; | |
public $done_footer = \false; | |
/** | |
* Holds the result of an upgrade. | |
* | |
* @since 2.8.0 | |
* @var string|bool|WP_Error | |
*/ | |
public $result = \false; | |
public $options = array(); | |
/** | |
* @param array $args | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* @param WP_Upgrader $upgrader | |
*/ | |
public function set_upgrader(&$upgrader) | |
{ | |
} | |
/** | |
*/ | |
public function add_strings() | |
{ | |
} | |
/** | |
* Sets the result of an upgrade. | |
* | |
* @since 2.8.0 | |
* | |
* @param string|bool|WP_Error $result The result of an upgrade. | |
*/ | |
public function set_result($result) | |
{ | |
} | |
/** | |
* Displays a form to the user to request for their FTP/SSH details in order | |
* to connect to the filesystem. | |
* | |
* @since 2.8.0 | |
* @since 4.6.0 The `$context` parameter default changed from `false` to an empty string. | |
* | |
* @see request_filesystem_credentials() | |
* | |
* @param bool $error Optional. Whether the current request has failed to connect. | |
* Default false. | |
* @param string $context Optional. Full path to the directory that is tested | |
* for being writable. Default empty. | |
* @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false. | |
* @return bool False on failure, true on success. | |
*/ | |
public function request_filesystem_credentials($error = \false, $context = '', $allow_relaxed_file_ownership = \false) | |
{ | |
} | |
/** | |
*/ | |
public function header() | |
{ | |
} | |
/** | |
*/ | |
public function footer() | |
{ | |
} | |
/** | |
* @param string|WP_Error $errors | |
*/ | |
public function error($errors) | |
{ | |
} | |
/** | |
* @param string $string | |
*/ | |
public function feedback($string) | |
{ | |
} | |
/** | |
*/ | |
public function before() | |
{ | |
} | |
/** | |
*/ | |
public function after() | |
{ | |
} | |
/** | |
* Output JavaScript that calls function to decrement the update counts. | |
* | |
* @since 3.9.0 | |
* | |
* @param string $type Type of update count to decrement. Likely values include 'plugin', | |
* 'theme', 'translation', etc. | |
*/ | |
protected function decrement_update_count($type) | |
{ | |
} | |
/** | |
*/ | |
public function bulk_header() | |
{ | |
} | |
/** | |
*/ | |
public function bulk_footer() | |
{ | |
} | |
} | |
/** | |
* Upgrader API: Automatic_Upgrader_Skin class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Upgrader Skin for Automatic WordPress Upgrades | |
* | |
* This skin is designed to be used when no output is intended, all output | |
* is captured and stored for the caller to process and log/email/discard. | |
* | |
* @since 3.7.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. | |
* | |
* @see Bulk_Upgrader_Skin | |
*/ | |
class Automatic_Upgrader_Skin extends \WP_Upgrader_Skin | |
{ | |
protected $messages = array(); | |
/** | |
* Determines whether the upgrader needs FTP/SSH details in order to connect | |
* to the filesystem. | |
* | |
* @since 3.7.0 | |
* @since 4.6.0 The `$context` parameter default changed from `false` to an empty string. | |
* | |
* @see request_filesystem_credentials() | |
* | |
* @param bool $error Optional. Whether the current request has failed to connect. | |
* Default false. | |
* @param string $context Optional. Full path to the directory that is tested | |
* for being writable. Default empty. | |
* @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false. | |
* @return bool True on success, false on failure. | |
*/ | |
public function request_filesystem_credentials($error = \false, $context = '', $allow_relaxed_file_ownership = \false) | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
public function get_upgrade_messages() | |
{ | |
} | |
/** | |
* @param string|array|WP_Error $data | |
*/ | |
public function feedback($data) | |
{ | |
} | |
/** | |
*/ | |
public function header() | |
{ | |
} | |
/** | |
*/ | |
public function footer() | |
{ | |
} | |
} | |
/** | |
* Upgrader API: Bulk_Upgrader_Skin class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Generic Bulk Upgrader Skin for WordPress Upgrades. | |
* | |
* @since 3.0.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. | |
* | |
* @see WP_Upgrader_Skin | |
*/ | |
class Bulk_Upgrader_Skin extends \WP_Upgrader_Skin | |
{ | |
public $in_loop = \false; | |
/** | |
* @var string|false | |
*/ | |
public $error = \false; | |
/** | |
* @param array $args | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
*/ | |
public function add_strings() | |
{ | |
} | |
/** | |
* @param string $string | |
*/ | |
public function feedback($string) | |
{ | |
} | |
/** | |
*/ | |
public function header() | |
{ | |
} | |
/** | |
*/ | |
public function footer() | |
{ | |
} | |
/** | |
* @param string|WP_Error $error | |
*/ | |
public function error($error) | |
{ | |
} | |
/** | |
*/ | |
public function bulk_header() | |
{ | |
} | |
/** | |
*/ | |
public function bulk_footer() | |
{ | |
} | |
/** | |
* @param string $title | |
*/ | |
public function before($title = '') | |
{ | |
} | |
/** | |
* @param string $title | |
*/ | |
public function after($title = '') | |
{ | |
} | |
/** | |
*/ | |
public function reset() | |
{ | |
} | |
/** | |
*/ | |
public function flush_output() | |
{ | |
} | |
} | |
/** | |
* Upgrader API: Bulk_Plugin_Upgrader_Skin class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Bulk Plugin Upgrader Skin for WordPress Plugin Upgrades. | |
* | |
* @since 3.0.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. | |
* | |
* @see Bulk_Upgrader_Skin | |
*/ | |
class Bulk_Plugin_Upgrader_Skin extends \Bulk_Upgrader_Skin | |
{ | |
public $plugin_info = array(); | |
// Plugin_Upgrader::bulk_upgrade() will fill this in. | |
public function add_strings() | |
{ | |
} | |
/** | |
* @param string $title | |
*/ | |
public function before($title = '') | |
{ | |
} | |
/** | |
* @param string $title | |
*/ | |
public function after($title = '') | |
{ | |
} | |
/** | |
*/ | |
public function bulk_footer() | |
{ | |
} | |
} | |
/** | |
* Upgrader API: Bulk_Plugin_Upgrader_Skin class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Bulk Theme Upgrader Skin for WordPress Theme Upgrades. | |
* | |
* @since 3.0.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. | |
* | |
* @see Bulk_Upgrader_Skin | |
*/ | |
class Bulk_Theme_Upgrader_Skin extends \Bulk_Upgrader_Skin | |
{ | |
public $theme_info = array(); | |
// Theme_Upgrader::bulk_upgrade() will fill this in. | |
public function add_strings() | |
{ | |
} | |
/** | |
* @param string $title | |
*/ | |
public function before($title = '') | |
{ | |
} | |
/** | |
* @param string $title | |
*/ | |
public function after($title = '') | |
{ | |
} | |
/** | |
*/ | |
public function bulk_footer() | |
{ | |
} | |
} | |
/** | |
* Core class used for upgrading/installing a local set of files via | |
* the Filesystem Abstraction classes from a Zip file. | |
* | |
* @since 2.8.0 | |
*/ | |
class WP_Upgrader | |
{ | |
/** | |
* The error/notification strings used to update the user on the progress. | |
* | |
* @since 2.8.0 | |
* @var array $strings | |
*/ | |
public $strings = array(); | |
/** | |
* The upgrader skin being used. | |
* | |
* @since 2.8.0 | |
* @var Automatic_Upgrader_Skin|WP_Upgrader_Skin $skin | |
*/ | |
public $skin = \null; | |
/** | |
* The result of the installation. | |
* | |
* This is set by WP_Upgrader::install_package(), only when the package is installed | |
* successfully. It will then be an array, unless a WP_Error is returned by the | |
* {@see 'upgrader_post_install'} filter. In that case, the WP_Error will be assigned to | |
* it. | |
* | |
* @since 2.8.0 | |
* | |
* @var WP_Error|array $result { | |
* @type string $source The full path to the source the files were installed from. | |
* @type string $source_files List of all the files in the source directory. | |
* @type string $destination The full path to the installation destination folder. | |
* @type string $destination_name The name of the destination folder, or empty if `$destination` | |
* and `$local_destination` are the same. | |
* @type string $local_destination The full local path to the destination folder. This is usually | |
* the same as `$destination`. | |
* @type string $remote_destination The full remote path to the destination folder | |
* (i.e., from `$wp_filesystem`). | |
* @type bool $clear_destination Whether the destination folder was cleared. | |
* } | |
*/ | |
public $result = array(); | |
/** | |
* The total number of updates being performed. | |
* | |
* Set by the bulk update methods. | |
* | |
* @since 3.0.0 | |
* @var int $update_count | |
*/ | |
public $update_count = 0; | |
/** | |
* The current update if multiple updates are being performed. | |
* | |
* Used by the bulk update methods, and incremented for each update. | |
* | |
* @since 3.0.0 | |
* @var int | |
*/ | |
public $update_current = 0; | |
/** | |
* Construct the upgrader with a skin. | |
* | |
* @since 2.8.0 | |
* | |
* @param WP_Upgrader_Skin $skin The upgrader skin to use. Default is a WP_Upgrader_Skin. | |
* instance. | |
*/ | |
public function __construct($skin = \null) | |
{ | |
} | |
/** | |
* Initialize the upgrader. | |
* | |
* This will set the relationship between the skin being used and this upgrader, | |
* and also add the generic strings to `WP_Upgrader::$strings`. | |
* | |
* @since 2.8.0 | |
*/ | |
public function init() | |
{ | |
} | |
/** | |
* Add the generic strings to WP_Upgrader::$strings. | |
* | |
* @since 2.8.0 | |
*/ | |
public function generic_strings() | |
{ | |
} | |
/** | |
* Connect to the filesystem. | |
* | |
* @since 2.8.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. | |
* | |
* @param array $directories Optional. A list of directories. If any of these do | |
* not exist, a WP_Error object will be returned. | |
* Default empty array. | |
* @param bool $allow_relaxed_file_ownership Whether to allow relaxed file ownership. | |
* Default false. | |
* @return bool|WP_Error True if able to connect, false or a WP_Error otherwise. | |
*/ | |
public function fs_connect($directories = array(), $allow_relaxed_file_ownership = \false) | |
{ | |
} | |
//end fs_connect(); | |
/** | |
* Download a package. | |
* | |
* @since 2.8.0 | |
* | |
* @param string $package The URI of the package. If this is the full path to an | |
* existing local file, it will be returned untouched. | |
* @return string|WP_Error The full path to the downloaded package file, or a WP_Error object. | |
*/ | |
public function download_package($package) | |
{ | |
} | |
/** | |
* Unpack a compressed package file. | |
* | |
* @since 2.8.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. | |
* | |
* @param string $package Full path to the package file. | |
* @param bool $delete_package Optional. Whether to delete the package file after attempting | |
* to unpack it. Default true. | |
* @return string|WP_Error The path to the unpacked contents, or a WP_Error on failure. | |
*/ | |
public function unpack_package($package, $delete_package = \true) | |
{ | |
} | |
/** | |
* Flatten the results of WP_Filesystem::dirlist() for iterating over. | |
* | |
* @since 4.9.0 | |
* @access protected | |
* | |
* @param array $nested_files Array of files as returned by WP_Filesystem::dirlist() | |
* @param string $path Relative path to prepend to child nodes. Optional. | |
* @return array $files A flattened array of the $nested_files specified. | |
*/ | |
protected function flatten_dirlist($nested_files, $path = '') | |
{ | |
} | |
/** | |
* Clears the directory where this item is going to be installed into. | |
* | |
* @since 4.3.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. | |
* | |
* @param string $remote_destination The location on the remote filesystem to be cleared | |
* @return bool|WP_Error True upon success, WP_Error on failure. | |
*/ | |
public function clear_destination($remote_destination) | |
{ | |
} | |
/** | |
* Install a package. | |
* | |
* Copies the contents of a package form a source directory, and installs them in | |
* a destination directory. Optionally removes the source. It can also optionally | |
* clear out the destination folder if it already exists. | |
* | |
* @since 2.8.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. | |
* @global array $wp_theme_directories | |
* | |
* @param array|string $args { | |
* Optional. Array or string of arguments for installing a package. Default empty array. | |
* | |
* @type string $source Required path to the package source. Default empty. | |
* @type string $destination Required path to a folder to install the package in. | |
* Default empty. | |
* @type bool $clear_destination Whether to delete any files already in the destination | |
* folder. Default false. | |
* @type bool $clear_working Whether to delete the files form the working directory | |
* after copying to the destination. Default false. | |
* @type bool $abort_if_destination_exists Whether to abort the installation if | |
* the destination folder already exists. Default true. | |
* @type array $hook_extra Extra arguments to pass to the filter hooks called by | |
* WP_Upgrader::install_package(). Default empty array. | |
* } | |
* | |
* @return array|WP_Error The result (also stored in `WP_Upgrader::$result`), or a WP_Error on failure. | |
*/ | |
public function install_package($args = array()) | |
{ | |
} | |
/** | |
* Run an upgrade/installation. | |
* | |
* Attempts to download the package (if it is not a local file), unpack it, and | |
* install it in the destination folder. | |
* | |
* @since 2.8.0 | |
* | |
* @param array $options { | |
* Array or string of arguments for upgrading/installing a package. | |
* | |
* @type string $package The full path or URI of the package to install. | |
* Default empty. | |
* @type string $destination The full path to the destination folder. | |
* Default empty. | |
* @type bool $clear_destination Whether to delete any files already in the | |
* destination folder. Default false. | |
* @type bool $clear_working Whether to delete the files form the working | |
* directory after copying to the destination. | |
* Default false. | |
* @type bool $abort_if_destination_exists Whether to abort the installation if the destination | |
* folder already exists. When true, `$clear_destination` | |
* should be false. Default true. | |
* @type bool $is_multi Whether this run is one of multiple upgrade/installation | |
* actions being performed in bulk. When true, the skin | |
* WP_Upgrader::header() and WP_Upgrader::footer() | |
* aren't called. Default false. | |
* @type array $hook_extra Extra arguments to pass to the filter hooks called by | |
* WP_Upgrader::run(). | |
* } | |
* @return array|false|WP_error The result from self::install_package() on success, otherwise a WP_Error, | |
* or false if unable to connect to the filesystem. | |
*/ | |
public function run($options) | |
{ | |
} | |
/** | |
* Toggle maintenance mode for the site. | |
* | |
* Creates/deletes the maintenance file to enable/disable maintenance mode. | |
* | |
* @since 2.8.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem Subclass | |
* | |
* @param bool $enable True to enable maintenance mode, false to disable. | |
*/ | |
public function maintenance_mode($enable = \false) | |
{ | |
} | |
/** | |
* Creates a lock using WordPress options. | |
* | |
* @since 4.5.0 | |
* | |
* @param string $lock_name The name of this unique lock. | |
* @param int $release_timeout Optional. The duration in seconds to respect an existing lock. | |
* Default: 1 hour. | |
* @return bool False if a lock couldn't be created or if the lock is still valid. True otherwise. | |
*/ | |
public static function create_lock($lock_name, $release_timeout = \null) | |
{ | |
} | |
/** | |
* Releases an upgrader lock. | |
* | |
* @since 4.5.0 | |
* | |
* @see WP_Upgrader::create_lock() | |
* | |
* @param string $lock_name The name of this unique lock. | |
* @return bool True if the lock was successfully released. False on failure. | |
*/ | |
public static function release_lock($lock_name) | |
{ | |
} | |
} | |
/** | |
* Upgrade API: Core_Upgrader class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Core class used for updating core. | |
* | |
* It allows for WordPress to upgrade itself in combination with | |
* the wp-admin/includes/update-core.php file. | |
* | |
* @since 2.8.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. | |
* | |
* @see WP_Upgrader | |
*/ | |
class Core_Upgrader extends \WP_Upgrader | |
{ | |
/** | |
* Initialize the upgrade strings. | |
* | |
* @since 2.8.0 | |
*/ | |
public function upgrade_strings() | |
{ | |
} | |
/** | |
* Upgrade WordPress core. | |
* | |
* @since 2.8.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. | |
* @global callable $_wp_filesystem_direct_method | |
* | |
* @param object $current Response object for whether WordPress is current. | |
* @param array $args { | |
* Optional. Arguments for upgrading WordPress core. Default empty array. | |
* | |
* @type bool $pre_check_md5 Whether to check the file checksums before | |
* attempting the upgrade. Default true. | |
* @type bool $attempt_rollback Whether to attempt to rollback the chances if | |
* there is a problem. Default false. | |
* @type bool $do_rollback Whether to perform this "upgrade" as a rollback. | |
* Default false. | |
* } | |
* @return null|false|WP_Error False or WP_Error on failure, null on success. | |
*/ | |
public function upgrade($current, $args = array()) | |
{ | |
} | |
/** | |
* Determines if this WordPress Core version should update to an offered version or not. | |
* | |
* @since 3.7.0 | |
* | |
* @param string $offered_ver The offered version, of the format x.y.z. | |
* @return bool True if we should update to the offered version, otherwise false. | |
*/ | |
public static function should_update_to_version($offered_ver) | |
{ | |
} | |
/** | |
* Compare the disk file checksums against the expected checksums. | |
* | |
* @since 3.7.0 | |
* | |
* @global string $wp_version | |
* @global string $wp_local_package | |
* | |
* @return bool True if the checksums match, otherwise false. | |
*/ | |
public function check_files() | |
{ | |
} | |
} | |
/** | |
* Upgrade API: File_Upload_Upgrader class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Core class used for handling file uploads. | |
* | |
* This class handles the upload process and passes it as if it's a local file | |
* to the Upgrade/Installer functions. | |
* | |
* @since 2.8.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. | |
*/ | |
class File_Upload_Upgrader | |
{ | |
/** | |
* The full path to the file package. | |
* | |
* @since 2.8.0 | |
* @var string $package | |
*/ | |
public $package; | |
/** | |
* The name of the file. | |
* | |
* @since 2.8.0 | |
* @var string $filename | |
*/ | |
public $filename; | |
/** | |
* The ID of the attachment post for this file. | |
* | |
* @since 3.3.0 | |
* @var int $id | |
*/ | |
public $id = 0; | |
/** | |
* Construct the upgrader for a form. | |
* | |
* @since 2.8.0 | |
* | |
* @param string $form The name of the form the file was uploaded from. | |
* @param string $urlholder The name of the `GET` parameter that holds the filename. | |
*/ | |
public function __construct($form, $urlholder) | |
{ | |
} | |
/** | |
* Delete the attachment/uploaded file. | |
* | |
* @since 3.2.2 | |
* | |
* @return bool Whether the cleanup was successful. | |
*/ | |
public function cleanup() | |
{ | |
} | |
} | |
/** | |
* PemFTP base class | |
* | |
*/ | |
class ftp_base | |
{ | |
/* Public variables */ | |
var $LocalEcho; | |
var $Verbose; | |
var $OS_local; | |
var $OS_remote; | |
/* Private variables */ | |
var $_lastaction; | |
var $_errors; | |
var $_type; | |
var $_umask; | |
var $_timeout; | |
var $_passive; | |
var $_host; | |
var $_fullhost; | |
var $_port; | |
var $_datahost; | |
var $_dataport; | |
var $_ftp_control_sock; | |
var $_ftp_data_sock; | |
var $_ftp_temp_sock; | |
var $_ftp_buff_size; | |
var $_login; | |
var $_password; | |
var $_connected; | |
var $_ready; | |
var $_code; | |
var $_message; | |
var $_can_restore; | |
var $_port_available; | |
var $_curtype; | |
var $_features; | |
var $_error_array; | |
var $AuthorizedTransferMode; | |
var $OS_FullName; | |
var $_eol_code; | |
var $AutoAsciiExt; | |
/* Constructor */ | |
function __construct($port_mode = \FALSE, $verb = \FALSE, $le = \FALSE) | |
{ | |
} | |
function ftp_base($port_mode = \FALSE) | |
{ | |
} | |
// <!-- --------------------------------------------------------------------------------------- --> | |
// <!-- Public functions --> | |
// <!-- --------------------------------------------------------------------------------------- --> | |
function parselisting($line) | |
{ | |
} | |
function SendMSG($message = "", $crlf = \true) | |
{ | |
} | |
function SetType($mode = \FTP_AUTOASCII) | |
{ | |
} | |
function _settype($mode = \FTP_ASCII) | |
{ | |
} | |
function Passive($pasv = \NULL) | |
{ | |
} | |
function SetServer($host, $port = 21, $reconnect = \true) | |
{ | |
} | |
function SetUmask($umask = 022) | |
{ | |
} | |
function SetTimeout($timeout = 30) | |
{ | |
} | |
function connect($server = \NULL) | |
{ | |
} | |
function quit($force = \false) | |
{ | |
} | |
function login($user = \NULL, $pass = \NULL) | |
{ | |
} | |
function pwd() | |
{ | |
} | |
function cdup() | |
{ | |
} | |
function chdir($pathname) | |
{ | |
} | |
function rmdir($pathname) | |
{ | |
} | |
function mkdir($pathname) | |
{ | |
} | |
function rename($from, $to) | |
{ | |
} | |
function filesize($pathname) | |
{ | |
} | |
function abort() | |
{ | |
} | |
function mdtm($pathname) | |
{ | |
} | |
function systype() | |
{ | |
} | |
function delete($pathname) | |
{ | |
} | |
function site($command, $fnction = "site") | |
{ | |
} | |
function chmod($pathname, $mode) | |
{ | |
} | |
function restore($from) | |
{ | |
} | |
function features() | |
{ | |
} | |
function rawlist($pathname = "", $arg = "") | |
{ | |
} | |
function nlist($pathname = "", $arg = "") | |
{ | |
} | |
function is_exists($pathname) | |
{ | |
} | |
function file_exists($pathname) | |
{ | |
} | |
function fget($fp, $remotefile, $rest = 0) | |
{ | |
} | |
function get($remotefile, $localfile = \NULL, $rest = 0) | |
{ | |
} | |
function fput($remotefile, $fp, $rest = 0) | |
{ | |
} | |
function put($localfile, $remotefile = \NULL, $rest = 0) | |
{ | |
} | |
function mput($local = ".", $remote = \NULL, $continious = \false) | |
{ | |
} | |
function mget($remote, $local = ".", $continious = \false) | |
{ | |
} | |
function mdel($remote, $continious = \false) | |
{ | |
} | |
function mmkdir($dir, $mode = 0777) | |
{ | |
} | |
function glob($pattern, $handle = \NULL) | |
{ | |
} | |
function glob_pattern_match($pattern, $string) | |
{ | |
} | |
function glob_regexp($pattern, $probe) | |
{ | |
} | |
function dirlist($remote) | |
{ | |
} | |
// <!-- --------------------------------------------------------------------------------------- --> | |
// <!-- Private functions --> | |
// <!-- --------------------------------------------------------------------------------------- --> | |
function _checkCode() | |
{ | |
} | |
function _list($arg = "", $cmd = "LIST", $fnction = "_list") | |
{ | |
} | |
// <!-- --------------------------------------------------------------------------------------- --> | |
// <!-- Partie : gestion des erreurs --> | |
// <!-- --------------------------------------------------------------------------------------- --> | |
// Gnre une erreur pour traitement externe la classe | |
function PushError($fctname, $msg, $desc = \false) | |
{ | |
} | |
// Rcupre une erreur externe | |
function PopError() | |
{ | |
} | |
} | |
/** | |
* PemFTP - A Ftp implementation in pure PHP | |
* | |
* @package PemFTP | |
* @since 2.5.0 | |
* | |
* @version 1.0 | |
* @copyright Alexey Dotsenko | |
* @author Alexey Dotsenko | |
* @link http://www.phpclasses.org/browse/package/1743.html Site | |
* @license LGPL http://www.opensource.org/licenses/lgpl-license.html | |
*/ | |
/** | |
* FTP implementation using fsockopen to connect. | |
* | |
* @package PemFTP | |
* @subpackage Pure | |
* @since 2.5.0 | |
* | |
* @version 1.0 | |
* @copyright Alexey Dotsenko | |
* @author Alexey Dotsenko | |
* @link http://www.phpclasses.org/browse/package/1743.html Site | |
* @license LGPL http://www.opensource.org/licenses/lgpl-license.html | |
*/ | |
class ftp_pure extends \ftp_base | |
{ | |
function __construct($verb = \FALSE, $le = \FALSE) | |
{ | |
} | |
// <!-- --------------------------------------------------------------------------------------- --> | |
// <!-- Private functions --> | |
// <!-- --------------------------------------------------------------------------------------- --> | |
function _settimeout($sock) | |
{ | |
} | |
function _connect($host, $port) | |
{ | |
} | |
function _readmsg($fnction = "_readmsg") | |
{ | |
} | |
function _exec($cmd, $fnction = "_exec") | |
{ | |
} | |
function _data_prepare($mode = \FTP_ASCII) | |
{ | |
} | |
function _data_read($mode = \FTP_ASCII, $fp = \NULL) | |
{ | |
} | |
function _data_write($mode = \FTP_ASCII, $fp = \NULL) | |
{ | |
} | |
function _data_write_block($mode, $block) | |
{ | |
} | |
function _data_close() | |
{ | |
} | |
function _quit($force = \FALSE) | |
{ | |
} | |
} | |
/** | |
* PemFTP - A Ftp implementation in pure PHP | |
* | |
* @package PemFTP | |
* @since 2.5.0 | |
* | |
* @version 1.0 | |
* @copyright Alexey Dotsenko | |
* @author Alexey Dotsenko | |
* @link http://www.phpclasses.org/browse/package/1743.html Site | |
* @license LGPL http://www.opensource.org/licenses/lgpl-license.html | |
*/ | |
/** | |
* Socket Based FTP implementation | |
* | |
* @package PemFTP | |
* @subpackage Socket | |
* @since 2.5.0 | |
* | |
* @version 1.0 | |
* @copyright Alexey Dotsenko | |
* @author Alexey Dotsenko | |
* @link http://www.phpclasses.org/browse/package/1743.html Site | |
* @license LGPL http://www.opensource.org/licenses/lgpl-license.html | |
*/ | |
class ftp_sockets extends \ftp_base | |
{ | |
function __construct($verb = \FALSE, $le = \FALSE) | |
{ | |
} | |
// <!-- --------------------------------------------------------------------------------------- --> | |
// <!-- Private functions --> | |
// <!-- --------------------------------------------------------------------------------------- --> | |
function _settimeout($sock) | |
{ | |
} | |
function _connect($host, $port) | |
{ | |
} | |
function _readmsg($fnction = "_readmsg") | |
{ | |
} | |
function _exec($cmd, $fnction = "_exec") | |
{ | |
} | |
function _data_prepare($mode = \FTP_ASCII) | |
{ | |
} | |
function _data_read($mode = \FTP_ASCII, $fp = \NULL) | |
{ | |
} | |
function _data_write($mode = \FTP_ASCII, $fp = \NULL) | |
{ | |
} | |
function _data_write_block($mode, $block) | |
{ | |
} | |
function _data_close() | |
{ | |
} | |
function _quit() | |
{ | |
} | |
} | |
class ftp extends \ftp_sockets | |
{ | |
} | |
/** | |
* Upgrader API: Language_Pack_Upgrader_Skin class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Translation Upgrader Skin for WordPress Translation Upgrades. | |
* | |
* @since 3.7.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. | |
* | |
* @see WP_Upgrader_Skin | |
*/ | |
class Language_Pack_Upgrader_Skin extends \WP_Upgrader_Skin | |
{ | |
public $language_update = \null; | |
public $done_header = \false; | |
public $done_footer = \false; | |
public $display_footer_actions = \true; | |
/** | |
* @param array $args | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
*/ | |
public function before() | |
{ | |
} | |
/** | |
* @param string|WP_Error $error | |
*/ | |
public function error($error) | |
{ | |
} | |
/** | |
*/ | |
public function after() | |
{ | |
} | |
/** | |
*/ | |
public function bulk_footer() | |
{ | |
} | |
} | |
/** | |
* Upgrade API: Language_Pack_Upgrader class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Core class used for updating/installing language packs (translations) | |
* for plugins, themes, and core. | |
* | |
* @since 3.7.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. | |
* | |
* @see WP_Upgrader | |
*/ | |
class Language_Pack_Upgrader extends \WP_Upgrader | |
{ | |
/** | |
* Result of the language pack upgrade. | |
* | |
* @since 3.7.0 | |
* @var array|WP_Error $result | |
* @see WP_Upgrader::$result | |
*/ | |
public $result; | |
/** | |
* Whether a bulk upgrade/installation is being performed. | |
* | |
* @since 3.7.0 | |
* @var bool $bulk | |
*/ | |
public $bulk = \true; | |
/** | |
* Asynchronously upgrades language packs after other upgrades have been made. | |
* | |
* Hooked to the {@see 'upgrader_process_complete'} action by default. | |
* | |
* @since 3.7.0 | |
* | |
* @param false|WP_Upgrader $upgrader Optional. WP_Upgrader instance or false. If `$upgrader` is | |
* a Language_Pack_Upgrader instance, the method will bail to | |
* avoid recursion. Otherwise unused. Default false. | |
*/ | |
public static function async_upgrade($upgrader = \false) | |
{ | |
} | |
/** | |
* Initialize the upgrade strings. | |
* | |
* @since 3.7.0 | |
*/ | |
public function upgrade_strings() | |
{ | |
} | |
/** | |
* Upgrade a language pack. | |
* | |
* @since 3.7.0 | |
* | |
* @param string|false $update Optional. Whether an update offer is available. Default false. | |
* @param array $args Optional. Other optional arguments, see | |
* Language_Pack_Upgrader::bulk_upgrade(). Default empty array. | |
* @return array|bool|WP_Error The result of the upgrade, or a WP_Error object instead. | |
*/ | |
public function upgrade($update = \false, $args = array()) | |
{ | |
} | |
/** | |
* Bulk upgrade language packs. | |
* | |
* @since 3.7.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. | |
* | |
* @param object[] $language_updates Optional. Array of language packs to update. @see wp_get_translation_updates(). | |
* Default empty array. | |
* @param array $args { | |
* Other arguments for upgrading multiple language packs. Default empty array. | |
* | |
* @type bool $clear_update_cache Whether to clear the update cache when done. | |
* Default true. | |
* } | |
* @return array|bool|WP_Error Will return an array of results, or true if there are no updates, | |
* false or WP_Error for initial errors. | |
*/ | |
public function bulk_upgrade($language_updates = array(), $args = array()) | |
{ | |
} | |
/** | |
* Check the package source to make sure there are .mo and .po files. | |
* | |
* Hooked to the {@see 'upgrader_source_selection'} filter by | |
* Language_Pack_Upgrader::bulk_upgrade(). | |
* | |
* @since 3.7.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem Subclass | |
* | |
* @param string|WP_Error $source | |
* @param string $remote_source | |
*/ | |
public function check_package($source, $remote_source) | |
{ | |
} | |
/** | |
* Get the name of an item being updated. | |
* | |
* @since 3.7.0 | |
* | |
* @param object $update The data for an update. | |
* @return string The name of the item being updated. | |
*/ | |
public function get_name_for_update($update) | |
{ | |
} | |
/** | |
* Clears existing translations where this item is going to be installed into. | |
* | |
* @since 5.1.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. | |
* | |
* @param string $remote_destination The location on the remote filesystem to be cleared. | |
* @return bool|WP_Error True upon success, WP_Error on failure. | |
*/ | |
public function clear_destination($remote_destination) | |
{ | |
} | |
} | |
/* For futur use | |
define( 'PCLZIP_CB_PRE_LIST', 78005 ); | |
define( 'PCLZIP_CB_POST_LIST', 78006 ); | |
define( 'PCLZIP_CB_PRE_DELETE', 78007 ); | |
define( 'PCLZIP_CB_POST_DELETE', 78008 ); | |
*/ | |
// -------------------------------------------------------------------------------- | |
// Class : PclZip | |
// Description : | |
// PclZip is the class that represent a Zip archive. | |
// The public methods allow the manipulation of the archive. | |
// Attributes : | |
// Attributes must not be accessed directly. | |
// Methods : | |
// PclZip() : Object creator | |
// create() : Creates the Zip archive | |
// listContent() : List the content of the Zip archive | |
// extract() : Extract the content of the archive | |
// properties() : List the properties of the archive | |
// -------------------------------------------------------------------------------- | |
class PclZip | |
{ | |
// ----- Filename of the zip file | |
var $zipname = ''; | |
// ----- File descriptor of the zip file | |
var $zip_fd = 0; | |
// ----- Internal error handling | |
var $error_code = 1; | |
var $error_string = ''; | |
// ----- Current status of the magic_quotes_runtime | |
// This value store the php configuration for magic_quotes | |
// The class can then disable the magic_quotes and reset it after | |
var $magic_quotes_status; | |
// -------------------------------------------------------------------------------- | |
// Function : PclZip() | |
// Description : | |
// Creates a PclZip object and set the name of the associated Zip archive | |
// filename. | |
// Note that no real action is taken, if the archive does not exist it is not | |
// created. Use create() for that. | |
// -------------------------------------------------------------------------------- | |
function __construct($p_zipname) | |
{ | |
} | |
public function PclZip($p_zipname) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : | |
// create($p_filelist, $p_add_dir="", $p_remove_dir="") | |
// create($p_filelist, $p_option, $p_option_value, ...) | |
// Description : | |
// This method supports two different synopsis. The first one is historical. | |
// This method creates a Zip Archive. The Zip file is created in the | |
// filesystem. The files and directories indicated in $p_filelist | |
// are added in the archive. See the parameters description for the | |
// supported format of $p_filelist. | |
// When a directory is in the list, the directory and its content is added | |
// in the archive. | |
// In this synopsis, the function takes an optional variable list of | |
// options. See bellow the supported options. | |
// Parameters : | |
// $p_filelist : An array containing file or directory names, or | |
// a string containing one filename or one directory name, or | |
// a string containing a list of filenames and/or directory | |
// names separated by spaces. | |
// $p_add_dir : A path to add before the real path of the archived file, | |
// in order to have it memorized in the archive. | |
// $p_remove_dir : A path to remove from the real path of the file to archive, | |
// in order to have a shorter path memorized in the archive. | |
// When $p_add_dir and $p_remove_dir are set, $p_remove_dir | |
// is removed first, before $p_add_dir is added. | |
// Options : | |
// PCLZIP_OPT_ADD_PATH : | |
// PCLZIP_OPT_REMOVE_PATH : | |
// PCLZIP_OPT_REMOVE_ALL_PATH : | |
// PCLZIP_OPT_COMMENT : | |
// PCLZIP_CB_PRE_ADD : | |
// PCLZIP_CB_POST_ADD : | |
// Return Values : | |
// 0 on failure, | |
// The list of the added files, with a status of the add action. | |
// (see PclZip::listContent() for list entry format) | |
// -------------------------------------------------------------------------------- | |
function create($p_filelist) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : | |
// add($p_filelist, $p_add_dir="", $p_remove_dir="") | |
// add($p_filelist, $p_option, $p_option_value, ...) | |
// Description : | |
// This method supports two synopsis. The first one is historical. | |
// This methods add the list of files in an existing archive. | |
// If a file with the same name already exists, it is added at the end of the | |
// archive, the first one is still present. | |
// If the archive does not exist, it is created. | |
// Parameters : | |
// $p_filelist : An array containing file or directory names, or | |
// a string containing one filename or one directory name, or | |
// a string containing a list of filenames and/or directory | |
// names separated by spaces. | |
// $p_add_dir : A path to add before the real path of the archived file, | |
// in order to have it memorized in the archive. | |
// $p_remove_dir : A path to remove from the real path of the file to archive, | |
// in order to have a shorter path memorized in the archive. | |
// When $p_add_dir and $p_remove_dir are set, $p_remove_dir | |
// is removed first, before $p_add_dir is added. | |
// Options : | |
// PCLZIP_OPT_ADD_PATH : | |
// PCLZIP_OPT_REMOVE_PATH : | |
// PCLZIP_OPT_REMOVE_ALL_PATH : | |
// PCLZIP_OPT_COMMENT : | |
// PCLZIP_OPT_ADD_COMMENT : | |
// PCLZIP_OPT_PREPEND_COMMENT : | |
// PCLZIP_CB_PRE_ADD : | |
// PCLZIP_CB_POST_ADD : | |
// Return Values : | |
// 0 on failure, | |
// The list of the added files, with a status of the add action. | |
// (see PclZip::listContent() for list entry format) | |
// -------------------------------------------------------------------------------- | |
function add($p_filelist) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : listContent() | |
// Description : | |
// This public method, gives the list of the files and directories, with their | |
// properties. | |
// The properties of each entries in the list are (used also in other functions) : | |
// filename : Name of the file. For a create or add action it is the filename | |
// given by the user. For an extract function it is the filename | |
// of the extracted file. | |
// stored_filename : Name of the file / directory stored in the archive. | |
// size : Size of the stored file. | |
// compressed_size : Size of the file's data compressed in the archive | |
// (without the headers overhead) | |
// mtime : Last known modification date of the file (UNIX timestamp) | |
// comment : Comment associated with the file | |
// folder : true | false | |
// index : index of the file in the archive | |
// status : status of the action (depending of the action) : | |
// Values are : | |
// ok : OK ! | |
// filtered : the file / dir is not extracted (filtered by user) | |
// already_a_directory : the file can not be extracted because a | |
// directory with the same name already exists | |
// write_protected : the file can not be extracted because a file | |
// with the same name already exists and is | |
// write protected | |
// newer_exist : the file was not extracted because a newer file exists | |
// path_creation_fail : the file is not extracted because the folder | |
// does not exist and can not be created | |
// write_error : the file was not extracted because there was a | |
// error while writing the file | |
// read_error : the file was not extracted because there was a error | |
// while reading the file | |
// invalid_header : the file was not extracted because of an archive | |
// format error (bad file header) | |
// Note that each time a method can continue operating when there | |
// is an action error on a file, the error is only logged in the file status. | |
// Return Values : | |
// 0 on an unrecoverable failure, | |
// The list of the files in the archive. | |
// -------------------------------------------------------------------------------- | |
function listContent() | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : | |
// extract($p_path="./", $p_remove_path="") | |
// extract([$p_option, $p_option_value, ...]) | |
// Description : | |
// This method supports two synopsis. The first one is historical. | |
// This method extract all the files / directories from the archive to the | |
// folder indicated in $p_path. | |
// If you want to ignore the 'root' part of path of the memorized files | |
// you can indicate this in the optional $p_remove_path parameter. | |
// By default, if a newer file with the same name already exists, the | |
// file is not extracted. | |
// | |
// If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions | |
// are used, the path indicated in PCLZIP_OPT_ADD_PATH is append | |
// at the end of the path value of PCLZIP_OPT_PATH. | |
// Parameters : | |
// $p_path : Path where the files and directories are to be extracted | |
// $p_remove_path : First part ('root' part) of the memorized path | |
// (if any similar) to remove while extracting. | |
// Options : | |
// PCLZIP_OPT_PATH : | |
// PCLZIP_OPT_ADD_PATH : | |
// PCLZIP_OPT_REMOVE_PATH : | |
// PCLZIP_OPT_REMOVE_ALL_PATH : | |
// PCLZIP_CB_PRE_EXTRACT : | |
// PCLZIP_CB_POST_EXTRACT : | |
// Return Values : | |
// 0 or a negative value on failure, | |
// The list of the extracted files, with a status of the action. | |
// (see PclZip::listContent() for list entry format) | |
// -------------------------------------------------------------------------------- | |
function extract() | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : | |
// extractByIndex($p_index, $p_path="./", $p_remove_path="") | |
// extractByIndex($p_index, [$p_option, $p_option_value, ...]) | |
// Description : | |
// This method supports two synopsis. The first one is historical. | |
// This method is doing a partial extract of the archive. | |
// The extracted files or folders are identified by their index in the | |
// archive (from 0 to n). | |
// Note that if the index identify a folder, only the folder entry is | |
// extracted, not all the files included in the archive. | |
// Parameters : | |
// $p_index : A single index (integer) or a string of indexes of files to | |
// extract. The form of the string is "0,4-6,8-12" with only numbers | |
// and '-' for range or ',' to separate ranges. No spaces or ';' | |
// are allowed. | |
// $p_path : Path where the files and directories are to be extracted | |
// $p_remove_path : First part ('root' part) of the memorized path | |
// (if any similar) to remove while extracting. | |
// Options : | |
// PCLZIP_OPT_PATH : | |
// PCLZIP_OPT_ADD_PATH : | |
// PCLZIP_OPT_REMOVE_PATH : | |
// PCLZIP_OPT_REMOVE_ALL_PATH : | |
// PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and | |
// not as files. | |
// The resulting content is in a new field 'content' in the file | |
// structure. | |
// This option must be used alone (any other options are ignored). | |
// PCLZIP_CB_PRE_EXTRACT : | |
// PCLZIP_CB_POST_EXTRACT : | |
// Return Values : | |
// 0 on failure, | |
// The list of the extracted files, with a status of the action. | |
// (see PclZip::listContent() for list entry format) | |
// -------------------------------------------------------------------------------- | |
//function extractByIndex($p_index, options...) | |
function extractByIndex($p_index) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : | |
// delete([$p_option, $p_option_value, ...]) | |
// Description : | |
// This method removes files from the archive. | |
// If no parameters are given, then all the archive is emptied. | |
// Parameters : | |
// None or optional arguments. | |
// Options : | |
// PCLZIP_OPT_BY_INDEX : | |
// PCLZIP_OPT_BY_NAME : | |
// PCLZIP_OPT_BY_EREG : | |
// PCLZIP_OPT_BY_PREG : | |
// Return Values : | |
// 0 on failure, | |
// The list of the files which are still present in the archive. | |
// (see PclZip::listContent() for list entry format) | |
// -------------------------------------------------------------------------------- | |
function delete() | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : deleteByIndex() | |
// Description : | |
// ***** Deprecated ***** | |
// delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered. | |
// -------------------------------------------------------------------------------- | |
function deleteByIndex($p_index) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : properties() | |
// Description : | |
// This method gives the properties of the archive. | |
// The properties are : | |
// nb : Number of files in the archive | |
// comment : Comment associated with the archive file | |
// status : not_exist, ok | |
// Parameters : | |
// None | |
// Return Values : | |
// 0 on failure, | |
// An array with the archive properties. | |
// -------------------------------------------------------------------------------- | |
function properties() | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : duplicate() | |
// Description : | |
// This method creates an archive by copying the content of an other one. If | |
// the archive already exist, it is replaced by the new one without any warning. | |
// Parameters : | |
// $p_archive : The filename of a valid archive, or | |
// a valid PclZip object. | |
// Return Values : | |
// 1 on success. | |
// 0 or a negative value on error (error code). | |
// -------------------------------------------------------------------------------- | |
function duplicate($p_archive) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : merge() | |
// Description : | |
// This method merge the $p_archive_to_add archive at the end of the current | |
// one ($this). | |
// If the archive ($this) does not exist, the merge becomes a duplicate. | |
// If the $p_archive_to_add archive does not exist, the merge is a success. | |
// Parameters : | |
// $p_archive_to_add : It can be directly the filename of a valid zip archive, | |
// or a PclZip object archive. | |
// Return Values : | |
// 1 on success, | |
// 0 or negative values on error (see below). | |
// -------------------------------------------------------------------------------- | |
function merge($p_archive_to_add) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : errorCode() | |
// Description : | |
// Parameters : | |
// -------------------------------------------------------------------------------- | |
function errorCode() | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : errorName() | |
// Description : | |
// Parameters : | |
// -------------------------------------------------------------------------------- | |
function errorName($p_with_code = \false) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : errorInfo() | |
// Description : | |
// Parameters : | |
// -------------------------------------------------------------------------------- | |
function errorInfo($p_full = \false) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS ***** | |
// ***** ***** | |
// ***** THESES FUNCTIONS MUST NOT BE USED DIRECTLY ***** | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privCheckFormat() | |
// Description : | |
// This method check that the archive exists and is a valid zip archive. | |
// Several level of check exists. (futur) | |
// Parameters : | |
// $p_level : Level of check. Default 0. | |
// 0 : Check the first bytes (magic codes) (default value)) | |
// 1 : 0 + Check the central directory (futur) | |
// 2 : 1 + Check each file header (futur) | |
// Return Values : | |
// true on success, | |
// false on error, the error code is set. | |
// -------------------------------------------------------------------------------- | |
function privCheckFormat($p_level = 0) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privParseOptions() | |
// Description : | |
// This internal methods reads the variable list of arguments ($p_options_list, | |
// $p_size) and generate an array with the options and values ($v_result_list). | |
// $v_requested_options contains the options that can be present and those that | |
// must be present. | |
// $v_requested_options is an array, with the option value as key, and 'optional', | |
// or 'mandatory' as value. | |
// Parameters : | |
// See above. | |
// Return Values : | |
// 1 on success. | |
// 0 on failure. | |
// -------------------------------------------------------------------------------- | |
function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options = \false) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privOptionDefaultThreshold() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privOptionDefaultThreshold(&$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privFileDescrParseAtt() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// 1 on success. | |
// 0 on failure. | |
// -------------------------------------------------------------------------------- | |
function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options = \false) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privFileDescrExpand() | |
// Description : | |
// This method look for each item of the list to see if its a file, a folder | |
// or a string to be added as file. For any other type of files (link, other) | |
// just ignore the item. | |
// Then prepare the information that will be stored for that file. | |
// When its a folder, expand the folder with all the files that are in that | |
// folder (recursively). | |
// Parameters : | |
// Return Values : | |
// 1 on success. | |
// 0 on failure. | |
// -------------------------------------------------------------------------------- | |
function privFileDescrExpand(&$p_filedescr_list, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privCreate() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privCreate($p_filedescr_list, &$p_result_list, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privAdd() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privAdd($p_filedescr_list, &$p_result_list, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privOpenFd() | |
// Description : | |
// Parameters : | |
// -------------------------------------------------------------------------------- | |
function privOpenFd($p_mode) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privCloseFd() | |
// Description : | |
// Parameters : | |
// -------------------------------------------------------------------------------- | |
function privCloseFd() | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privAddList() | |
// Description : | |
// $p_add_dir and $p_remove_dir will give the ability to memorize a path which is | |
// different from the real path of the file. This is usefull if you want to have PclTar | |
// running in any directory, and memorize relative path from an other directory. | |
// Parameters : | |
// $p_list : An array containing the file or directory names to add in the tar | |
// $p_result_list : list of added files with their properties (specially the status field) | |
// $p_add_dir : Path to add in the filename path archived | |
// $p_remove_dir : Path to remove in the filename path archived | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
// function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options) | |
function privAddList($p_filedescr_list, &$p_result_list, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privAddFileList() | |
// Description : | |
// Parameters : | |
// $p_filedescr_list : An array containing the file description | |
// or directory names to add in the zip | |
// $p_result_list : list of added files with their properties (specially the status field) | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privAddFile() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privAddFile($p_filedescr, &$p_header, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privAddFileUsingTempFile() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privCalculateStoredFilename() | |
// Description : | |
// Based on file descriptor properties and global options, this method | |
// calculate the filename that will be stored in the archive. | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privCalculateStoredFilename(&$p_filedescr, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privWriteFileHeader() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privWriteFileHeader(&$p_header) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privWriteCentralFileHeader() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privWriteCentralFileHeader(&$p_header) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privWriteCentralHeader() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privList() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privList(&$p_list) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privConvertHeader2FileInfo() | |
// Description : | |
// This function takes the file informations from the central directory | |
// entries and extract the interesting parameters that will be given back. | |
// The resulting file infos are set in the array $p_info | |
// $p_info['filename'] : Filename with full path. Given by user (add), | |
// extracted in the filesystem (extract). | |
// $p_info['stored_filename'] : Stored filename in the archive. | |
// $p_info['size'] = Size of the file. | |
// $p_info['compressed_size'] = Compressed size of the file. | |
// $p_info['mtime'] = Last modification date of the file. | |
// $p_info['comment'] = Comment associated with the file. | |
// $p_info['folder'] = true/false : indicates if the entry is a folder or not. | |
// $p_info['status'] = status of the action on the file. | |
// $p_info['crc'] = CRC of the file content. | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privConvertHeader2FileInfo($p_header, &$p_info) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privExtractByRule() | |
// Description : | |
// Extract a file or directory depending of rules (by index, by name, ...) | |
// Parameters : | |
// $p_file_list : An array where will be placed the properties of each | |
// extracted file | |
// $p_path : Path to add while writing the extracted files | |
// $p_remove_path : Path to remove (from the file memorized path) while writing the | |
// extracted files. If the path does not match the file path, | |
// the file is extracted with its memorized path. | |
// $p_remove_path does not apply to 'list' mode. | |
// $p_path and $p_remove_path are commulative. | |
// Return Values : | |
// 1 on success,0 or less on error (see error code list) | |
// -------------------------------------------------------------------------------- | |
function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privExtractFile() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// | |
// 1 : ... ? | |
// PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback | |
// -------------------------------------------------------------------------------- | |
function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privExtractFileUsingTempFile() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privExtractFileUsingTempFile(&$p_entry, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privExtractFileInOutput() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privExtractFileInOutput(&$p_entry, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privExtractFileAsString() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privExtractFileAsString(&$p_entry, &$p_string, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privReadFileHeader() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privReadFileHeader(&$p_header) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privReadCentralFileHeader() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privReadCentralFileHeader(&$p_header) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privCheckFileHeaders() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// 1 on success, | |
// 0 on error; | |
// -------------------------------------------------------------------------------- | |
function privCheckFileHeaders(&$p_local_header, &$p_central_header) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privReadEndCentralDir() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privReadEndCentralDir(&$p_central_dir) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privDeleteByRule() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privDeleteByRule(&$p_result_list, &$p_options) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privDirCheck() | |
// Description : | |
// Check if a directory exists, if not it creates it and all the parents directory | |
// which may be useful. | |
// Parameters : | |
// $p_dir : Directory path to check. | |
// Return Values : | |
// 1 : OK | |
// -1 : Unable to create directory | |
// -------------------------------------------------------------------------------- | |
function privDirCheck($p_dir, $p_is_dir = \false) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privMerge() | |
// Description : | |
// If $p_archive_to_add does not exist, the function exit with a success result. | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privMerge(&$p_archive_to_add) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privDuplicate() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privDuplicate($p_archive_filename) | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privErrorLog() | |
// Description : | |
// Parameters : | |
// -------------------------------------------------------------------------------- | |
function privErrorLog($p_error_code = 0, $p_error_string = '') | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privErrorReset() | |
// Description : | |
// Parameters : | |
// -------------------------------------------------------------------------------- | |
function privErrorReset() | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privDisableMagicQuotes() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privDisableMagicQuotes() | |
{ | |
} | |
// -------------------------------------------------------------------------------- | |
// -------------------------------------------------------------------------------- | |
// Function : privSwapBackMagicQuotes() | |
// Description : | |
// Parameters : | |
// Return Values : | |
// -------------------------------------------------------------------------------- | |
function privSwapBackMagicQuotes() | |
{ | |
} | |
} | |
/** | |
* Upgrader API: Plugin_Installer_Skin class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Plugin Installer Skin for WordPress Plugin Installer. | |
* | |
* @since 2.8.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. | |
* | |
* @see WP_Upgrader_Skin | |
*/ | |
class Plugin_Installer_Skin extends \WP_Upgrader_Skin | |
{ | |
public $api; | |
public $type; | |
/** | |
* @param array $args | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
*/ | |
public function before() | |
{ | |
} | |
/** | |
*/ | |
public function after() | |
{ | |
} | |
} | |
/** | |
* Upgrader API: Plugin_Upgrader_Skin class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Plugin Upgrader Skin for WordPress Plugin Upgrades. | |
* | |
* @since 2.8.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. | |
* | |
* @see WP_Upgrader_Skin | |
*/ | |
class Plugin_Upgrader_Skin extends \WP_Upgrader_Skin | |
{ | |
public $plugin = ''; | |
public $plugin_active = \false; | |
public $plugin_network_active = \false; | |
/** | |
* @param array $args | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
*/ | |
public function after() | |
{ | |
} | |
} | |
/** | |
* Upgrade API: Plugin_Upgrader class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Core class used for upgrading/installing plugins. | |
* | |
* It is designed to upgrade/install plugins from a local zip, remote zip URL, | |
* or uploaded zip file. | |
* | |
* @since 2.8.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. | |
* | |
* @see WP_Upgrader | |
*/ | |
class Plugin_Upgrader extends \WP_Upgrader | |
{ | |
/** | |
* Plugin upgrade result. | |
* | |
* @since 2.8.0 | |
* @var array|WP_Error $result | |
* | |
* @see WP_Upgrader::$result | |
*/ | |
public $result; | |
/** | |
* Whether a bulk upgrade/installation is being performed. | |
* | |
* @since 2.9.0 | |
* @var bool $bulk | |
*/ | |
public $bulk = \false; | |
/** | |
* Initialize the upgrade strings. | |
* | |
* @since 2.8.0 | |
*/ | |
public function upgrade_strings() | |
{ | |
} | |
/** | |
* Initialize the installation strings. | |
* | |
* @since 2.8.0 | |
*/ | |
public function install_strings() | |
{ | |
} | |
/** | |
* Install a plugin package. | |
* | |
* @since 2.8.0 | |
* @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional. | |
* | |
* @param string $package The full local path or URI of the package. | |
* @param array $args { | |
* Optional. Other arguments for installing a plugin package. Default empty array. | |
* | |
* @type bool $clear_update_cache Whether to clear the plugin updates cache if successful. | |
* Default true. | |
* } | |
* @return bool|WP_Error True if the installation was successful, false or a WP_Error otherwise. | |
*/ | |
public function install($package, $args = array()) | |
{ | |
} | |
/** | |
* Upgrade a plugin. | |
* | |
* @since 2.8.0 | |
* @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional. | |
* | |
* @param string $plugin Path to the plugin file relative to the plugins directory. | |
* @param array $args { | |
* Optional. Other arguments for upgrading a plugin package. Default empty array. | |
* | |
* @type bool $clear_update_cache Whether to clear the plugin updates cache if successful. | |
* Default true. | |
* } | |
* @return bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise. | |
*/ | |
public function upgrade($plugin, $args = array()) | |
{ | |
} | |
/** | |
* Bulk upgrade several plugins at once. | |
* | |
* @since 2.8.0 | |
* @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional. | |
* | |
* @param string[] $plugins Array of paths to plugin files relative to the plugins directory. | |
* @param array $args { | |
* Optional. Other arguments for upgrading several plugins at once. | |
* | |
* @type bool $clear_update_cache Whether to clear the plugin updates cache if successful. Default true. | |
* } | |
* @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem. | |
*/ | |
public function bulk_upgrade($plugins, $args = array()) | |
{ | |
} | |
/** | |
* Check a source package to be sure it contains a plugin. | |
* | |
* This function is added to the {@see 'upgrader_source_selection'} filter by | |
* Plugin_Upgrader::install(). | |
* | |
* @since 3.3.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. | |
* | |
* @param string $source The path to the downloaded package source. | |
* @return string|WP_Error The source as passed, or a WP_Error object | |
* if no plugins were found. | |
*/ | |
public function check_package($source) | |
{ | |
} | |
/** | |
* Retrieve the path to the file that contains the plugin info. | |
* | |
* This isn't used internally in the class, but is called by the skins. | |
* | |
* @since 2.8.0 | |
* | |
* @return string|false The full path to the main plugin file, or false. | |
*/ | |
public function plugin_info() | |
{ | |
} | |
/** | |
* Deactivates a plugin before it is upgraded. | |
* | |
* Hooked to the {@see 'upgrader_pre_install'} filter by Plugin_Upgrader::upgrade(). | |
* | |
* @since 2.8.0 | |
* @since 4.1.0 Added a return value. | |
* | |
* @param bool|WP_Error $return Upgrade offer return. | |
* @param array $plugin Plugin package arguments. | |
* @return bool|WP_Error The passed in $return param or WP_Error. | |
*/ | |
public function deactivate_plugin_before_upgrade($return, $plugin) | |
{ | |
} | |
/** | |
* Delete the old plugin during an upgrade. | |
* | |
* Hooked to the {@see 'upgrader_clear_destination'} filter by | |
* Plugin_Upgrader::upgrade() and Plugin_Upgrader::bulk_upgrade(). | |
* | |
* @since 2.8.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. | |
* | |
* @param bool|WP_Error $removed | |
* @param string $local_destination | |
* @param string $remote_destination | |
* @param array $plugin | |
* @return WP_Error|bool | |
*/ | |
public function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) | |
{ | |
} | |
} | |
/** | |
* Upgrader API: Theme_Installer_Skin class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Theme Installer Skin for the WordPress Theme Installer. | |
* | |
* @since 2.8.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. | |
* | |
* @see WP_Upgrader_Skin | |
*/ | |
class Theme_Installer_Skin extends \WP_Upgrader_Skin | |
{ | |
public $api; | |
public $type; | |
/** | |
* @param array $args | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
*/ | |
public function before() | |
{ | |
} | |
/** | |
*/ | |
public function after() | |
{ | |
} | |
} | |
/** | |
* Upgrader API: Theme_Upgrader_Skin class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Theme Upgrader Skin for WordPress Theme Upgrades. | |
* | |
* @since 2.8.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. | |
* | |
* @see WP_Upgrader_Skin | |
*/ | |
class Theme_Upgrader_Skin extends \WP_Upgrader_Skin | |
{ | |
public $theme = ''; | |
/** | |
* @param array $args | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
*/ | |
public function after() | |
{ | |
} | |
} | |
/** | |
* Upgrade API: Theme_Upgrader class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Core class used for upgrading/installing themes. | |
* | |
* It is designed to upgrade/install themes from a local zip, remote zip URL, | |
* or uploaded zip file. | |
* | |
* @since 2.8.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. | |
* | |
* @see WP_Upgrader | |
*/ | |
class Theme_Upgrader extends \WP_Upgrader | |
{ | |
/** | |
* Result of the theme upgrade offer. | |
* | |
* @since 2.8.0 | |
* @var array|WP_Error $result | |
* @see WP_Upgrader::$result | |
*/ | |
public $result; | |
/** | |
* Whether multiple themes are being upgraded/installed in bulk. | |
* | |
* @since 2.9.0 | |
* @var bool $bulk | |
*/ | |
public $bulk = \false; | |
/** | |
* Initialize the upgrade strings. | |
* | |
* @since 2.8.0 | |
*/ | |
public function upgrade_strings() | |
{ | |
} | |
/** | |
* Initialize the installation strings. | |
* | |
* @since 2.8.0 | |
*/ | |
public function install_strings() | |
{ | |
} | |
/** | |
* Check if a child theme is being installed and we need to install its parent. | |
* | |
* Hooked to the {@see 'upgrader_post_install'} filter by Theme_Upgrader::install(). | |
* | |
* @since 3.4.0 | |
* | |
* @param bool $install_result | |
* @param array $hook_extra | |
* @param array $child_result | |
* @return type | |
*/ | |
public function check_parent_theme_filter($install_result, $hook_extra, $child_result) | |
{ | |
} | |
/** | |
* Don't display the activate and preview actions to the user. | |
* | |
* Hooked to the {@see 'install_theme_complete_actions'} filter by | |
* Theme_Upgrader::check_parent_theme_filter() when installing | |
* a child theme and installing the parent theme fails. | |
* | |
* @since 3.4.0 | |
* | |
* @param array $actions Preview actions. | |
* @return array | |
*/ | |
public function hide_activate_preview_actions($actions) | |
{ | |
} | |
/** | |
* Install a theme package. | |
* | |
* @since 2.8.0 | |
* @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional. | |
* | |
* @param string $package The full local path or URI of the package. | |
* @param array $args { | |
* Optional. Other arguments for installing a theme package. Default empty array. | |
* | |
* @type bool $clear_update_cache Whether to clear the updates cache if successful. | |
* Default true. | |
* } | |
* | |
* @return bool|WP_Error True if the installation was successful, false or a WP_Error object otherwise. | |
*/ | |
public function install($package, $args = array()) | |
{ | |
} | |
/** | |
* Upgrade a theme. | |
* | |
* @since 2.8.0 | |
* @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional. | |
* | |
* @param string $theme The theme slug. | |
* @param array $args { | |
* Optional. Other arguments for upgrading a theme. Default empty array. | |
* | |
* @type bool $clear_update_cache Whether to clear the update cache if successful. | |
* Default true. | |
* } | |
* @return bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise. | |
*/ | |
public function upgrade($theme, $args = array()) | |
{ | |
} | |
/** | |
* Upgrade several themes at once. | |
* | |
* @since 3.0.0 | |
* @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional. | |
* | |
* @param string[] $themes Array of the theme slugs. | |
* @param array $args { | |
* Optional. Other arguments for upgrading several themes at once. Default empty array. | |
* | |
* @type bool $clear_update_cache Whether to clear the update cache if successful. | |
* Default true. | |
* } | |
* @return array[]|false An array of results, or false if unable to connect to the filesystem. | |
*/ | |
public function bulk_upgrade($themes, $args = array()) | |
{ | |
} | |
/** | |
* Check that the package source contains a valid theme. | |
* | |
* Hooked to the {@see 'upgrader_source_selection'} filter by Theme_Upgrader::install(). | |
* It will return an error if the theme doesn't have style.css or index.php | |
* files. | |
* | |
* @since 3.3.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. | |
* | |
* @param string $source The full path to the package source. | |
* @return string|WP_Error The source or a WP_Error. | |
*/ | |
public function check_package($source) | |
{ | |
} | |
/** | |
* Turn on maintenance mode before attempting to upgrade the current theme. | |
* | |
* Hooked to the {@see 'upgrader_pre_install'} filter by Theme_Upgrader::upgrade() and | |
* Theme_Upgrader::bulk_upgrade(). | |
* | |
* @since 2.8.0 | |
* | |
* @param bool|WP_Error $return | |
* @param array $theme | |
* @return bool|WP_Error | |
*/ | |
public function current_before($return, $theme) | |
{ | |
} | |
/** | |
* Turn off maintenance mode after upgrading the current theme. | |
* | |
* Hooked to the {@see 'upgrader_post_install'} filter by Theme_Upgrader::upgrade() | |
* and Theme_Upgrader::bulk_upgrade(). | |
* | |
* @since 2.8.0 | |
* | |
* @param bool|WP_Error $return | |
* @param array $theme | |
* @return bool|WP_Error | |
*/ | |
public function current_after($return, $theme) | |
{ | |
} | |
/** | |
* Delete the old theme during an upgrade. | |
* | |
* Hooked to the {@see 'upgrader_clear_destination'} filter by Theme_Upgrader::upgrade() | |
* and Theme_Upgrader::bulk_upgrade(). | |
* | |
* @since 2.8.0 | |
* | |
* @global WP_Filesystem_Base $wp_filesystem Subclass | |
* | |
* @param bool $removed | |
* @param string $local_destination | |
* @param string $remote_destination | |
* @param array $theme | |
* @return bool | |
*/ | |
public function delete_old_theme($removed, $local_destination, $remote_destination, $theme) | |
{ | |
} | |
/** | |
* Get the WP_Theme object for a theme. | |
* | |
* @since 2.8.0 | |
* @since 3.0.0 The `$theme` argument was added. | |
* | |
* @param string $theme The directory name of the theme. This is optional, and if not supplied, | |
* the directory name from the last result will be used. | |
* @return WP_Theme|false The theme's info object, or false `$theme` is not supplied | |
* and the last result isn't set. | |
*/ | |
public function theme_info($theme = \null) | |
{ | |
} | |
} | |
/** | |
* A class for displaying various tree-like structures. | |
* | |
* Extend the Walker class to use it, see examples below. Child classes | |
* do not need to implement all of the abstract methods in the class. The child | |
* only needs to implement the methods that are needed. | |
* | |
* @since 2.1.0 | |
* | |
* @package WordPress | |
* @abstract | |
*/ | |
class Walker | |
{ | |
/** | |
* What the class handles. | |
* | |
* @since 2.1.0 | |
* @var string | |
*/ | |
public $tree_type; | |
/** | |
* DB fields to use. | |
* | |
* @since 2.1.0 | |
* @var array | |
*/ | |
public $db_fields; | |
/** | |
* Max number of pages walked by the paged walker | |
* | |
* @since 2.7.0 | |
* @var int | |
*/ | |
public $max_pages = 1; | |
/** | |
* Whether the current element has children or not. | |
* | |
* To be used in start_el(). | |
* | |
* @since 4.0.0 | |
* @var bool | |
*/ | |
public $has_children; | |
/** | |
* Starts the list before the elements are added. | |
* | |
* The $args parameter holds additional values that may be used with the child | |
* class methods. This method is called at the start of the output list. | |
* | |
* @since 2.1.0 | |
* @abstract | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Depth of the item. | |
* @param array $args An array of additional arguments. | |
*/ | |
public function start_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Ends the list of after the elements are added. | |
* | |
* The $args parameter holds additional values that may be used with the child | |
* class methods. This method finishes the list at the end of output of the elements. | |
* | |
* @since 2.1.0 | |
* @abstract | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Depth of the item. | |
* @param array $args An array of additional arguments. | |
*/ | |
public function end_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Start the element output. | |
* | |
* The $args parameter holds additional values that may be used with the child | |
* class methods. Includes the element output also. | |
* | |
* @since 2.1.0 | |
* @abstract | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param object $object The data object. | |
* @param int $depth Depth of the item. | |
* @param array $args An array of additional arguments. | |
* @param int $current_object_id ID of the current item. | |
*/ | |
public function start_el(&$output, $object, $depth = 0, $args = array(), $current_object_id = 0) | |
{ | |
} | |
/** | |
* Ends the element output, if needed. | |
* | |
* The $args parameter holds additional values that may be used with the child class methods. | |
* | |
* @since 2.1.0 | |
* @abstract | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param object $object The data object. | |
* @param int $depth Depth of the item. | |
* @param array $args An array of additional arguments. | |
*/ | |
public function end_el(&$output, $object, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Traverse elements to create list from elements. | |
* | |
* Display one element if the element doesn't have any children otherwise, | |
* display the element and its children. Will only traverse up to the max | |
* depth and no ignore elements under that depth. It is possible to set the | |
* max depth to include all depths, see walk() method. | |
* | |
* This method should not be called directly, use the walk() method instead. | |
* | |
* @since 2.5.0 | |
* | |
* @param object $element Data object. | |
* @param array $children_elements List of elements to continue traversing (passed by reference). | |
* @param int $max_depth Max depth to traverse. | |
* @param int $depth Depth of current element. | |
* @param array $args An array of arguments. | |
* @param string $output Used to append additional content (passed by reference). | |
*/ | |
public function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output) | |
{ | |
} | |
/** | |
* Display array of elements hierarchically. | |
* | |
* Does not assume any existing order of elements. | |
* | |
* $max_depth = -1 means flatly display every element. | |
* $max_depth = 0 means display all levels. | |
* $max_depth > 0 specifies the number of display levels. | |
* | |
* @since 2.1.0 | |
* | |
* @param array $elements An array of elements. | |
* @param int $max_depth The maximum hierarchical depth. | |
* @return string The hierarchical item output. | |
*/ | |
public function walk($elements, $max_depth) | |
{ | |
} | |
/** | |
* paged_walk() - produce a page of nested elements | |
* | |
* Given an array of hierarchical elements, the maximum depth, a specific page number, | |
* and number of elements per page, this function first determines all top level root elements | |
* belonging to that page, then lists them and all of their children in hierarchical order. | |
* | |
* $max_depth = 0 means display all levels. | |
* $max_depth > 0 specifies the number of display levels. | |
* | |
* @since 2.7.0 | |
* | |
* @param array $elements | |
* @param int $max_depth The maximum hierarchical depth. | |
* @param int $page_num The specific page number, beginning with 1. | |
* @param int $per_page | |
* @return string XHTML of the specified page of elements | |
*/ | |
public function paged_walk($elements, $max_depth, $page_num, $per_page) | |
{ | |
} | |
/** | |
* Calculates the total number of root elements. | |
* | |
* @since 2.7.0 | |
* | |
* @param array $elements Elements to list. | |
* @return int Number of root elements. | |
*/ | |
public function get_number_of_root_elements($elements) | |
{ | |
} | |
/** | |
* Unset all the children for a given top level element. | |
* | |
* @since 2.7.0 | |
* | |
* @param object $e | |
* @param array $children_elements | |
*/ | |
public function unset_children($e, &$children_elements) | |
{ | |
} | |
} | |
/** | |
* Taxonomy API: Walker_Category_Checklist class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 4.4.0 | |
*/ | |
/** | |
* Core walker class to output an unordered list of category checkbox input elements. | |
* | |
* @since 2.5.1 | |
* | |
* @see Walker | |
* @see wp_category_checklist() | |
* @see wp_terms_checklist() | |
*/ | |
class Walker_Category_Checklist extends \Walker | |
{ | |
public $tree_type = 'category'; | |
public $db_fields = array('parent' => 'parent', 'id' => 'term_id'); | |
//TODO: decouple this | |
/** | |
* Starts the list before the elements are added. | |
* | |
* @see Walker:start_lvl() | |
* | |
* @since 2.5.1 | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Depth of category. Used for tab indentation. | |
* @param array $args An array of arguments. @see wp_terms_checklist() | |
*/ | |
public function start_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Ends the list of after the elements are added. | |
* | |
* @see Walker::end_lvl() | |
* | |
* @since 2.5.1 | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Depth of category. Used for tab indentation. | |
* @param array $args An array of arguments. @see wp_terms_checklist() | |
*/ | |
public function end_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Start the element output. | |
* | |
* @see Walker::start_el() | |
* | |
* @since 2.5.1 | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param object $category The current term object. | |
* @param int $depth Depth of the term in reference to parents. Default 0. | |
* @param array $args An array of arguments. @see wp_terms_checklist() | |
* @param int $id ID of the current term. | |
*/ | |
public function start_el(&$output, $category, $depth = 0, $args = array(), $id = 0) | |
{ | |
} | |
/** | |
* Ends the element output, if needed. | |
* | |
* @see Walker::end_el() | |
* | |
* @since 2.5.1 | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param object $category The current term object. | |
* @param int $depth Depth of the term in reference to parents. Default 0. | |
* @param array $args An array of arguments. @see wp_terms_checklist() | |
*/ | |
public function end_el(&$output, $category, $depth = 0, $args = array()) | |
{ | |
} | |
} | |
/** | |
* Nav Menu API: Walker_Nav_Menu class | |
* | |
* @package WordPress | |
* @subpackage Nav_Menus | |
* @since 4.6.0 | |
*/ | |
/** | |
* Core class used to implement an HTML list of nav menu items. | |
* | |
* @since 3.0.0 | |
* | |
* @see Walker | |
*/ | |
class Walker_Nav_Menu extends \Walker | |
{ | |
/** | |
* What the class handles. | |
* | |
* @since 3.0.0 | |
* @var string | |
* | |
* @see Walker::$tree_type | |
*/ | |
public $tree_type = array('post_type', 'taxonomy', 'custom'); | |
/** | |
* Database fields to use. | |
* | |
* @since 3.0.0 | |
* @todo Decouple this. | |
* @var array | |
* | |
* @see Walker::$db_fields | |
*/ | |
public $db_fields = array('parent' => 'menu_item_parent', 'id' => 'db_id'); | |
/** | |
* Starts the list before the elements are added. | |
* | |
* @since 3.0.0 | |
* | |
* @see Walker::start_lvl() | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Depth of menu item. Used for padding. | |
* @param stdClass $args An object of wp_nav_menu() arguments. | |
*/ | |
public function start_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Ends the list of after the elements are added. | |
* | |
* @since 3.0.0 | |
* | |
* @see Walker::end_lvl() | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Depth of menu item. Used for padding. | |
* @param stdClass $args An object of wp_nav_menu() arguments. | |
*/ | |
public function end_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Starts the element output. | |
* | |
* @since 3.0.0 | |
* @since 4.4.0 The {@see 'nav_menu_item_args'} filter was added. | |
* | |
* @see Walker::start_el() | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param WP_Post $item Menu item data object. | |
* @param int $depth Depth of menu item. Used for padding. | |
* @param stdClass $args An object of wp_nav_menu() arguments. | |
* @param int $id Current item ID. | |
*/ | |
public function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) | |
{ | |
} | |
/** | |
* Ends the element output, if needed. | |
* | |
* @since 3.0.0 | |
* | |
* @see Walker::end_el() | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param WP_Post $item Page data object. Not used. | |
* @param int $depth Depth of page. Not Used. | |
* @param stdClass $args An object of wp_nav_menu() arguments. | |
*/ | |
public function end_el(&$output, $item, $depth = 0, $args = array()) | |
{ | |
} | |
} | |
/** | |
* Navigation Menu API: Walker_Nav_Menu_Checklist class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 4.4.0 | |
*/ | |
/** | |
* Create HTML list of nav menu input items. | |
* | |
* @since 3.0.0 | |
* @uses Walker_Nav_Menu | |
*/ | |
class Walker_Nav_Menu_Checklist extends \Walker_Nav_Menu | |
{ | |
/** | |
* @param array $fields | |
*/ | |
public function __construct($fields = \false) | |
{ | |
} | |
/** | |
* Starts the list before the elements are added. | |
* | |
* @see Walker_Nav_Menu::start_lvl() | |
* | |
* @since 3.0.0 | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Depth of page. Used for padding. | |
* @param array $args Not used. | |
*/ | |
public function start_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Ends the list of after the elements are added. | |
* | |
* @see Walker_Nav_Menu::end_lvl() | |
* | |
* @since 3.0.0 | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Depth of page. Used for padding. | |
* @param array $args Not used. | |
*/ | |
public function end_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Start the element output. | |
* | |
* @see Walker_Nav_Menu::start_el() | |
* | |
* @since 3.0.0 | |
* | |
* @global int $_nav_menu_placeholder | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param object $item Menu item data object. | |
* @param int $depth Depth of menu item. Used for padding. | |
* @param array $args Not used. | |
* @param int $id Not used. | |
*/ | |
public function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) | |
{ | |
} | |
} | |
/** | |
* Navigation Menu API: Walker_Nav_Menu_Edit class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 4.4.0 | |
*/ | |
/** | |
* Create HTML list of nav menu input items. | |
* | |
* @since 3.0.0 | |
* | |
* @see Walker_Nav_Menu | |
*/ | |
class Walker_Nav_Menu_Edit extends \Walker_Nav_Menu | |
{ | |
/** | |
* Starts the list before the elements are added. | |
* | |
* @see Walker_Nav_Menu::start_lvl() | |
* | |
* @since 3.0.0 | |
* | |
* @param string $output Passed by reference. | |
* @param int $depth Depth of menu item. Used for padding. | |
* @param array $args Not used. | |
*/ | |
public function start_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Ends the list of after the elements are added. | |
* | |
* @see Walker_Nav_Menu::end_lvl() | |
* | |
* @since 3.0.0 | |
* | |
* @param string $output Passed by reference. | |
* @param int $depth Depth of menu item. Used for padding. | |
* @param array $args Not used. | |
*/ | |
public function end_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Start the element output. | |
* | |
* @see Walker_Nav_Menu::start_el() | |
* @since 3.0.0 | |
* | |
* @global int $_wp_nav_menu_max_depth | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param object $item Menu item data object. | |
* @param int $depth Depth of menu item. Used for padding. | |
* @param array $args Not used. | |
* @param int $id Not used. | |
*/ | |
public function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) | |
{ | |
} | |
} | |
/** | |
* Upgrader API: WP_Ajax_Upgrader_Skin class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Upgrader Skin for Ajax WordPress upgrades. | |
* | |
* This skin is designed to be used for Ajax updates. | |
* | |
* @since 4.6.0 | |
* | |
* @see Automatic_Upgrader_Skin | |
*/ | |
class WP_Ajax_Upgrader_Skin extends \Automatic_Upgrader_Skin | |
{ | |
/** | |
* Holds the WP_Error object. | |
* | |
* @since 4.6.0 | |
* @var null|WP_Error | |
*/ | |
protected $errors = \null; | |
/** | |
* Constructor. | |
* | |
* @since 4.6.0 | |
* | |
* @param array $args Options for the upgrader, see WP_Upgrader_Skin::__construct(). | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* Retrieves the list of errors. | |
* | |
* @since 4.6.0 | |
* | |
* @return WP_Error Errors during an upgrade. | |
*/ | |
public function get_errors() | |
{ | |
} | |
/** | |
* Retrieves a string for error messages. | |
* | |
* @since 4.6.0 | |
* | |
* @return string Error messages during an upgrade. | |
*/ | |
public function get_error_messages() | |
{ | |
} | |
/** | |
* Stores a log entry for an error. | |
* | |
* @since 4.6.0 | |
* | |
* @param string|WP_Error $errors Errors. | |
*/ | |
public function error($errors) | |
{ | |
} | |
/** | |
* Stores a log entry. | |
* | |
* @since 4.6.0 | |
* | |
* @param string|array|WP_Error $data Log entry data. | |
*/ | |
public function feedback($data) | |
{ | |
} | |
} | |
/** | |
* Upgrade API: WP_Automatic_Updater class | |
* | |
* @package WordPress | |
* @subpackage Upgrader | |
* @since 4.6.0 | |
*/ | |
/** | |
* Core class used for handling automatic background updates. | |
* | |
* @since 3.7.0 | |
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. | |
*/ | |
class WP_Automatic_Updater | |
{ | |
/** | |
* Tracks update results during processing. | |
* | |
* @var array | |
*/ | |
protected $update_results = array(); | |
/** | |
* Whether the entire automatic updater is disabled. | |
* | |
* @since 3.7.0 | |
*/ | |
public function is_disabled() | |
{ | |
} | |
/** | |
* Check for version control checkouts. | |
* | |
* Checks for Subversion, Git, Mercurial, and Bazaar. It recursively looks up the | |
* filesystem to the top of the drive, erring on the side of detecting a VCS | |
* checkout somewhere. | |
* | |
* ABSPATH is always checked in addition to whatever $context is (which may be the | |
* wp-content directory, for example). The underlying assumption is that if you are | |
* using version control *anywhere*, then you should be making decisions for | |
* how things get updated. | |
* | |
* @since 3.7.0 | |
* | |
* @param string $context The filesystem path to check, in addition to ABSPATH. | |
*/ | |
public function is_vcs_checkout($context) | |
{ | |
} | |
/** | |
* Tests to see if we can and should update a specific item. | |
* | |
* @since 3.7.0 | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param string $type The type of update being checked: 'core', 'theme', | |
* 'plugin', 'translation'. | |
* @param object $item The update offer. | |
* @param string $context The filesystem context (a path) against which filesystem | |
* access and status should be checked. | |
*/ | |
public function should_update($type, $item, $context) | |
{ | |
} | |
/** | |
* Notifies an administrator of a core update. | |
* | |
* @since 3.7.0 | |
* | |
* @param object $item The update offer. | |
*/ | |
protected function send_core_update_notification_email($item) | |
{ | |
} | |
/** | |
* Update an item, if appropriate. | |
* | |
* @since 3.7.0 | |
* | |
* @param string $type The type of update being checked: 'core', 'theme', 'plugin', 'translation'. | |
* @param object $item The update offer. | |
* | |
* @return null|WP_Error | |
*/ | |
public function update($type, $item) | |
{ | |
} | |
/** | |
* Kicks off the background update process, looping through all pending updates. | |
* | |
* @since 3.7.0 | |
*/ | |
public function run() | |
{ | |
} | |
/** | |
* If we tried to perform a core update, check if we should send an email, | |
* and if we need to avoid processing future updates. | |
* | |
* @since 3.7.0 | |
* | |
* @param object $update_result The result of the core update. Includes the update offer and result. | |
*/ | |
protected function after_core_update($update_result) | |
{ | |
} | |
/** | |
* Sends an email upon the completion or failure of a background core update. | |
* | |
* @since 3.7.0 | |
* | |
* @param string $type The type of email to send. Can be one of 'success', 'fail', 'manual', 'critical'. | |
* @param object $core_update The update offer that was attempted. | |
* @param mixed $result Optional. The result for the core update. Can be WP_Error. | |
*/ | |
protected function send_email($type, $core_update, $result = \null) | |
{ | |
} | |
/** | |
* Prepares and sends an email of a full log of background update results, useful for debugging and geekery. | |
* | |
* @since 3.7.0 | |
*/ | |
protected function send_debug_email() | |
{ | |
} | |
} | |
/** | |
* Administration API: WP_List_Table class | |
* | |
* @package WordPress | |
* @subpackage List_Table | |
* @since 3.1.0 | |
*/ | |
/** | |
* Base class for displaying a list of items in an ajaxified HTML table. | |
* | |
* @since 3.1.0 | |
* @access private | |
*/ | |
class WP_List_Table | |
{ | |
/** | |
* The current list of items. | |
* | |
* @since 3.1.0 | |
* @var array | |
*/ | |
public $items; | |
/** | |
* Various information about the current table. | |
* | |
* @since 3.1.0 | |
* @var array | |
*/ | |
protected $_args; | |
/** | |
* Various information needed for displaying the pagination. | |
* | |
* @since 3.1.0 | |
* @var array | |
*/ | |
protected $_pagination_args = array(); | |
/** | |
* The current screen. | |
* | |
* @since 3.1.0 | |
* @var object | |
*/ | |
protected $screen; | |
/** | |
* Cached bulk actions. | |
* | |
* @since 3.1.0 | |
* @var array | |
*/ | |
private $_actions; | |
/** | |
* Cached pagination output. | |
* | |
* @since 3.1.0 | |
* @var string | |
*/ | |
private $_pagination; | |
/** | |
* The view switcher modes. | |
* | |
* @since 4.1.0 | |
* @var array | |
*/ | |
protected $modes = array(); | |
/** | |
* Stores the value returned by ->get_column_info(). | |
* | |
* @since 4.1.0 | |
* @var array | |
*/ | |
protected $_column_headers; | |
/** | |
* {@internal Missing Summary} | |
* | |
* @var array | |
*/ | |
protected $compat_fields = array('_args', '_pagination_args', 'screen', '_actions', '_pagination'); | |
/** | |
* {@internal Missing Summary} | |
* | |
* @var array | |
*/ | |
protected $compat_methods = array('set_pagination_args', 'get_views', 'get_bulk_actions', 'bulk_actions', 'row_actions', 'months_dropdown', 'view_switcher', 'comments_bubble', 'get_items_per_page', 'pagination', 'get_sortable_columns', 'get_column_info', 'get_table_classes', 'display_tablenav', 'extra_tablenav', 'single_row_columns'); | |
/** | |
* Constructor. | |
* | |
* The child class should call this constructor from its own constructor to override | |
* the default $args. | |
* | |
* @since 3.1.0 | |
* | |
* @param array|string $args { | |
* Array or string of arguments. | |
* | |
* @type string $plural Plural value used for labels and the objects being listed. | |
* This affects things such as CSS class-names and nonces used | |
* in the list table, e.g. 'posts'. Default empty. | |
* @type string $singular Singular label for an object being listed, e.g. 'post'. | |
* Default empty | |
* @type bool $ajax Whether the list table supports Ajax. This includes loading | |
* and sorting data, for example. If true, the class will call | |
* the _js_vars() method in the footer to provide variables | |
* to any scripts handling Ajax events. Default false. | |
* @type string $screen String containing the hook name used to determine the current | |
* screen. If left null, the current screen will be automatically set. | |
* Default null. | |
* } | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* Make private properties readable for backward compatibility. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $name Property to get. | |
* @return mixed Property. | |
*/ | |
public function __get($name) | |
{ | |
} | |
/** | |
* Make private properties settable for backward compatibility. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $name Property to check if set. | |
* @param mixed $value Property value. | |
* @return mixed Newly-set property. | |
*/ | |
public function __set($name, $value) | |
{ | |
} | |
/** | |
* Make private properties checkable for backward compatibility. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $name Property to check if set. | |
* @return bool Whether the property is set. | |
*/ | |
public function __isset($name) | |
{ | |
} | |
/** | |
* Make private properties un-settable for backward compatibility. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $name Property to unset. | |
*/ | |
public function __unset($name) | |
{ | |
} | |
/** | |
* Make private/protected methods readable for backward compatibility. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $name Method to call. | |
* @param array $arguments Arguments to pass when calling. | |
* @return mixed|bool Return value of the callback, false otherwise. | |
*/ | |
public function __call($name, $arguments) | |
{ | |
} | |
/** | |
* Checks the current user's permissions | |
* | |
* @since 3.1.0 | |
* @abstract | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* Prepares the list of items for displaying. | |
* | |
* @uses WP_List_Table::set_pagination_args() | |
* | |
* @since 3.1.0 | |
* @abstract | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
* An internal method that sets all the necessary pagination arguments | |
* | |
* @since 3.1.0 | |
* | |
* @param array|string $args Array or string of arguments with information about the pagination. | |
*/ | |
protected function set_pagination_args($args) | |
{ | |
} | |
/** | |
* Access the pagination args. | |
* | |
* @since 3.1.0 | |
* | |
* @param string $key Pagination argument to retrieve. Common values include 'total_items', | |
* 'total_pages', 'per_page', or 'infinite_scroll'. | |
* @return int Number of items that correspond to the given pagination argument. | |
*/ | |
public function get_pagination_arg($key) | |
{ | |
} | |
/** | |
* Whether the table has items to display or not | |
* | |
* @since 3.1.0 | |
* | |
* @return bool | |
*/ | |
public function has_items() | |
{ | |
} | |
/** | |
* Message to be displayed when there are no items | |
* | |
* @since 3.1.0 | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* Displays the search box. | |
* | |
* @since 3.1.0 | |
* | |
* @param string $text The 'submit' button label. | |
* @param string $input_id ID attribute value for the search input field. | |
*/ | |
public function search_box($text, $input_id) | |
{ | |
} | |
/** | |
* Get an associative array ( id => link ) with the list | |
* of views available on this table. | |
* | |
* @since 3.1.0 | |
* | |
* @return array | |
*/ | |
protected function get_views() | |
{ | |
} | |
/** | |
* Display the list of views available on this table. | |
* | |
* @since 3.1.0 | |
*/ | |
public function views() | |
{ | |
} | |
/** | |
* Get an associative array ( option_name => option_title ) with the list | |
* of bulk actions available on this table. | |
* | |
* @since 3.1.0 | |
* | |
* @return array | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
* Display the bulk actions dropdown. | |
* | |
* @since 3.1.0 | |
* | |
* @param string $which The location of the bulk actions: 'top' or 'bottom'. | |
* This is designated as optional for backward compatibility. | |
*/ | |
protected function bulk_actions($which = '') | |
{ | |
} | |
/** | |
* Get the current action selected from the bulk actions dropdown. | |
* | |
* @since 3.1.0 | |
* | |
* @return string|false The action name or False if no action was selected | |
*/ | |
public function current_action() | |
{ | |
} | |
/** | |
* Generate row actions div | |
* | |
* @since 3.1.0 | |
* | |
* @param string[] $actions An array of action links. | |
* @param bool $always_visible Whether the actions should be always visible. | |
* @return string | |
*/ | |
protected function row_actions($actions, $always_visible = \false) | |
{ | |
} | |
/** | |
* Display a monthly dropdown for filtering items | |
* | |
* @since 3.1.0 | |
* | |
* @global wpdb $wpdb | |
* @global WP_Locale $wp_locale | |
* | |
* @param string $post_type | |
*/ | |
protected function months_dropdown($post_type) | |
{ | |
} | |
/** | |
* Display a view switcher | |
* | |
* @since 3.1.0 | |
* | |
* @param string $current_mode | |
*/ | |
protected function view_switcher($current_mode) | |
{ | |
} | |
/** | |
* Display a comment count bubble | |
* | |
* @since 3.1.0 | |
* | |
* @param int $post_id The post ID. | |
* @param int $pending_comments Number of pending comments. | |
*/ | |
protected function comments_bubble($post_id, $pending_comments) | |
{ | |
} | |
/** | |
* Get the current page number | |
* | |
* @since 3.1.0 | |
* | |
* @return int | |
*/ | |
public function get_pagenum() | |
{ | |
} | |
/** | |
* Get number of items to display on a single page | |
* | |
* @since 3.1.0 | |
* | |
* @param string $option | |
* @param int $default | |
* @return int | |
*/ | |
protected function get_items_per_page($option, $default = 20) | |
{ | |
} | |
/** | |
* Display the pagination. | |
* | |
* @since 3.1.0 | |
* | |
* @param string $which | |
*/ | |
protected function pagination($which) | |
{ | |
} | |
/** | |
* Get a list of columns. The format is: | |
* 'internal-name' => 'Title' | |
* | |
* @since 3.1.0 | |
* @abstract | |
* | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* Get a list of sortable columns. The format is: | |
* 'internal-name' => 'orderby' | |
* or | |
* 'internal-name' => array( 'orderby', true ) | |
* | |
* The second format will make the initial sorting order be descending | |
* | |
* @since 3.1.0 | |
* | |
* @return array | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
* Gets the name of the default primary column. | |
* | |
* @since 4.3.0 | |
* | |
* @return string Name of the default primary column, in this case, an empty string. | |
*/ | |
protected function get_default_primary_column_name() | |
{ | |
} | |
/** | |
* Public wrapper for WP_List_Table::get_default_primary_column_name(). | |
* | |
* @since 4.4.0 | |
* | |
* @return string Name of the default primary column. | |
*/ | |
public function get_primary_column() | |
{ | |
} | |
/** | |
* Gets the name of the primary column. | |
* | |
* @since 4.3.0 | |
* | |
* @return string The name of the primary column. | |
*/ | |
protected function get_primary_column_name() | |
{ | |
} | |
/** | |
* Get a list of all, hidden and sortable columns, with filter applied | |
* | |
* @since 3.1.0 | |
* | |
* @return array | |
*/ | |
protected function get_column_info() | |
{ | |
} | |
/** | |
* Return number of visible columns | |
* | |
* @since 3.1.0 | |
* | |
* @return int | |
*/ | |
public function get_column_count() | |
{ | |
} | |
/** | |
* Print column headers, accounting for hidden and sortable columns. | |
* | |
* @since 3.1.0 | |
* | |
* @staticvar int $cb_counter | |
* | |
* @param bool $with_id Whether to set the id attribute or not | |
*/ | |
public function print_column_headers($with_id = \true) | |
{ | |
} | |
/** | |
* Display the table | |
* | |
* @since 3.1.0 | |
*/ | |
public function display() | |
{ | |
} | |
/** | |
* Get a list of CSS classes for the WP_List_Table table tag. | |
* | |
* @since 3.1.0 | |
* | |
* @return array List of CSS classes for the table tag. | |
*/ | |
protected function get_table_classes() | |
{ | |
} | |
/** | |
* Generate the table navigation above or below the table | |
* | |
* @since 3.1.0 | |
* @param string $which | |
*/ | |
protected function display_tablenav($which) | |
{ | |
} | |
/** | |
* Extra controls to be displayed between bulk actions and pagination | |
* | |
* @since 3.1.0 | |
* | |
* @param string $which | |
*/ | |
protected function extra_tablenav($which) | |
{ | |
} | |
/** | |
* Generate the tbody element for the list table. | |
* | |
* @since 3.1.0 | |
*/ | |
public function display_rows_or_placeholder() | |
{ | |
} | |
/** | |
* Generate the table rows | |
* | |
* @since 3.1.0 | |
*/ | |
public function display_rows() | |
{ | |
} | |
/** | |
* Generates content for a single row of the table | |
* | |
* @since 3.1.0 | |
* | |
* @param object $item The current item | |
*/ | |
public function single_row($item) | |
{ | |
} | |
/** | |
* @param object $item | |
* @param string $column_name | |
*/ | |
protected function column_default($item, $column_name) | |
{ | |
} | |
/** | |
* @param object $item | |
*/ | |
protected function column_cb($item) | |
{ | |
} | |
/** | |
* Generates the columns for a single row of the table | |
* | |
* @since 3.1.0 | |
* | |
* @param object $item The current item | |
*/ | |
protected function single_row_columns($item) | |
{ | |
} | |
/** | |
* Generates and display row actions links for the list table. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $item The item being acted upon. | |
* @param string $column_name Current column name. | |
* @param string $primary Primary column name. | |
* @return string The row actions HTML, or an empty string if the current column is the primary column. | |
*/ | |
protected function handle_row_actions($item, $column_name, $primary) | |
{ | |
} | |
/** | |
* Handle an incoming ajax request (called from admin-ajax.php) | |
* | |
* @since 3.1.0 | |
*/ | |
public function ajax_response() | |
{ | |
} | |
/** | |
* Send required variables to JavaScript land | |
*/ | |
public function _js_vars() | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_Comments_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying comments in a list table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Table | |
*/ | |
class WP_Comments_List_Table extends \WP_List_Table | |
{ | |
public $checkbox = \true; | |
public $pending_count = array(); | |
public $extra_items; | |
private $user_can; | |
/** | |
* Constructor. | |
* | |
* @since 3.1.0 | |
* | |
* @see WP_List_Table::__construct() for more information on default arguments. | |
* | |
* @global int $post_id | |
* | |
* @param array $args An associative array of arguments. | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
public function floated_admin_avatar($name, $comment_ID) | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* @global int $post_id | |
* @global string $comment_status | |
* @global string $search | |
* @global string $comment_type | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
* @param string $comment_status | |
* @return int | |
*/ | |
public function get_per_page($comment_status = 'all') | |
{ | |
} | |
/** | |
* @global string $comment_status | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* @global int $post_id | |
* @global string $comment_status | |
* @global string $comment_type | |
*/ | |
protected function get_views() | |
{ | |
} | |
/** | |
* @global string $comment_status | |
* | |
* @return array | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
* @global string $comment_status | |
* @global string $comment_type | |
* | |
* @param string $which | |
*/ | |
protected function extra_tablenav($which) | |
{ | |
} | |
/** | |
* @return string|false | |
*/ | |
public function current_action() | |
{ | |
} | |
/** | |
* @global int $post_id | |
* | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
* Get the name of the default primary column. | |
* | |
* @since 4.3.0 | |
* | |
* @return string Name of the default primary column, in this case, 'comment'. | |
*/ | |
protected function get_default_primary_column_name() | |
{ | |
} | |
/** | |
*/ | |
public function display() | |
{ | |
} | |
/** | |
* @global WP_Post $post | |
* @global WP_Comment $comment | |
* | |
* @param WP_Comment $item | |
*/ | |
public function single_row($item) | |
{ | |
} | |
/** | |
* Generate and display row actions links. | |
* | |
* @since 4.3.0 | |
* | |
* @global string $comment_status Status for the current listed comments. | |
* | |
* @param WP_Comment $comment The comment object. | |
* @param string $column_name Current column name. | |
* @param string $primary Primary column name. | |
* @return string|void Comment row actions output. | |
*/ | |
protected function handle_row_actions($comment, $column_name, $primary) | |
{ | |
} | |
/** | |
* @param WP_Comment $comment The comment object. | |
*/ | |
public function column_cb($comment) | |
{ | |
} | |
/** | |
* @param WP_Comment $comment The comment object. | |
*/ | |
public function column_comment($comment) | |
{ | |
} | |
/** | |
* @global string $comment_status | |
* | |
* @param WP_Comment $comment The comment object. | |
*/ | |
public function column_author($comment) | |
{ | |
} | |
/** | |
* @param WP_Comment $comment The comment object. | |
*/ | |
public function column_date($comment) | |
{ | |
} | |
/** | |
* @param WP_Comment $comment The comment object. | |
*/ | |
public function column_response($comment) | |
{ | |
} | |
/** | |
* @param WP_Comment $comment The comment object. | |
* @param string $column_name The custom column's name. | |
*/ | |
public function column_default($comment, $column_name) | |
{ | |
} | |
} | |
/** | |
* Administration: Community Events class. | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 4.8.0 | |
*/ | |
/** | |
* Class WP_Community_Events. | |
* | |
* A client for api.wordpress.org/events. | |
* | |
* @since 4.8.0 | |
*/ | |
class WP_Community_Events | |
{ | |
/** | |
* ID for a WordPress user account. | |
* | |
* @since 4.8.0 | |
* | |
* @var int | |
*/ | |
protected $user_id = 0; | |
/** | |
* Stores location data for the user. | |
* | |
* @since 4.8.0 | |
* | |
* @var bool|array | |
*/ | |
protected $user_location = \false; | |
/** | |
* Constructor for WP_Community_Events. | |
* | |
* @since 4.8.0 | |
* | |
* @param int $user_id WP user ID. | |
* @param bool|array $user_location Stored location data for the user. | |
* false to pass no location; | |
* array to pass a location { | |
* @type string $description The name of the location | |
* @type string $latitude The latitude in decimal degrees notation, without the degree | |
* symbol. e.g.: 47.615200. | |
* @type string $longitude The longitude in decimal degrees notation, without the degree | |
* symbol. e.g.: -122.341100. | |
* @type string $country The ISO 3166-1 alpha-2 country code. e.g.: BR | |
* } | |
*/ | |
public function __construct($user_id, $user_location = \false) | |
{ | |
} | |
/** | |
* Gets data about events near a particular location. | |
* | |
* Cached events will be immediately returned if the `user_location` property | |
* is set for the current user, and cached events exist for that location. | |
* | |
* Otherwise, this method sends a request to the w.org Events API with location | |
* data. The API will send back a recognized location based on the data, along | |
* with nearby events. | |
* | |
* The browser's request for events is proxied with this method, rather | |
* than having the browser make the request directly to api.wordpress.org, | |
* because it allows results to be cached server-side and shared with other | |
* users and sites in the network. This makes the process more efficient, | |
* since increasing the number of visits that get cached data means users | |
* don't have to wait as often; if the user's browser made the request | |
* directly, it would also need to make a second request to WP in order to | |
* pass the data for caching. Having WP make the request also introduces | |
* the opportunity to anonymize the IP before sending it to w.org, which | |
* mitigates possible privacy concerns. | |
* | |
* @since 4.8.0 | |
* | |
* @param string $location_search Optional. City name to help determine the location. | |
* e.g., "Seattle". Default empty string. | |
* @param string $timezone Optional. Timezone to help determine the location. | |
* Default empty string. | |
* @return array|WP_Error A WP_Error on failure; an array with location and events on | |
* success. | |
*/ | |
public function get_events($location_search = '', $timezone = '') | |
{ | |
} | |
/** | |
* Builds an array of args to use in an HTTP request to the w.org Events API. | |
* | |
* @since 4.8.0 | |
* | |
* @param string $search Optional. City search string. Default empty string. | |
* @param string $timezone Optional. Timezone string. Default empty string. | |
* @return array The request args. | |
*/ | |
protected function get_request_args($search = '', $timezone = '') | |
{ | |
} | |
/** | |
* Determines the user's actual IP address and attempts to partially | |
* anonymize an IP address by converting it to a network ID. | |
* | |
* Geolocating the network ID usually returns a similar location as the | |
* actual IP, but provides some privacy for the user. | |
* | |
* $_SERVER['REMOTE_ADDR'] cannot be used in all cases, such as when the user | |
* is making their request through a proxy, or when the web server is behind | |
* a proxy. In those cases, $_SERVER['REMOTE_ADDR'] is set to the proxy address rather | |
* than the user's actual address. | |
* | |
* Modified from https://stackoverflow.com/a/2031935/450127, MIT license. | |
* Modified from https://github.com/geertw/php-ip-anonymizer, MIT license. | |
* | |
* SECURITY WARNING: This function is _NOT_ intended to be used in | |
* circumstances where the authenticity of the IP address matters. This does | |
* _NOT_ guarantee that the returned address is valid or accurate, and it can | |
* be easily spoofed. | |
* | |
* @since 4.8.0 | |
* | |
* @return false|string The anonymized address on success; the given address | |
* or false on failure. | |
*/ | |
public static function get_unsafe_client_ip() | |
{ | |
} | |
/** | |
* Test if two pairs of latitude/longitude coordinates match each other. | |
* | |
* @since 4.8.0 | |
* | |
* @param array $a The first pair, with indexes 'latitude' and 'longitude'. | |
* @param array $b The second pair, with indexes 'latitude' and 'longitude'. | |
* @return bool True if they match, false if they don't. | |
*/ | |
protected function coordinates_match($a, $b) | |
{ | |
} | |
/** | |
* Generates a transient key based on user location. | |
* | |
* This could be reduced to a one-liner in the calling functions, but it's | |
* intentionally a separate function because it's called from multiple | |
* functions, and having it abstracted keeps the logic consistent and DRY, | |
* which is less prone to errors. | |
* | |
* @since 4.8.0 | |
* | |
* @param array $location Should contain 'latitude' and 'longitude' indexes. | |
* @return bool|string false on failure, or a string on success. | |
*/ | |
protected function get_events_transient_key($location) | |
{ | |
} | |
/** | |
* Caches an array of events data from the Events API. | |
* | |
* @since 4.8.0 | |
* | |
* @param array $events Response body from the API request. | |
* @param int|bool $expiration Optional. Amount of time to cache the events. Defaults to false. | |
* @return bool true if events were cached; false if not. | |
*/ | |
protected function cache_events($events, $expiration = \false) | |
{ | |
} | |
/** | |
* Gets cached events. | |
* | |
* @since 4.8.0 | |
* | |
* @return false|array false on failure; an array containing `location` | |
* and `events` items on success. | |
*/ | |
public function get_cached_events() | |
{ | |
} | |
/** | |
* Adds formatted date and time items for each event in an API response. | |
* | |
* This has to be called after the data is pulled from the cache, because | |
* the cached events are shared by all users. If it was called before storing | |
* the cache, then all users would see the events in the localized data/time | |
* of the user who triggered the cache refresh, rather than their own. | |
* | |
* @since 4.8.0 | |
* | |
* @param array $response_body The response which contains the events. | |
* @return array The response with dates and times formatted. | |
*/ | |
protected function format_event_data_time($response_body) | |
{ | |
} | |
/** | |
* Prepares the event list for presentation. | |
* | |
* Discards expired events, and makes WordCamps "sticky." Attendees need more | |
* advanced notice about WordCamps than they do for meetups, so camps should | |
* appear in the list sooner. If a WordCamp is coming up, the API will "stick" | |
* it in the response, even if it wouldn't otherwise appear. When that happens, | |
* the event will be at the end of the list, and will need to be moved into a | |
* higher position, so that it doesn't get trimmed off. | |
* | |
* @since 4.8.0 | |
* @since 4.9.7 Stick a WordCamp to the final list. | |
* | |
* @param array $response_body The response body which contains the events. | |
* @return array The response body with events trimmed. | |
*/ | |
protected function trim_events($response_body) | |
{ | |
} | |
/** | |
* Logs responses to Events API requests. | |
* | |
* @since 4.8.0 | |
* @deprecated 4.9.0 Use a plugin instead. See #41217 for an example. | |
* | |
* @param string $message A description of what occurred. | |
* @param array $details Details that provide more context for the | |
* log entry. | |
*/ | |
protected function maybe_log_events_response($message, $details) | |
{ | |
} | |
} | |
/** | |
* Base WordPress Filesystem | |
* | |
* @package WordPress | |
* @subpackage Filesystem | |
*/ | |
/** | |
* Base WordPress Filesystem class for which Filesystem implementations extend | |
* | |
* @since 2.5.0 | |
*/ | |
class WP_Filesystem_Base | |
{ | |
/** | |
* Whether to display debug data for the connection. | |
* | |
* @since 2.5.0 | |
* @var bool | |
*/ | |
public $verbose = \false; | |
/** | |
* Cached list of local filepaths to mapped remote filepaths. | |
* | |
* @since 2.7.0 | |
* @var array | |
*/ | |
public $cache = array(); | |
/** | |
* The Access method of the current connection, Set automatically. | |
* | |
* @since 2.5.0 | |
* @var string | |
*/ | |
public $method = ''; | |
/** | |
* @var WP_Error | |
*/ | |
public $errors = \null; | |
/** | |
*/ | |
public $options = array(); | |
/** | |
* Return the path on the remote filesystem of ABSPATH. | |
* | |
* @since 2.7.0 | |
* | |
* @return string The location of the remote path. | |
*/ | |
public function abspath() | |
{ | |
} | |
/** | |
* Return the path on the remote filesystem of WP_CONTENT_DIR. | |
* | |
* @since 2.7.0 | |
* | |
* @return string The location of the remote path. | |
*/ | |
public function wp_content_dir() | |
{ | |
} | |
/** | |
* Return the path on the remote filesystem of WP_PLUGIN_DIR. | |
* | |
* @since 2.7.0 | |
* | |
* @return string The location of the remote path. | |
*/ | |
public function wp_plugins_dir() | |
{ | |
} | |
/** | |
* Return the path on the remote filesystem of the Themes Directory. | |
* | |
* @since 2.7.0 | |
* | |
* @param string $theme The Theme stylesheet or template for the directory. | |
* @return string The location of the remote path. | |
*/ | |
public function wp_themes_dir($theme = \false) | |
{ | |
} | |
/** | |
* Return the path on the remote filesystem of WP_LANG_DIR. | |
* | |
* @since 3.2.0 | |
* | |
* @return string The location of the remote path. | |
*/ | |
public function wp_lang_dir() | |
{ | |
} | |
/** | |
* Locate a folder on the remote filesystem. | |
* | |
* @since 2.5.0 | |
* @deprecated 2.7.0 use WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir() instead. | |
* @see WP_Filesystem::abspath() | |
* @see WP_Filesystem::wp_content_dir() | |
* @see WP_Filesystem::wp_plugins_dir() | |
* @see WP_Filesystem::wp_themes_dir() | |
* @see WP_Filesystem::wp_lang_dir() | |
* | |
* @param string $base The folder to start searching from. | |
* @param bool $echo True to display debug information. | |
* Default false. | |
* @return string The location of the remote path. | |
*/ | |
public function find_base_dir($base = '.', $echo = \false) | |
{ | |
} | |
/** | |
* Locate a folder on the remote filesystem. | |
* | |
* @since 2.5.0 | |
* @deprecated 2.7.0 use WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir() methods instead. | |
* @see WP_Filesystem::abspath() | |
* @see WP_Filesystem::wp_content_dir() | |
* @see WP_Filesystem::wp_plugins_dir() | |
* @see WP_Filesystem::wp_themes_dir() | |
* @see WP_Filesystem::wp_lang_dir() | |
* | |
* @param string $base The folder to start searching from. | |
* @param bool $echo True to display debug information. | |
* @return string The location of the remote path. | |
*/ | |
public function get_base_dir($base = '.', $echo = \false) | |
{ | |
} | |
/** | |
* Locate a folder on the remote filesystem. | |
* | |
* Assumes that on Windows systems, Stripping off the Drive | |
* letter is OK Sanitizes \\ to / in windows filepaths. | |
* | |
* @since 2.7.0 | |
* | |
* @param string $folder the folder to locate. | |
* @return string|false The location of the remote path, false on failure. | |
*/ | |
public function find_folder($folder) | |
{ | |
} | |
/** | |
* Locate a folder on the remote filesystem. | |
* | |
* Expects Windows sanitized path. | |
* | |
* @since 2.7.0 | |
* | |
* @param string $folder The folder to locate. | |
* @param string $base The folder to start searching from. | |
* @param bool $loop If the function has recursed, Internal use only. | |
* @return string|false The location of the remote path, false to cease looping. | |
*/ | |
public function search_for_folder($folder, $base = '.', $loop = \false) | |
{ | |
} | |
/** | |
* Return the *nix-style file permissions for a file. | |
* | |
* From the PHP documentation page for fileperms(). | |
* | |
* @link https://secure.php.net/manual/en/function.fileperms.php | |
* | |
* @since 2.5.0 | |
* | |
* @param string $file String filename. | |
* @return string The *nix-style representation of permissions. | |
*/ | |
public function gethchmod($file) | |
{ | |
} | |
/** | |
* Gets the permissions of the specified file or filepath in their octal format | |
* | |
* @since 2.5.0 | |
* @param string $file | |
* @return string the last 3 characters of the octal number | |
*/ | |
public function getchmod($file) | |
{ | |
} | |
/** | |
* Convert *nix-style file permissions to a octal number. | |
* | |
* Converts '-rw-r--r--' to 0644 | |
* From "info at rvgate dot nl"'s comment on the PHP documentation for chmod() | |
* | |
* @link https://secure.php.net/manual/en/function.chmod.php#49614 | |
* | |
* @since 2.5.0 | |
* | |
* @param string $mode string The *nix-style file permission. | |
* @return int octal representation | |
*/ | |
public function getnumchmodfromh($mode) | |
{ | |
} | |
/** | |
* Determine if the string provided contains binary characters. | |
* | |
* @since 2.7.0 | |
* | |
* @param string $text String to test against. | |
* @return bool true if string is binary, false otherwise. | |
*/ | |
public function is_binary($text) | |
{ | |
} | |
/** | |
* Change the ownership of a file / folder. | |
* | |
* Default behavior is to do nothing, override this in your subclass, if desired. | |
* | |
* @since 2.5.0 | |
* | |
* @param string $file Path to the file. | |
* @param mixed $owner A user name or number. | |
* @param bool $recursive Optional. If set True changes file owner recursivly. Defaults to False. | |
* @return bool Returns true on success or false on failure. | |
*/ | |
public function chown($file, $owner, $recursive = \false) | |
{ | |
} | |
/** | |
* Connect filesystem. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @return bool True on success or false on failure (always true for WP_Filesystem_Direct). | |
*/ | |
public function connect() | |
{ | |
} | |
/** | |
* Read entire file into a string. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Name of the file to read. | |
* @return mixed|bool Returns the read data or false on failure. | |
*/ | |
public function get_contents($file) | |
{ | |
} | |
/** | |
* Read entire file into an array. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to the file. | |
* @return array|bool the file contents in an array or false on failure. | |
*/ | |
public function get_contents_array($file) | |
{ | |
} | |
/** | |
* Write a string to a file. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Remote path to the file where to write the data. | |
* @param string $contents The data to write. | |
* @param int $mode Optional. The file permissions as octal number, usually 0644. | |
* @return bool False on failure. | |
*/ | |
public function put_contents($file, $contents, $mode = \false) | |
{ | |
} | |
/** | |
* Get the current working directory. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @return string|bool The current working directory on success, or false on failure. | |
*/ | |
public function cwd() | |
{ | |
} | |
/** | |
* Change current directory. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $dir The new current directory. | |
* @return bool|string | |
*/ | |
public function chdir($dir) | |
{ | |
} | |
/** | |
* Change the file group. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to the file. | |
* @param mixed $group A group name or number. | |
* @param bool $recursive Optional. If set True changes file group recursively. Defaults to False. | |
* @return bool|string | |
*/ | |
public function chgrp($file, $group, $recursive = \false) | |
{ | |
} | |
/** | |
* Change filesystem permissions. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to the file. | |
* @param int $mode Optional. The permissions as octal number, usually 0644 for files, 0755 for dirs. | |
* @param bool $recursive Optional. If set True changes file group recursively. Defaults to False. | |
* @return bool|string | |
*/ | |
public function chmod($file, $mode = \false, $recursive = \false) | |
{ | |
} | |
/** | |
* Get the file owner. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to the file. | |
* @return string|bool Username of the user or false on error. | |
*/ | |
public function owner($file) | |
{ | |
} | |
/** | |
* Get the file's group. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to the file. | |
* @return string|bool The group or false on error. | |
*/ | |
public function group($file) | |
{ | |
} | |
/** | |
* Copy a file. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $source Path to the source file. | |
* @param string $destination Path to the destination file. | |
* @param bool $overwrite Optional. Whether to overwrite the destination file if it exists. | |
* Default false. | |
* @param int $mode Optional. The permissions as octal number, usually 0644 for files, 0755 for dirs. | |
* Default false. | |
* @return bool True if file copied successfully, False otherwise. | |
*/ | |
public function copy($source, $destination, $overwrite = \false, $mode = \false) | |
{ | |
} | |
/** | |
* Move a file. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $source Path to the source file. | |
* @param string $destination Path to the destination file. | |
* @param bool $overwrite Optional. Whether to overwrite the destination file if it exists. | |
* Default false. | |
* @return bool True if file copied successfully, False otherwise. | |
*/ | |
public function move($source, $destination, $overwrite = \false) | |
{ | |
} | |
/** | |
* Delete a file or directory. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to the file. | |
* @param bool $recursive Optional. If set True changes file group recursively. Defaults to False. | |
* Default false. | |
* @param bool $type Type of resource. 'f' for file, 'd' for directory. | |
* Default false. | |
* @return bool True if the file or directory was deleted, false on failure. | |
*/ | |
public function delete($file, $recursive = \false, $type = \false) | |
{ | |
} | |
/** | |
* Check if a file or directory exists. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to file/directory. | |
* @return bool Whether $file exists or not. | |
*/ | |
public function exists($file) | |
{ | |
} | |
/** | |
* Check if resource is a file. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file File path. | |
* @return bool Whether $file is a file. | |
*/ | |
public function is_file($file) | |
{ | |
} | |
/** | |
* Check if resource is a directory. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $path Directory path. | |
* @return bool Whether $path is a directory. | |
*/ | |
public function is_dir($path) | |
{ | |
} | |
/** | |
* Check if a file is readable. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to file. | |
* @return bool Whether $file is readable. | |
*/ | |
public function is_readable($file) | |
{ | |
} | |
/** | |
* Check if a file or directory is writable. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to file. | |
* @return bool Whether $file is writable. | |
*/ | |
public function is_writable($file) | |
{ | |
} | |
/** | |
* Gets the file's last access time. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to file. | |
* @return int|bool Unix timestamp representing last access time. | |
*/ | |
public function atime($file) | |
{ | |
} | |
/** | |
* Gets the file modification time. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to file. | |
* @return int|bool Unix timestamp representing modification time. | |
*/ | |
public function mtime($file) | |
{ | |
} | |
/** | |
* Gets the file size (in bytes). | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to file. | |
* @return int|bool Size of the file in bytes. | |
*/ | |
public function size($file) | |
{ | |
} | |
/** | |
* Set the access and modification times of a file. | |
* | |
* Note: If $file doesn't exist, it will be created. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $file Path to file. | |
* @param int $time Optional. Modified time to set for file. | |
* Default 0. | |
* @param int $atime Optional. Access time to set for file. | |
* Default 0. | |
* @return bool Whether operation was successful or not. | |
*/ | |
public function touch($file, $time = 0, $atime = 0) | |
{ | |
} | |
/** | |
* Create a directory. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $path Path for new directory. | |
* @param mixed $chmod Optional. The permissions as octal number, (or False to skip chmod) | |
* Default false. | |
* @param mixed $chown Optional. A user name or number (or False to skip chown) | |
* Default false. | |
* @param mixed $chgrp Optional. A group name or number (or False to skip chgrp). | |
* Default false. | |
* @return bool False if directory cannot be created, true otherwise. | |
*/ | |
public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false) | |
{ | |
} | |
/** | |
* Delete a directory. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $path Path to directory. | |
* @param bool $recursive Optional. Whether to recursively remove files/directories. | |
* Default false. | |
* @return bool Whether directory is deleted successfully or not. | |
*/ | |
public function rmdir($path, $recursive = \false) | |
{ | |
} | |
/** | |
* Get details for files in a directory or a specific file. | |
* | |
* @since 2.5.0 | |
* @abstract | |
* | |
* @param string $path Path to directory or file. | |
* @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files. | |
* Default true. | |
* @param bool $recursive Optional. Whether to recursively include file details in nested directories. | |
* Default false. | |
* @return array|bool { | |
* Array of files. False if unable to list directory contents. | |
* | |
* @type string $name Name of the file/directory. | |
* @type string $perms *nix representation of permissions. | |
* @type int $permsn Octal representation of permissions. | |
* @type string $owner Owner name or ID. | |
* @type int $size Size of file in bytes. | |
* @type int $lastmodunix Last modified unix timestamp. | |
* @type mixed $lastmod Last modified month (3 letter) and day (without leading 0). | |
* @type int $time Last modified time. | |
* @type string $type Type of resource. 'f' for file, 'd' for directory. | |
* @type mixed $files If a directory and $recursive is true, contains another array of files. | |
* } | |
*/ | |
public function dirlist($path, $include_hidden = \true, $recursive = \false) | |
{ | |
} | |
} | |
/** | |
* WordPress Direct Filesystem. | |
* | |
* @package WordPress | |
* @subpackage Filesystem | |
*/ | |
/** | |
* WordPress Filesystem Class for direct PHP file and folder manipulation. | |
* | |
* @since 2.5.0 | |
* | |
* @see WP_Filesystem_Base | |
*/ | |
class WP_Filesystem_Direct extends \WP_Filesystem_Base | |
{ | |
/** | |
* constructor | |
* | |
* @param mixed $arg ignored argument | |
*/ | |
public function __construct($arg) | |
{ | |
} | |
/** | |
* Reads entire file into a string | |
* | |
* @param string $file Name of the file to read. | |
* @return string|bool The function returns the read data or false on failure. | |
*/ | |
public function get_contents($file) | |
{ | |
} | |
/** | |
* Reads entire file into an array | |
* | |
* @param string $file Path to the file. | |
* @return array|bool the file contents in an array or false on failure. | |
*/ | |
public function get_contents_array($file) | |
{ | |
} | |
/** | |
* Write a string to a file | |
* | |
* @param string $file Remote path to the file where to write the data. | |
* @param string $contents The data to write. | |
* @param int $mode Optional. The file permissions as octal number, usually 0644. | |
* Default false. | |
* @return bool False upon failure, true otherwise. | |
*/ | |
public function put_contents($file, $contents, $mode = \false) | |
{ | |
} | |
/** | |
* Gets the current working directory | |
* | |
* @return string|bool the current working directory on success, or false on failure. | |
*/ | |
public function cwd() | |
{ | |
} | |
/** | |
* Change directory | |
* | |
* @param string $dir The new current directory. | |
* @return bool Returns true on success or false on failure. | |
*/ | |
public function chdir($dir) | |
{ | |
} | |
/** | |
* Changes file group | |
* | |
* @param string $file Path to the file. | |
* @param mixed $group A group name or number. | |
* @param bool $recursive Optional. If set True changes file group recursively. Default false. | |
* @return bool Returns true on success or false on failure. | |
*/ | |
public function chgrp($file, $group, $recursive = \false) | |
{ | |
} | |
/** | |
* Changes filesystem permissions | |
* | |
* @param string $file Path to the file. | |
* @param int $mode Optional. The permissions as octal number, usually 0644 for files, | |
* 0755 for dirs. Default false. | |
* @param bool $recursive Optional. If set True changes file group recursively. Default false. | |
* @return bool Returns true on success or false on failure. | |
*/ | |
public function chmod($file, $mode = \false, $recursive = \false) | |
{ | |
} | |
/** | |
* Changes file owner | |
* | |
* @param string $file Path to the file. | |
* @param mixed $owner A user name or number. | |
* @param bool $recursive Optional. If set True changes file owner recursively. | |
* Default false. | |
* @return bool Returns true on success or false on failure. | |
*/ | |
public function chown($file, $owner, $recursive = \false) | |
{ | |
} | |
/** | |
* Gets file owner | |
* | |
* @param string $file Path to the file. | |
* @return string|bool Username of the user or false on error. | |
*/ | |
public function owner($file) | |
{ | |
} | |
/** | |
* Gets file permissions | |
* | |
* FIXME does not handle errors in fileperms() | |
* | |
* @param string $file Path to the file. | |
* @return string Mode of the file (last 3 digits). | |
*/ | |
public function getchmod($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return string|false | |
*/ | |
public function group($file) | |
{ | |
} | |
/** | |
* @param string $source | |
* @param string $destination | |
* @param bool $overwrite | |
* @param int $mode | |
* @return bool | |
*/ | |
public function copy($source, $destination, $overwrite = \false, $mode = \false) | |
{ | |
} | |
/** | |
* @param string $source | |
* @param string $destination | |
* @param bool $overwrite | |
* @return bool | |
*/ | |
public function move($source, $destination, $overwrite = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param bool $recursive | |
* @param string $type | |
* @return bool | |
*/ | |
public function delete($file, $recursive = \false, $type = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function exists($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_file($file) | |
{ | |
} | |
/** | |
* @param string $path | |
* @return bool | |
*/ | |
public function is_dir($path) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_readable($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_writable($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return int | |
*/ | |
public function atime($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return int | |
*/ | |
public function mtime($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return int | |
*/ | |
public function size($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param int $time | |
* @param int $atime | |
* @return bool | |
*/ | |
public function touch($file, $time = 0, $atime = 0) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param mixed $chmod | |
* @param mixed $chown | |
* @param mixed $chgrp | |
* @return bool | |
*/ | |
public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param bool $recursive | |
* @return bool | |
*/ | |
public function rmdir($path, $recursive = \false) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param bool $include_hidden | |
* @param bool $recursive | |
* @return bool|array | |
*/ | |
public function dirlist($path, $include_hidden = \true, $recursive = \false) | |
{ | |
} | |
} | |
/** | |
* WordPress FTP Filesystem. | |
* | |
* @package WordPress | |
* @subpackage Filesystem | |
*/ | |
/** | |
* WordPress Filesystem Class for implementing FTP. | |
* | |
* @since 2.5.0 | |
* | |
* @see WP_Filesystem_Base | |
*/ | |
class WP_Filesystem_FTPext extends \WP_Filesystem_Base | |
{ | |
public $link; | |
/** | |
* @param array $opt | |
*/ | |
public function __construct($opt = '') | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function connect() | |
{ | |
} | |
/** | |
* Retrieves the file contents. | |
* | |
* @since 2.5.0 | |
* | |
* @param string $file Filename. | |
* @return string|false File contents on success, false if no temp file could be opened, | |
* or if the file couldn't be retrieved. | |
*/ | |
public function get_contents($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return array | |
*/ | |
public function get_contents_array($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param string $contents | |
* @param bool|int $mode | |
* @return bool | |
*/ | |
public function put_contents($file, $contents, $mode = \false) | |
{ | |
} | |
/** | |
* @return string | |
*/ | |
public function cwd() | |
{ | |
} | |
/** | |
* @param string $dir | |
* @return bool | |
*/ | |
public function chdir($dir) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param int $mode | |
* @param bool $recursive | |
* @return bool | |
*/ | |
public function chmod($file, $mode = \false, $recursive = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return string | |
*/ | |
public function owner($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return string | |
*/ | |
public function getchmod($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return string | |
*/ | |
public function group($file) | |
{ | |
} | |
/** | |
* @param string $source | |
* @param string $destination | |
* @param bool $overwrite | |
* @param string|bool $mode | |
* @return bool | |
*/ | |
public function copy($source, $destination, $overwrite = \false, $mode = \false) | |
{ | |
} | |
/** | |
* @param string $source | |
* @param string $destination | |
* @param bool $overwrite | |
* @return bool | |
*/ | |
public function move($source, $destination, $overwrite = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param bool $recursive | |
* @param string $type | |
* @return bool | |
*/ | |
public function delete($file, $recursive = \false, $type = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function exists($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_file($file) | |
{ | |
} | |
/** | |
* @param string $path | |
* @return bool | |
*/ | |
public function is_dir($path) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_readable($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_writable($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function atime($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return int | |
*/ | |
public function mtime($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return int | |
*/ | |
public function size($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function touch($file, $time = 0, $atime = 0) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param mixed $chmod | |
* @param mixed $chown | |
* @param mixed $chgrp | |
* @return bool | |
*/ | |
public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param bool $recursive | |
* @return bool | |
*/ | |
public function rmdir($path, $recursive = \false) | |
{ | |
} | |
/** | |
* @staticvar bool $is_windows | |
* @param string $line | |
* @return array | |
*/ | |
public function parselisting($line) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param bool $include_hidden | |
* @param bool $recursive | |
* @return bool|array | |
*/ | |
public function dirlist($path = '.', $include_hidden = \true, $recursive = \false) | |
{ | |
} | |
/** | |
*/ | |
public function __destruct() | |
{ | |
} | |
} | |
/** | |
* WordPress FTP Sockets Filesystem. | |
* | |
* @package WordPress | |
* @subpackage Filesystem | |
*/ | |
/** | |
* WordPress Filesystem Class for implementing FTP Sockets. | |
* | |
* @since 2.5.0 | |
* | |
* @see WP_Filesystem_Base | |
*/ | |
class WP_Filesystem_ftpsockets extends \WP_Filesystem_Base | |
{ | |
/** | |
* @var ftp | |
*/ | |
public $ftp; | |
/** | |
* @param array $opt | |
*/ | |
public function __construct($opt = '') | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function connect() | |
{ | |
} | |
/** | |
* Retrieves the file contents. | |
* | |
* @since 2.5.0 | |
* | |
* @param string $file Filename. | |
* @return string|false File contents on success, false if no temp file could be opened, | |
* or if the file doesn't exist. | |
*/ | |
public function get_contents($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return array | |
*/ | |
public function get_contents_array($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param string $contents | |
* @param int|bool $mode | |
* @return bool | |
*/ | |
public function put_contents($file, $contents, $mode = \false) | |
{ | |
} | |
/** | |
* @return string | |
*/ | |
public function cwd() | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function chdir($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param int|bool $mode | |
* @param bool $recursive | |
* @return bool | |
*/ | |
public function chmod($file, $mode = \false, $recursive = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return string | |
*/ | |
public function owner($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return string | |
*/ | |
public function getchmod($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return string | |
*/ | |
public function group($file) | |
{ | |
} | |
/** | |
* @param string $source | |
* @param string $destination | |
* @param bool $overwrite | |
* @param int|bool $mode | |
* @return bool | |
*/ | |
public function copy($source, $destination, $overwrite = \false, $mode = \false) | |
{ | |
} | |
/** | |
* @param string $source | |
* @param string $destination | |
* @param bool $overwrite | |
* @return bool | |
*/ | |
public function move($source, $destination, $overwrite = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param bool $recursive | |
* @param string $type | |
* @return bool | |
*/ | |
public function delete($file, $recursive = \false, $type = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function exists($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_file($file) | |
{ | |
} | |
/** | |
* @param string $path | |
* @return bool | |
*/ | |
public function is_dir($path) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_readable($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_writable($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function atime($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return int | |
*/ | |
public function mtime($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return int | |
*/ | |
public function size($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param int $time | |
* @param int $atime | |
* @return bool | |
*/ | |
public function touch($file, $time = 0, $atime = 0) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param mixed $chmod | |
* @param mixed $chown | |
* @param mixed $chgrp | |
* @return bool | |
*/ | |
public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param bool $recursive | |
* @return bool | |
*/ | |
public function rmdir($path, $recursive = \false) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param bool $include_hidden | |
* @param bool $recursive | |
* @return bool|array | |
*/ | |
public function dirlist($path = '.', $include_hidden = \true, $recursive = \false) | |
{ | |
} | |
/** | |
*/ | |
public function __destruct() | |
{ | |
} | |
} | |
/** | |
* WordPress Filesystem Class for implementing SSH2 | |
* | |
* To use this class you must follow these steps for PHP 5.2.6+ | |
* | |
* @contrib http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/ - Installation Notes | |
* | |
* Complie libssh2 (Note: Only 0.14 is officaly working with PHP 5.2.6+ right now, But many users have found the latest versions work) | |
* | |
* cd /usr/src | |
* wget http://surfnet.dl.sourceforge.net/sourceforge/libssh2/libssh2-0.14.tar.gz | |
* tar -zxvf libssh2-0.14.tar.gz | |
* cd libssh2-0.14/ | |
* ./configure | |
* make all install | |
* | |
* Note: Do not leave the directory yet! | |
* | |
* Enter: pecl install -f ssh2 | |
* | |
* Copy the ssh.so file it creates to your PHP Module Directory. | |
* Open up your PHP.INI file and look for where extensions are placed. | |
* Add in your PHP.ini file: extension=ssh2.so | |
* | |
* Restart Apache! | |
* Check phpinfo() streams to confirm that: ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp exist. | |
* | |
* Note: as of WordPress 2.8, This utilises the PHP5+ function 'stream_get_contents' | |
* | |
* @since 2.7.0 | |
* | |
* @package WordPress | |
* @subpackage Filesystem | |
*/ | |
class WP_Filesystem_SSH2 extends \WP_Filesystem_Base | |
{ | |
/** | |
*/ | |
public $link = \false; | |
/** | |
* @var resource | |
*/ | |
public $sftp_link; | |
public $keys = \false; | |
/** | |
* @param array $opt | |
*/ | |
public function __construct($opt = '') | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function connect() | |
{ | |
} | |
/** | |
* Gets the ssh2.sftp PHP stream wrapper path to open for the given file. | |
* | |
* This method also works around a PHP bug where the root directory (/) cannot | |
* be opened by PHP functions, causing a false failure. In order to work around | |
* this, the path is converted to /./ which is semantically the same as / | |
* See https://bugs.php.net/bug.php?id=64169 for more details. | |
* | |
* @since 4.4.0 | |
* | |
* @param string $path The File/Directory path on the remote server to return | |
* @return string The ssh2.sftp:// wrapped path to use. | |
*/ | |
public function sftp_path($path) | |
{ | |
} | |
/** | |
* @param string $command | |
* @param bool $returnbool | |
* @return bool|string True on success, false on failure. String if the command was executed, `$returnbool` | |
* is false (default), and data from the resulting stream was retrieved. | |
*/ | |
public function run_command($command, $returnbool = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return string|false | |
*/ | |
public function get_contents($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return array | |
*/ | |
public function get_contents_array($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param string $contents | |
* @param bool|int $mode | |
* @return bool | |
*/ | |
public function put_contents($file, $contents, $mode = \false) | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function cwd() | |
{ | |
} | |
/** | |
* @param string $dir | |
* @return bool|string | |
*/ | |
public function chdir($dir) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param string $group | |
* @param bool $recursive | |
* | |
* @return bool | |
*/ | |
public function chgrp($file, $group, $recursive = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param int $mode | |
* @param bool $recursive | |
* @return bool|string | |
*/ | |
public function chmod($file, $mode = \false, $recursive = \false) | |
{ | |
} | |
/** | |
* Change the ownership of a file / folder. | |
* | |
* @param string $file Path to the file. | |
* @param string|int $owner A user name or number. | |
* @param bool $recursive Optional. If set True changes file owner recursivly. Default False. | |
* @return bool True on success or false on failure. | |
*/ | |
public function chown($file, $owner, $recursive = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return string|false | |
*/ | |
public function owner($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return string | |
*/ | |
public function getchmod($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return string|false | |
*/ | |
public function group($file) | |
{ | |
} | |
/** | |
* @param string $source | |
* @param string $destination | |
* @param bool $overwrite | |
* @param int|bool $mode | |
* @return bool | |
*/ | |
public function copy($source, $destination, $overwrite = \false, $mode = \false) | |
{ | |
} | |
/** | |
* @param string $source | |
* @param string $destination | |
* @param bool $overwrite | |
* @return bool | |
*/ | |
public function move($source, $destination, $overwrite = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param bool $recursive | |
* @param string|bool $type | |
* @return bool | |
*/ | |
public function delete($file, $recursive = \false, $type = \false) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function exists($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_file($file) | |
{ | |
} | |
/** | |
* @param string $path | |
* @return bool | |
*/ | |
public function is_dir($path) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_readable($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return bool | |
*/ | |
public function is_writable($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return int | |
*/ | |
public function atime($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return int | |
*/ | |
public function mtime($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @return int | |
*/ | |
public function size($file) | |
{ | |
} | |
/** | |
* @param string $file | |
* @param int $time | |
* @param int $atime | |
*/ | |
public function touch($file, $time = 0, $atime = 0) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param mixed $chmod | |
* @param mixed $chown | |
* @param mixed $chgrp | |
* @return bool | |
*/ | |
public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param bool $recursive | |
* @return bool | |
*/ | |
public function rmdir($path, $recursive = \false) | |
{ | |
} | |
/** | |
* @param string $path | |
* @param bool $include_hidden | |
* @param bool $recursive | |
* @return bool|array | |
*/ | |
public function dirlist($path, $include_hidden = \true, $recursive = \false) | |
{ | |
} | |
} | |
/** | |
* WP_Importer base class | |
*/ | |
class WP_Importer | |
{ | |
/** | |
* Class Constructor | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Returns array with imported permalinks from WordPress database | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param string $importer_name | |
* @param string $bid | |
* @return array | |
*/ | |
public function get_imported_posts($importer_name, $bid) | |
{ | |
} | |
/** | |
* Return count of imported permalinks from WordPress database | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param string $importer_name | |
* @param string $bid | |
* @return int | |
*/ | |
public function count_imported_posts($importer_name, $bid) | |
{ | |
} | |
/** | |
* Set array with imported comments from WordPress database | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param string $bid | |
* @return array | |
*/ | |
public function get_imported_comments($bid) | |
{ | |
} | |
/** | |
* @param int $blog_id | |
* @return int|void | |
*/ | |
public function set_blog($blog_id) | |
{ | |
} | |
/** | |
* @param int $user_id | |
* @return int|void | |
*/ | |
public function set_user($user_id) | |
{ | |
} | |
/** | |
* Sort by strlen, longest string first | |
* | |
* @param string $a | |
* @param string $b | |
* @return int | |
*/ | |
public function cmpr_strlen($a, $b) | |
{ | |
} | |
/** | |
* GET URL | |
* | |
* @param string $url | |
* @param string $username | |
* @param string $password | |
* @param bool $head | |
* @return array | |
*/ | |
public function get_page($url, $username = '', $password = '', $head = \false) | |
{ | |
} | |
/** | |
* Bump up the request timeout for http requests | |
* | |
* @param int $val | |
* @return int | |
*/ | |
public function bump_request_timeout($val) | |
{ | |
} | |
/** | |
* Check if user has exceeded disk quota | |
* | |
* @return bool | |
*/ | |
public function is_user_over_quota() | |
{ | |
} | |
/** | |
* Replace newlines, tabs, and multiple spaces with a single space | |
* | |
* @param string $string | |
* @return string | |
*/ | |
public function min_whitespace($string) | |
{ | |
} | |
/** | |
* Resets global variables that grow out of control during imports. | |
* | |
* @since 3.0.0 | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* @global array $wp_actions | |
*/ | |
public function stop_the_insanity() | |
{ | |
} | |
} | |
/** | |
* Administration API: WP_Internal_Pointers class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 4.4.0 | |
*/ | |
/** | |
* Core class used to implement an internal admin pointers API. | |
* | |
* @since 3.3.0 | |
*/ | |
final class WP_Internal_Pointers | |
{ | |
/** | |
* Initializes the new feature pointers. | |
* | |
* @since 3.3.0 | |
* | |
* All pointers can be disabled using the following: | |
* remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) ); | |
* | |
* Individual pointers (e.g. wp390_widgets) can be disabled using the following: | |
* remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp390_widgets' ) ); | |
* | |
* @param string $hook_suffix The current admin page. | |
*/ | |
public static function enqueue_scripts($hook_suffix) | |
{ | |
} | |
/** | |
* Print the pointer JavaScript data. | |
* | |
* @since 3.3.0 | |
* | |
* @param string $pointer_id The pointer ID. | |
* @param string $selector The HTML elements, on which the pointer should be attached. | |
* @param array $args Arguments to be passed to the pointer JS (see wp-pointer.js). | |
*/ | |
private static function print_js($pointer_id, $selector, $args) | |
{ | |
} | |
public static function pointer_wp330_toolbar() | |
{ | |
} | |
public static function pointer_wp330_media_uploader() | |
{ | |
} | |
public static function pointer_wp330_saving_widgets() | |
{ | |
} | |
public static function pointer_wp340_customize_current_theme_link() | |
{ | |
} | |
public static function pointer_wp340_choose_image_from_library() | |
{ | |
} | |
public static function pointer_wp350_media() | |
{ | |
} | |
public static function pointer_wp360_revisions() | |
{ | |
} | |
public static function pointer_wp360_locks() | |
{ | |
} | |
public static function pointer_wp390_widgets() | |
{ | |
} | |
public static function pointer_wp410_dfw() | |
{ | |
} | |
/** | |
* Display a pointer for the new privacy tools. | |
* | |
* @since 4.9.6 | |
*/ | |
public static function pointer_wp496_privacy() | |
{ | |
} | |
/** | |
* Prevents new users from seeing existing 'new feature' pointers. | |
* | |
* @since 3.3.0 | |
* | |
* @param int $user_id User ID. | |
*/ | |
public static function dismiss_pointers_for_new_users($user_id) | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_Links_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying links in a list table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Tsble | |
*/ | |
class WP_Links_List_Table extends \WP_List_Table | |
{ | |
/** | |
* Constructor. | |
* | |
* @since 3.1.0 | |
* | |
* @see WP_List_Table::__construct() for more information on default arguments. | |
* | |
* @param array $args An associative array of arguments. | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* @global int $cat_id | |
* @global string $s | |
* @global string $orderby | |
* @global string $order | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
* @global int $cat_id | |
* @param string $which | |
*/ | |
protected function extra_tablenav($which) | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
* Get the name of the default primary column. | |
* | |
* @since 4.3.0 | |
* | |
* @return string Name of the default primary column, in this case, 'name'. | |
*/ | |
protected function get_default_primary_column_name() | |
{ | |
} | |
/** | |
* Handles the checkbox column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $link The current link object. | |
*/ | |
public function column_cb($link) | |
{ | |
} | |
/** | |
* Handles the link name column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $link The current link object. | |
*/ | |
public function column_name($link) | |
{ | |
} | |
/** | |
* Handles the link URL column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $link The current link object. | |
*/ | |
public function column_url($link) | |
{ | |
} | |
/** | |
* Handles the link categories column output. | |
* | |
* @since 4.3.0 | |
* | |
* @global int $cat_id | |
* | |
* @param object $link The current link object. | |
*/ | |
public function column_categories($link) | |
{ | |
} | |
/** | |
* Handles the link relation column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $link The current link object. | |
*/ | |
public function column_rel($link) | |
{ | |
} | |
/** | |
* Handles the link visibility column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $link The current link object. | |
*/ | |
public function column_visible($link) | |
{ | |
} | |
/** | |
* Handles the link rating column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $link The current link object. | |
*/ | |
public function column_rating($link) | |
{ | |
} | |
/** | |
* Handles the default column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $link Link object. | |
* @param string $column_name Current column name. | |
*/ | |
public function column_default($link, $column_name) | |
{ | |
} | |
public function display_rows() | |
{ | |
} | |
/** | |
* Generates and displays row action links. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $link Link being acted upon. | |
* @param string $column_name Current column name. | |
* @param string $primary Primary column name. | |
* @return string Row action output for links. | |
*/ | |
protected function handle_row_actions($link, $column_name, $primary) | |
{ | |
} | |
} | |
/** | |
* Helper functions for displaying a list of items in an ajaxified HTML table. | |
* | |
* @package WordPress | |
* @subpackage List_Table | |
* @since 4.7.0 | |
*/ | |
/** | |
* Helper class to be used only by back compat functions | |
* | |
* @since 3.1.0 | |
*/ | |
class _WP_List_Table_Compat extends \WP_List_Table | |
{ | |
public $_screen; | |
public $_columns; | |
public function __construct($screen, $columns = array()) | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_column_info() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_Media_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying media items in a list table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Table | |
*/ | |
class WP_Media_List_Table extends \WP_List_Table | |
{ | |
/** | |
* Holds the number of pending comments for each post. | |
* | |
* @since 4.4.0 | |
* @var array | |
*/ | |
protected $comment_pending_count = array(); | |
private $detached; | |
private $is_trash; | |
/** | |
* Constructor. | |
* | |
* @since 3.1.0 | |
* | |
* @see WP_List_Table::__construct() for more information on default arguments. | |
* | |
* @param array $args An associative array of arguments. | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* @global WP_Query $wp_query | |
* @global array $post_mime_types | |
* @global array $avail_post_mime_types | |
* @global string $mode | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
* @global array $post_mime_types | |
* @global array $avail_post_mime_types | |
* @return array | |
*/ | |
protected function get_views() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
* @param string $which | |
*/ | |
protected function extra_tablenav($which) | |
{ | |
} | |
/** | |
* @return string | |
*/ | |
public function current_action() | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function has_items() | |
{ | |
} | |
/** | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* Override parent views so we can use the filter bar display. | |
* | |
* @global string $mode List table view mode. | |
*/ | |
public function views() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
* Handles the checkbox column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_cb($post) | |
{ | |
} | |
/** | |
* Handles the title column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_title($post) | |
{ | |
} | |
/** | |
* Handles the author column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_author($post) | |
{ | |
} | |
/** | |
* Handles the description column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_desc($post) | |
{ | |
} | |
/** | |
* Handles the date column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_date($post) | |
{ | |
} | |
/** | |
* Handles the parent column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_parent($post) | |
{ | |
} | |
/** | |
* Handles the comments column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_comments($post) | |
{ | |
} | |
/** | |
* Handles output for the default column. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
* @param string $column_name Current column name. | |
*/ | |
public function column_default($post, $column_name) | |
{ | |
} | |
/** | |
* @global WP_Post $post | |
*/ | |
public function display_rows() | |
{ | |
} | |
/** | |
* Gets the name of the default primary column. | |
* | |
* @since 4.3.0 | |
* | |
* @return string Name of the default primary column, in this case, 'title'. | |
*/ | |
protected function get_default_primary_column_name() | |
{ | |
} | |
/** | |
* @param WP_Post $post | |
* @param string $att_title | |
* | |
* @return array | |
*/ | |
private function _get_row_actions($post, $att_title) | |
{ | |
} | |
/** | |
* Generates and displays row action links. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $post Attachment being acted upon. | |
* @param string $column_name Current column name. | |
* @param string $primary Primary column name. | |
* @return string Row actions output for media attachments. | |
*/ | |
protected function handle_row_actions($post, $column_name, $primary) | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_MS_Sites_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying sites in a list table for the network admin. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Table | |
*/ | |
class WP_MS_Sites_List_Table extends \WP_List_Table | |
{ | |
/** | |
* Site status list. | |
* | |
* @since 4.3.0 | |
* @var array | |
*/ | |
public $status_list; | |
/** | |
* Constructor. | |
* | |
* @since 3.1.0 | |
* | |
* @see WP_List_Table::__construct() for more information on default arguments. | |
* | |
* @param array $args An associative array of arguments. | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* Prepares the list of sites for display. | |
* | |
* @since 3.1.0 | |
* | |
* @global string $s | |
* @global string $mode | |
* @global wpdb $wpdb | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
* @global string $mode List table view mode. | |
* | |
* @param string $which | |
*/ | |
protected function pagination($which) | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
* Handles the checkbox column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param array $blog Current site. | |
*/ | |
public function column_cb($blog) | |
{ | |
} | |
/** | |
* Handles the ID column output. | |
* | |
* @since 4.4.0 | |
* | |
* @param array $blog Current site. | |
*/ | |
public function column_id($blog) | |
{ | |
} | |
/** | |
* Handles the site name column output. | |
* | |
* @since 4.3.0 | |
* | |
* @global string $mode List table view mode. | |
* | |
* @param array $blog Current site. | |
*/ | |
public function column_blogname($blog) | |
{ | |
} | |
/** | |
* Handles the lastupdated column output. | |
* | |
* @since 4.3.0 | |
* | |
* @global string $mode List table view mode. | |
* | |
* @param array $blog Current site. | |
*/ | |
public function column_lastupdated($blog) | |
{ | |
} | |
/** | |
* Handles the registered column output. | |
* | |
* @since 4.3.0 | |
* | |
* @global string $mode List table view mode. | |
* | |
* @param array $blog Current site. | |
*/ | |
public function column_registered($blog) | |
{ | |
} | |
/** | |
* Handles the users column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param array $blog Current site. | |
*/ | |
public function column_users($blog) | |
{ | |
} | |
/** | |
* Handles the plugins column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param array $blog Current site. | |
*/ | |
public function column_plugins($blog) | |
{ | |
} | |
/** | |
* Handles output for the default column. | |
* | |
* @since 4.3.0 | |
* | |
* @param array $blog Current site. | |
* @param string $column_name Current column name. | |
*/ | |
public function column_default($blog, $column_name) | |
{ | |
} | |
/** | |
* @global string $mode | |
*/ | |
public function display_rows() | |
{ | |
} | |
/** | |
* Gets the name of the default primary column. | |
* | |
* @since 4.3.0 | |
* | |
* @return string Name of the default primary column, in this case, 'blogname'. | |
*/ | |
protected function get_default_primary_column_name() | |
{ | |
} | |
/** | |
* Generates and displays row action links. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $blog Site being acted upon. | |
* @param string $column_name Current column name. | |
* @param string $primary Primary column name. | |
* @return string Row actions output. | |
*/ | |
protected function handle_row_actions($blog, $column_name, $primary) | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_MS_Themes_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying themes in a list table for the network admin. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Table | |
*/ | |
class WP_MS_Themes_List_Table extends \WP_List_Table | |
{ | |
public $site_id; | |
public $is_site_themes; | |
private $has_items; | |
/** | |
* Constructor. | |
* | |
* @since 3.1.0 | |
* | |
* @see WP_List_Table::__construct() for more information on default arguments. | |
* | |
* @global string $status | |
* @global int $page | |
* | |
* @param array $args An associative array of arguments. | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_table_classes() | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* @global string $status | |
* @global array $totals | |
* @global int $page | |
* @global string $orderby | |
* @global string $order | |
* @global string $s | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
* @staticvar string $term | |
* @param WP_Theme $theme | |
* @return bool | |
*/ | |
public function _search_callback($theme) | |
{ | |
} | |
// Not used by any core columns. | |
/** | |
* @global string $orderby | |
* @global string $order | |
* @param array $theme_a | |
* @param array $theme_b | |
* @return int | |
*/ | |
public function _order_callback($theme_a, $theme_b) | |
{ | |
} | |
/** | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
* Gets the name of the primary column. | |
* | |
* @since 4.3.0 | |
* | |
* @return string Unalterable name of the primary column name, in this case, 'name'. | |
*/ | |
protected function get_primary_column_name() | |
{ | |
} | |
/** | |
* @global array $totals | |
* @global string $status | |
* @return array | |
*/ | |
protected function get_views() | |
{ | |
} | |
/** | |
* @global string $status | |
* | |
* @return array | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
*/ | |
public function display_rows() | |
{ | |
} | |
/** | |
* Handles the checkbox column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Theme $theme The current WP_Theme object. | |
*/ | |
public function column_cb($theme) | |
{ | |
} | |
/** | |
* Handles the name column output. | |
* | |
* @since 4.3.0 | |
* | |
* @global string $status | |
* @global int $page | |
* @global string $s | |
* | |
* @param WP_Theme $theme The current WP_Theme object. | |
*/ | |
public function column_name($theme) | |
{ | |
} | |
/** | |
* Handles the description column output. | |
* | |
* @since 4.3.0 | |
* | |
* @global string $status | |
* @global array $totals | |
* | |
* @param WP_Theme $theme The current WP_Theme object. | |
*/ | |
public function column_description($theme) | |
{ | |
} | |
/** | |
* Handles default column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Theme $theme The current WP_Theme object. | |
* @param string $column_name The current column name. | |
*/ | |
public function column_default($theme, $column_name) | |
{ | |
} | |
/** | |
* Handles the output for a single table row. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Theme $item The current WP_Theme object. | |
*/ | |
public function single_row_columns($item) | |
{ | |
} | |
/** | |
* @global string $status | |
* @global array $totals | |
* | |
* @param WP_Theme $theme | |
*/ | |
public function single_row($theme) | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_MS_Users_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying users in a list table for the network admin. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Table | |
*/ | |
class WP_MS_Users_List_Table extends \WP_List_Table | |
{ | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* @global string $usersearch | |
* @global string $role | |
* @global wpdb $wpdb | |
* @global string $mode | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* @global string $role | |
* @return array | |
*/ | |
protected function get_views() | |
{ | |
} | |
/** | |
* @global string $mode List table view mode. | |
* | |
* @param string $which | |
*/ | |
protected function pagination($which) | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
* Handles the checkbox column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_User $user The current WP_User object. | |
*/ | |
public function column_cb($user) | |
{ | |
} | |
/** | |
* Handles the ID column output. | |
* | |
* @since 4.4.0 | |
* | |
* @param WP_User $user The current WP_User object. | |
*/ | |
public function column_id($user) | |
{ | |
} | |
/** | |
* Handles the username column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_User $user The current WP_User object. | |
*/ | |
public function column_username($user) | |
{ | |
} | |
/** | |
* Handles the name column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_User $user The current WP_User object. | |
*/ | |
public function column_name($user) | |
{ | |
} | |
/** | |
* Handles the email column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_User $user The current WP_User object. | |
*/ | |
public function column_email($user) | |
{ | |
} | |
/** | |
* Handles the registered date column output. | |
* | |
* @since 4.3.0 | |
* | |
* @global string $mode List table view mode. | |
* | |
* @param WP_User $user The current WP_User object. | |
*/ | |
public function column_registered($user) | |
{ | |
} | |
/** | |
* @since 4.3.0 | |
* | |
* @param WP_User $user | |
* @param string $classes | |
* @param string $data | |
* @param string $primary | |
*/ | |
protected function _column_blogs($user, $classes, $data, $primary) | |
{ | |
} | |
/** | |
* Handles the sites column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_User $user The current WP_User object. | |
*/ | |
public function column_blogs($user) | |
{ | |
} | |
/** | |
* Handles the default column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_User $user The current WP_User object. | |
* @param string $column_name The current column name. | |
*/ | |
public function column_default($user, $column_name) | |
{ | |
} | |
public function display_rows() | |
{ | |
} | |
/** | |
* Gets the name of the default primary column. | |
* | |
* @since 4.3.0 | |
* | |
* @return string Name of the default primary column, in this case, 'username'. | |
*/ | |
protected function get_default_primary_column_name() | |
{ | |
} | |
/** | |
* Generates and displays row action links. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $user User being acted upon. | |
* @param string $column_name Current column name. | |
* @param string $primary Primary column name. | |
* @return string Row actions output for users in Multisite. | |
*/ | |
protected function handle_row_actions($user, $column_name, $primary) | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_Plugin_Install_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying plugins to install in a list table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Table | |
*/ | |
class WP_Plugin_Install_List_Table extends \WP_List_Table | |
{ | |
public $order = 'ASC'; | |
public $orderby = \null; | |
public $groups = array(); | |
private $error; | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* Return the list of known plugins. | |
* | |
* Uses the transient data from the updates API to determine the known | |
* installed plugins. | |
* | |
* @since 4.9.0 | |
* @access protected | |
* | |
* @return array | |
*/ | |
protected function get_installed_plugins() | |
{ | |
} | |
/** | |
* Return a list of slugs of installed plugins, if known. | |
* | |
* Uses the transient data from the updates API to determine the slugs of | |
* known installed plugins. This might be better elsewhere, perhaps even | |
* within get_plugins(). | |
* | |
* @since 4.0.0 | |
* | |
* @return array | |
*/ | |
protected function get_installed_plugin_slugs() | |
{ | |
} | |
/** | |
* @global array $tabs | |
* @global string $tab | |
* @global int $paged | |
* @global string $type | |
* @global string $term | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* @global array $tabs | |
* @global string $tab | |
* | |
* @return array | |
*/ | |
protected function get_views() | |
{ | |
} | |
/** | |
* Override parent views so we can use the filter bar display. | |
*/ | |
public function views() | |
{ | |
} | |
/** | |
* Override the parent display() so we can provide a different container. | |
*/ | |
public function display() | |
{ | |
} | |
/** | |
* @global string $tab | |
* | |
* @param string $which | |
*/ | |
protected function display_tablenav($which) | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_table_classes() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* @param object $plugin_a | |
* @param object $plugin_b | |
* @return int | |
*/ | |
private function order_callback($plugin_a, $plugin_b) | |
{ | |
} | |
public function display_rows() | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_Plugins_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying installed plugins in a list table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Table | |
*/ | |
class WP_Plugins_List_Table extends \WP_List_Table | |
{ | |
/** | |
* Constructor. | |
* | |
* @since 3.1.0 | |
* | |
* @see WP_List_Table::__construct() for more information on default arguments. | |
* | |
* @global string $status | |
* @global int $page | |
* | |
* @param array $args An associative array of arguments. | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_table_classes() | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* @global string $status | |
* @global array $plugins | |
* @global array $totals | |
* @global int $page | |
* @global string $orderby | |
* @global string $order | |
* @global string $s | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
* @global string $s URL encoded search term. | |
* | |
* @param array $plugin | |
* @return bool | |
*/ | |
public function _search_callback($plugin) | |
{ | |
} | |
/** | |
* @global string $orderby | |
* @global string $order | |
* @param array $plugin_a | |
* @param array $plugin_b | |
* @return int | |
*/ | |
public function _order_callback($plugin_a, $plugin_b) | |
{ | |
} | |
/** | |
* @global array $plugins | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* Displays the search box. | |
* | |
* @since 4.6.0 | |
* | |
* @param string $text The 'submit' button label. | |
* @param string $input_id ID attribute value for the search input field. | |
*/ | |
public function search_box($text, $input_id) | |
{ | |
} | |
/** | |
* @global string $status | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
* @global array $totals | |
* @global string $status | |
* @return array | |
*/ | |
protected function get_views() | |
{ | |
} | |
/** | |
* @global string $status | |
* @return array | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
* @global string $status | |
* @param string $which | |
*/ | |
public function bulk_actions($which = '') | |
{ | |
} | |
/** | |
* @global string $status | |
* @param string $which | |
*/ | |
protected function extra_tablenav($which) | |
{ | |
} | |
/** | |
* @return string | |
*/ | |
public function current_action() | |
{ | |
} | |
/** | |
* @global string $status | |
*/ | |
public function display_rows() | |
{ | |
} | |
/** | |
* @global string $status | |
* @global int $page | |
* @global string $s | |
* @global array $totals | |
* | |
* @param array $item | |
*/ | |
public function single_row($item) | |
{ | |
} | |
/** | |
* Gets the name of the primary column for this specific list table. | |
* | |
* @since 4.3.0 | |
* | |
* @return string Unalterable name for the primary column, in this case, 'name'. | |
*/ | |
protected function get_primary_column_name() | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_Post_Comments_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 4.4.0 | |
*/ | |
/** | |
* Core class used to implement displaying post comments in a list table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_Comments_List_Table | |
*/ | |
class WP_Post_Comments_List_Table extends \WP_Comments_List_Table | |
{ | |
/** | |
* @return array | |
*/ | |
protected function get_column_info() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_table_classes() | |
{ | |
} | |
/** | |
* @param bool $output_empty | |
*/ | |
public function display($output_empty = \false) | |
{ | |
} | |
/** | |
* @param bool $comment_status | |
* @return int | |
*/ | |
public function get_per_page($comment_status = \false) | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_Posts_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying posts in a list table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Table | |
*/ | |
class WP_Posts_List_Table extends \WP_List_Table | |
{ | |
/** | |
* Whether the items should be displayed hierarchically or linearly. | |
* | |
* @since 3.1.0 | |
* @var bool | |
*/ | |
protected $hierarchical_display; | |
/** | |
* Holds the number of pending comments for each post. | |
* | |
* @since 3.1.0 | |
* @var array | |
*/ | |
protected $comment_pending_count; | |
/** | |
* Holds the number of posts for this user. | |
* | |
* @since 3.1.0 | |
* @var int | |
*/ | |
private $user_posts_count; | |
/** | |
* Holds the number of posts which are sticky. | |
* | |
* @since 3.1.0 | |
* @var int | |
*/ | |
private $sticky_posts_count = 0; | |
private $is_trash; | |
/** | |
* Current level for output. | |
* | |
* @since 4.3.0 | |
* @var int | |
*/ | |
protected $current_level = 0; | |
/** | |
* Constructor. | |
* | |
* @since 3.1.0 | |
* | |
* @see WP_List_Table::__construct() for more information on default arguments. | |
* | |
* @global WP_Post_Type $post_type_object | |
* @global wpdb $wpdb | |
* | |
* @param array $args An associative array of arguments. | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* Sets whether the table layout should be hierarchical or not. | |
* | |
* @since 4.2.0 | |
* | |
* @param bool $display Whether the table layout should be hierarchical. | |
*/ | |
public function set_hierarchical_display($display) | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* @global array $avail_post_stati | |
* @global WP_Query $wp_query | |
* @global int $per_page | |
* @global string $mode | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function has_items() | |
{ | |
} | |
/** | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* Determine if the current view is the "All" view. | |
* | |
* @since 4.2.0 | |
* | |
* @return bool Whether the current view is the "All" view. | |
*/ | |
protected function is_base_request() | |
{ | |
} | |
/** | |
* Helper to create links to edit.php with params. | |
* | |
* @since 4.4.0 | |
* | |
* @param string[] $args Associative array of URL parameters for the link. | |
* @param string $label Link text. | |
* @param string $class Optional. Class attribute. Default empty string. | |
* @return string The formatted link string. | |
*/ | |
protected function get_edit_link($args, $label, $class = '') | |
{ | |
} | |
/** | |
* @global array $locked_post_status This seems to be deprecated. | |
* @global array $avail_post_stati | |
* @return array | |
*/ | |
protected function get_views() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
* Displays a categories drop-down for filtering on the Posts list table. | |
* | |
* @since 4.6.0 | |
* | |
* @global int $cat Currently selected category. | |
* | |
* @param string $post_type Post type slug. | |
*/ | |
protected function categories_dropdown($post_type) | |
{ | |
} | |
/** | |
* @param string $which | |
*/ | |
protected function extra_tablenav($which) | |
{ | |
} | |
/** | |
* @return string | |
*/ | |
public function current_action() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_table_classes() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
* @global WP_Query $wp_query | |
* @global int $per_page | |
* @param array $posts | |
* @param int $level | |
*/ | |
public function display_rows($posts = array(), $level = 0) | |
{ | |
} | |
/** | |
* @param array $posts | |
* @param int $level | |
*/ | |
private function _display_rows($posts, $level = 0) | |
{ | |
} | |
/** | |
* @global wpdb $wpdb | |
* @global WP_Post $post | |
* @param array $pages | |
* @param int $pagenum | |
* @param int $per_page | |
*/ | |
private function _display_rows_hierarchical($pages, $pagenum = 1, $per_page = 20) | |
{ | |
} | |
/** | |
* Given a top level page ID, display the nested hierarchy of sub-pages | |
* together with paging support | |
* | |
* @since 3.1.0 (Standalone function exists since 2.6.0) | |
* @since 4.2.0 Added the `$to_display` parameter. | |
* | |
* @param array $children_pages | |
* @param int $count | |
* @param int $parent | |
* @param int $level | |
* @param int $pagenum | |
* @param int $per_page | |
* @param array $to_display List of pages to be displayed. Passed by reference. | |
*/ | |
private function _page_rows(&$children_pages, &$count, $parent, $level, $pagenum, $per_page, &$to_display) | |
{ | |
} | |
/** | |
* Handles the checkbox column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_cb($post) | |
{ | |
} | |
/** | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post | |
* @param string $classes | |
* @param string $data | |
* @param string $primary | |
*/ | |
protected function _column_title($post, $classes, $data, $primary) | |
{ | |
} | |
/** | |
* Handles the title column output. | |
* | |
* @since 4.3.0 | |
* | |
* @global string $mode List table view mode. | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_title($post) | |
{ | |
} | |
/** | |
* Handles the post date column output. | |
* | |
* @since 4.3.0 | |
* | |
* @global string $mode List table view mode. | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_date($post) | |
{ | |
} | |
/** | |
* Handles the comments column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_comments($post) | |
{ | |
} | |
/** | |
* Handles the post author column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
*/ | |
public function column_author($post) | |
{ | |
} | |
/** | |
* Handles the default column output. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Post $post The current WP_Post object. | |
* @param string $column_name The current column name. | |
*/ | |
public function column_default($post, $column_name) | |
{ | |
} | |
/** | |
* @global WP_Post $post | |
* | |
* @param int|WP_Post $post | |
* @param int $level | |
*/ | |
public function single_row($post, $level = 0) | |
{ | |
} | |
/** | |
* Gets the name of the default primary column. | |
* | |
* @since 4.3.0 | |
* | |
* @return string Name of the default primary column, in this case, 'title'. | |
*/ | |
protected function get_default_primary_column_name() | |
{ | |
} | |
/** | |
* Generates and displays row action links. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $post Post being acted upon. | |
* @param string $column_name Current column name. | |
* @param string $primary Primary column name. | |
* @return string Row actions output for posts. | |
*/ | |
protected function handle_row_actions($post, $column_name, $primary) | |
{ | |
} | |
/** | |
* Outputs the hidden row displayed when inline editing | |
* | |
* @since 3.1.0 | |
* | |
* @global string $mode List table view mode. | |
*/ | |
public function inline_edit() | |
{ | |
} | |
} | |
/** | |
* Screen API: WP_Screen class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 4.4.0 | |
*/ | |
/** | |
* Core class used to implement an admin screen API. | |
* | |
* @since 3.3.0 | |
*/ | |
final class WP_Screen | |
{ | |
/** | |
* Any action associated with the screen. 'add' for *-add.php and *-new.php screens. Empty otherwise. | |
* | |
* @since 3.3.0 | |
* @var string | |
*/ | |
public $action; | |
/** | |
* The base type of the screen. This is typically the same as $id but with any post types and taxonomies stripped. | |
* For example, for an $id of 'edit-post' the base is 'edit'. | |
* | |
* @since 3.3.0 | |
* @var string | |
*/ | |
public $base; | |
/** | |
* The number of columns to display. Access with get_columns(). | |
* | |
* @since 3.4.0 | |
* @var int | |
*/ | |
private $columns = 0; | |
/** | |
* The unique ID of the screen. | |
* | |
* @since 3.3.0 | |
* @var string | |
*/ | |
public $id; | |
/** | |
* Which admin the screen is in. network | user | site | false | |
* | |
* @since 3.5.0 | |
* @var string | |
*/ | |
protected $in_admin; | |
/** | |
* Whether the screen is in the network admin. | |
* | |
* Deprecated. Use in_admin() instead. | |
* | |
* @since 3.3.0 | |
* @deprecated 3.5.0 | |
* @var bool | |
*/ | |
public $is_network; | |
/** | |
* Whether the screen is in the user admin. | |
* | |
* Deprecated. Use in_admin() instead. | |
* | |
* @since 3.3.0 | |
* @deprecated 3.5.0 | |
* @var bool | |
*/ | |
public $is_user; | |
/** | |
* The base menu parent. | |
* This is derived from $parent_file by removing the query string and any .php extension. | |
* $parent_file values of 'edit.php?post_type=page' and 'edit.php?post_type=post' have a $parent_base of 'edit'. | |
* | |
* @since 3.3.0 | |
* @var string | |
*/ | |
public $parent_base; | |
/** | |
* The parent_file for the screen per the admin menu system. | |
* Some $parent_file values are 'edit.php?post_type=page', 'edit.php', and 'options-general.php'. | |
* | |
* @since 3.3.0 | |
* @var string | |
*/ | |
public $parent_file; | |
/** | |
* The post type associated with the screen, if any. | |
* The 'edit.php?post_type=page' screen has a post type of 'page'. | |
* The 'edit-tags.php?taxonomy=$taxonomy&post_type=page' screen has a post type of 'page'. | |
* | |
* @since 3.3.0 | |
* @var string | |
*/ | |
public $post_type; | |
/** | |
* The taxonomy associated with the screen, if any. | |
* The 'edit-tags.php?taxonomy=category' screen has a taxonomy of 'category'. | |
* | |
* @since 3.3.0 | |
* @var string | |
*/ | |
public $taxonomy; | |
/** | |
* The help tab data associated with the screen, if any. | |
* | |
* @since 3.3.0 | |
* @var array | |
*/ | |
private $_help_tabs = array(); | |
/** | |
* The help sidebar data associated with screen, if any. | |
* | |
* @since 3.3.0 | |
* @var string | |
*/ | |
private $_help_sidebar = ''; | |
/** | |
* The accessible hidden headings and text associated with the screen, if any. | |
* | |
* @since 4.4.0 | |
* @var array | |
*/ | |
private $_screen_reader_content = array(); | |
/** | |
* Stores old string-based help. | |
* | |
* @var array | |
*/ | |
private static $_old_compat_help = array(); | |
/** | |
* The screen options associated with screen, if any. | |
* | |
* @since 3.3.0 | |
* @var array | |
*/ | |
private $_options = array(); | |
/** | |
* The screen object registry. | |
* | |
* @since 3.3.0 | |
* | |
* @var array | |
*/ | |
private static $_registry = array(); | |
/** | |
* Stores the result of the public show_screen_options function. | |
* | |
* @since 3.3.0 | |
* @var bool | |
*/ | |
private $_show_screen_options; | |
/** | |
* Stores the 'screen_settings' section of screen options. | |
* | |
* @since 3.3.0 | |
* @var string | |
*/ | |
private $_screen_settings; | |
/** | |
* Whether the screen is using the block editor. | |
* | |
* @since 5.0.0 | |
* @var bool | |
*/ | |
public $is_block_editor = \false; | |
/** | |
* Fetches a screen object. | |
* | |
* @since 3.3.0 | |
* | |
* @global string $hook_suffix | |
* | |
* @param string|WP_Screen $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen. | |
* Defaults to the current $hook_suffix global. | |
* @return WP_Screen Screen object. | |
*/ | |
public static function get($hook_name = '') | |
{ | |
} | |
/** | |
* Makes the screen object the current screen. | |
* | |
* @see set_current_screen() | |
* @since 3.3.0 | |
* | |
* @global WP_Screen $current_screen | |
* @global string $taxnow | |
* @global string $typenow | |
*/ | |
public function set_current_screen() | |
{ | |
} | |
/** | |
* Constructor | |
* | |
* @since 3.3.0 | |
*/ | |
private function __construct() | |
{ | |
} | |
/** | |
* Indicates whether the screen is in a particular admin | |
* | |
* @since 3.5.0 | |
* | |
* @param string $admin The admin to check against (network | user | site). | |
* If empty any of the three admins will result in true. | |
* @return bool True if the screen is in the indicated admin, false otherwise. | |
*/ | |
public function in_admin($admin = \null) | |
{ | |
} | |
/** | |
* Sets or returns whether the block editor is loading on the current screen. | |
* | |
* @since 5.0.0 | |
* | |
* @param bool $set Optional. Sets whether the block editor is loading on the current screen or not. | |
* @return bool True if the block editor is being loaded, false otherwise. | |
*/ | |
public function is_block_editor($set = \null) | |
{ | |
} | |
/** | |
* Sets the old string-based contextual help for the screen for backward compatibility. | |
* | |
* @since 3.3.0 | |
* | |
* @param WP_Screen $screen A screen object. | |
* @param string $help Help text. | |
*/ | |
public static function add_old_compat_help($screen, $help) | |
{ | |
} | |
/** | |
* Set the parent information for the screen. | |
* This is called in admin-header.php after the menu parent for the screen has been determined. | |
* | |
* @since 3.3.0 | |
* | |
* @param string $parent_file The parent file of the screen. Typically the $parent_file global. | |
*/ | |
public function set_parentage($parent_file) | |
{ | |
} | |
/** | |
* Adds an option for the screen. | |
* Call this in template files after admin.php is loaded and before admin-header.php is loaded to add screen options. | |
* | |
* @since 3.3.0 | |
* | |
* @param string $option Option ID | |
* @param mixed $args Option-dependent arguments. | |
*/ | |
public function add_option($option, $args = array()) | |
{ | |
} | |
/** | |
* Remove an option from the screen. | |
* | |
* @since 3.8.0 | |
* | |
* @param string $option Option ID. | |
*/ | |
public function remove_option($option) | |
{ | |
} | |
/** | |
* Remove all options from the screen. | |
* | |
* @since 3.8.0 | |
*/ | |
public function remove_options() | |
{ | |
} | |
/** | |
* Get the options registered for the screen. | |
* | |
* @since 3.8.0 | |
* | |
* @return array Options with arguments. | |
*/ | |
public function get_options() | |
{ | |
} | |
/** | |
* Gets the arguments for an option for the screen. | |
* | |
* @since 3.3.0 | |
* | |
* @param string $option Option name. | |
* @param string $key Optional. Specific array key for when the option is an array. | |
* Default false. | |
* @return string The option value if set, null otherwise. | |
*/ | |
public function get_option($option, $key = \false) | |
{ | |
} | |
/** | |
* Gets the help tabs registered for the screen. | |
* | |
* @since 3.4.0 | |
* @since 4.4.0 Help tabs are ordered by their priority. | |
* | |
* @return array Help tabs with arguments. | |
*/ | |
public function get_help_tabs() | |
{ | |
} | |
/** | |
* Gets the arguments for a help tab. | |
* | |
* @since 3.4.0 | |
* | |
* @param string $id Help Tab ID. | |
* @return array Help tab arguments. | |
*/ | |
public function get_help_tab($id) | |
{ | |
} | |
/** | |
* Add a help tab to the contextual help for the screen. | |
* Call this on the load-$pagenow hook for the relevant screen. | |
* | |
* @since 3.3.0 | |
* @since 4.4.0 The `$priority` argument was added. | |
* | |
* @param array $args { | |
* Array of arguments used to display the help tab. | |
* | |
* @type string $title Title for the tab. Default false. | |
* @type string $id Tab ID. Must be HTML-safe. Default false. | |
* @type string $content Optional. Help tab content in plain text or HTML. Default empty string. | |
* @type string $callback Optional. A callback to generate the tab content. Default false. | |
* @type int $priority Optional. The priority of the tab, used for ordering. Default 10. | |
* } | |
*/ | |
public function add_help_tab($args) | |
{ | |
} | |
/** | |
* Removes a help tab from the contextual help for the screen. | |
* | |
* @since 3.3.0 | |
* | |
* @param string $id The help tab ID. | |
*/ | |
public function remove_help_tab($id) | |
{ | |
} | |
/** | |
* Removes all help tabs from the contextual help for the screen. | |
* | |
* @since 3.3.0 | |
*/ | |
public function remove_help_tabs() | |
{ | |
} | |
/** | |
* Gets the content from a contextual help sidebar. | |
* | |
* @since 3.4.0 | |
* | |
* @return string Contents of the help sidebar. | |
*/ | |
public function get_help_sidebar() | |
{ | |
} | |
/** | |
* Add a sidebar to the contextual help for the screen. | |
* Call this in template files after admin.php is loaded and before admin-header.php is loaded to add a sidebar to the contextual help. | |
* | |
* @since 3.3.0 | |
* | |
* @param string $content Sidebar content in plain text or HTML. | |
*/ | |
public function set_help_sidebar($content) | |
{ | |
} | |
/** | |
* Gets the number of layout columns the user has selected. | |
* | |
* The layout_columns option controls the max number and default number of | |
* columns. This method returns the number of columns within that range selected | |
* by the user via Screen Options. If no selection has been made, the default | |
* provisioned in layout_columns is returned. If the screen does not support | |
* selecting the number of layout columns, 0 is returned. | |
* | |
* @since 3.4.0 | |
* | |
* @return int Number of columns to display. | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* Get the accessible hidden headings and text used in the screen. | |
* | |
* @since 4.4.0 | |
* | |
* @see set_screen_reader_content() For more information on the array format. | |
* | |
* @return array An associative array of screen reader text strings. | |
*/ | |
public function get_screen_reader_content() | |
{ | |
} | |
/** | |
* Get a screen reader text string. | |
* | |
* @since 4.4.0 | |
* | |
* @param string $key Screen reader text array named key. | |
* @return string Screen reader text string. | |
*/ | |
public function get_screen_reader_text($key) | |
{ | |
} | |
/** | |
* Add accessible hidden headings and text for the screen. | |
* | |
* @since 4.4.0 | |
* | |
* @param array $content { | |
* An associative array of screen reader text strings. | |
* | |
* @type string $heading_views Screen reader text for the filter links heading. | |
* Default 'Filter items list'. | |
* @type string $heading_pagination Screen reader text for the pagination heading. | |
* Default 'Items list navigation'. | |
* @type string $heading_list Screen reader text for the items list heading. | |
* Default 'Items list'. | |
* } | |
*/ | |
public function set_screen_reader_content($content = array()) | |
{ | |
} | |
/** | |
* Remove all the accessible hidden headings and text for the screen. | |
* | |
* @since 4.4.0 | |
*/ | |
public function remove_screen_reader_content() | |
{ | |
} | |
/** | |
* Render the screen's help section. | |
* | |
* This will trigger the deprecated filters for backward compatibility. | |
* | |
* @since 3.3.0 | |
* | |
* @global string $screen_layout_columns | |
*/ | |
public function render_screen_meta() | |
{ | |
} | |
/** | |
* @global array $wp_meta_boxes | |
* | |
* @return bool | |
*/ | |
public function show_screen_options() | |
{ | |
} | |
/** | |
* Render the screen options tab. | |
* | |
* @since 3.3.0 | |
* | |
* @param array $options { | |
* @type bool $wrap Whether the screen-options-wrap div will be included. Defaults to true. | |
* } | |
*/ | |
public function render_screen_options($options = array()) | |
{ | |
} | |
/** | |
* Render the meta boxes preferences. | |
* | |
* @since 4.4.0 | |
* | |
* @global array $wp_meta_boxes | |
*/ | |
public function render_meta_boxes_preferences() | |
{ | |
} | |
/** | |
* Render the list table columns preferences. | |
* | |
* @since 4.4.0 | |
*/ | |
public function render_list_table_columns_preferences() | |
{ | |
} | |
/** | |
* Render the option for number of columns on the page | |
* | |
* @since 3.3.0 | |
*/ | |
public function render_screen_layout() | |
{ | |
} | |
/** | |
* Render the items per page option | |
* | |
* @since 3.3.0 | |
*/ | |
public function render_per_page_options() | |
{ | |
} | |
/** | |
* Render the list table view mode preferences. | |
* | |
* @since 4.4.0 | |
* | |
* @global string $mode List table view mode. | |
*/ | |
public function render_view_mode() | |
{ | |
} | |
/** | |
* Render screen reader text. | |
* | |
* @since 4.4.0 | |
* | |
* @param string $key The screen reader text array named key. | |
* @param string $tag Optional. The HTML tag to wrap the screen reader text. Default h2. | |
*/ | |
public function render_screen_reader_content($key = '', $tag = 'h2') | |
{ | |
} | |
} | |
/** | |
* Administration API: WP_Site_Icon class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 4.3.0 | |
*/ | |
/** | |
* Core class used to implement site icon functionality. | |
* | |
* @since 4.3.0 | |
*/ | |
class WP_Site_Icon | |
{ | |
/** | |
* The minimum size of the site icon. | |
* | |
* @since 4.3.0 | |
* @var int | |
*/ | |
public $min_size = 512; | |
/** | |
* The size to which to crop the image so that we can display it in the UI nicely. | |
* | |
* @since 4.3.0 | |
* @var int | |
*/ | |
public $page_crop = 512; | |
/** | |
* List of site icon sizes. | |
* | |
* @since 4.3.0 | |
* @var int[] | |
*/ | |
public $site_icon_sizes = array( | |
/* | |
* Square, medium sized tiles for IE11+. | |
* | |
* See https://msdn.microsoft.com/library/dn455106(v=vs.85).aspx | |
*/ | |
270, | |
/* | |
* App icon for Android/Chrome. | |
* | |
* @link https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android | |
* @link https://developer.chrome.com/multidevice/android/installtohomescreen | |
*/ | |
192, | |
/* | |
* App icons up to iPhone 6 Plus. | |
* | |
* See https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html | |
*/ | |
180, | |
// Our regular Favicon. | |
32, | |
); | |
/** | |
* Registers actions and filters. | |
* | |
* @since 4.3.0 | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Creates an attachment 'object'. | |
* | |
* @since 4.3.0 | |
* | |
* @param string $cropped Cropped image URL. | |
* @param int $parent_attachment_id Attachment ID of parent image. | |
* @return array Attachment object. | |
*/ | |
public function create_attachment_object($cropped, $parent_attachment_id) | |
{ | |
} | |
/** | |
* Inserts an attachment. | |
* | |
* @since 4.3.0 | |
* | |
* @param array $object Attachment object. | |
* @param string $file File path of the attached image. | |
* @return int Attachment ID | |
*/ | |
public function insert_attachment($object, $file) | |
{ | |
} | |
/** | |
* Adds additional sizes to be made when creating the site icon images. | |
* | |
* @since 4.3.0 | |
* | |
* @param array[] $sizes Array of arrays containing information for additional sizes. | |
* @return array[] Array of arrays containing additional image sizes. | |
*/ | |
public function additional_sizes($sizes = array()) | |
{ | |
} | |
/** | |
* Adds Site Icon sizes to the array of image sizes on demand. | |
* | |
* @since 4.3.0 | |
* | |
* @param string[] $sizes Array of image size names. | |
* @return string[] Array of image size names. | |
*/ | |
public function intermediate_image_sizes($sizes = array()) | |
{ | |
} | |
/** | |
* Deletes the Site Icon when the image file is deleted. | |
* | |
* @since 4.3.0 | |
* | |
* @param int $post_id Attachment ID. | |
*/ | |
public function delete_attachment_data($post_id) | |
{ | |
} | |
/** | |
* Adds custom image sizes when meta data for an image is requested, that happens to be used as Site Icon. | |
* | |
* @since 4.3.0 | |
* | |
* @param null|array|string $value The value get_metadata() should return a single metadata value, or an | |
* array of values. | |
* @param int $post_id Post ID. | |
* @param string $meta_key Meta key. | |
* @param string|array $single Meta value, or an array of values. | |
* @return array|null|string The attachment metadata value, array of values, or null. | |
*/ | |
public function get_post_metadata($value, $post_id, $meta_key, $single) | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_Terms_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying terms in a list table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Table | |
*/ | |
class WP_Terms_List_Table extends \WP_List_Table | |
{ | |
public $callback_args; | |
private $level; | |
/** | |
* Constructor. | |
* | |
* @since 3.1.0 | |
* | |
* @see WP_List_Table::__construct() for more information on default arguments. | |
* | |
* @global string $post_type | |
* @global string $taxonomy | |
* @global string $action | |
* @global object $tax | |
* | |
* @param array $args An associative array of arguments. | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function has_items() | |
{ | |
} | |
/** | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
* @return string | |
*/ | |
public function current_action() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
*/ | |
public function display_rows_or_placeholder() | |
{ | |
} | |
/** | |
* @param string $taxonomy | |
* @param array $terms | |
* @param array $children | |
* @param int $start | |
* @param int $per_page | |
* @param int $count | |
* @param int $parent | |
* @param int $level | |
*/ | |
private function _rows($taxonomy, $terms, &$children, $start, $per_page, &$count, $parent = 0, $level = 0) | |
{ | |
} | |
/** | |
* @global string $taxonomy | |
* @param WP_Term $tag Term object. | |
* @param int $level | |
*/ | |
public function single_row($tag, $level = 0) | |
{ | |
} | |
/** | |
* @param WP_Term $tag Term object. | |
* @return string | |
*/ | |
public function column_cb($tag) | |
{ | |
} | |
/** | |
* @param WP_Term $tag Term object. | |
* @return string | |
*/ | |
public function column_name($tag) | |
{ | |
} | |
/** | |
* Gets the name of the default primary column. | |
* | |
* @since 4.3.0 | |
* | |
* @return string Name of the default primary column, in this case, 'name'. | |
*/ | |
protected function get_default_primary_column_name() | |
{ | |
} | |
/** | |
* Generates and displays row action links. | |
* | |
* @since 4.3.0 | |
* | |
* @param WP_Term $tag Tag being acted upon. | |
* @param string $column_name Current column name. | |
* @param string $primary Primary column name. | |
* @return string Row actions output for terms. | |
*/ | |
protected function handle_row_actions($tag, $column_name, $primary) | |
{ | |
} | |
/** | |
* @param WP_Term $tag Term object. | |
* @return string | |
*/ | |
public function column_description($tag) | |
{ | |
} | |
/** | |
* @param WP_Term $tag Term object. | |
* @return string | |
*/ | |
public function column_slug($tag) | |
{ | |
} | |
/** | |
* @param WP_Term $tag Term object. | |
* @return string | |
*/ | |
public function column_posts($tag) | |
{ | |
} | |
/** | |
* @param WP_Term $tag Term object. | |
* @return string | |
*/ | |
public function column_links($tag) | |
{ | |
} | |
/** | |
* @param WP_Term $tag Term object. | |
* @param string $column_name | |
* @return string | |
*/ | |
public function column_default($tag, $column_name) | |
{ | |
} | |
/** | |
* Outputs the hidden row displayed when inline editing | |
* | |
* @since 3.1.0 | |
*/ | |
public function inline_edit() | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_Themes_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying installed themes in a list table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Table | |
*/ | |
class WP_Themes_List_Table extends \WP_List_Table | |
{ | |
protected $search_terms = array(); | |
public $features = array(); | |
/** | |
* Constructor. | |
* | |
* @since 3.1.0 | |
* | |
* @see WP_List_Table::__construct() for more information on default arguments. | |
* | |
* @param array $args An associative array of arguments. | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* @param string $which | |
*/ | |
public function tablenav($which = 'top') | |
{ | |
} | |
/** | |
*/ | |
public function display() | |
{ | |
} | |
/** | |
* @return array | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
*/ | |
public function display_rows_or_placeholder() | |
{ | |
} | |
/** | |
*/ | |
public function display_rows() | |
{ | |
} | |
/** | |
* @param WP_Theme $theme | |
* @return bool | |
*/ | |
public function search_theme($theme) | |
{ | |
} | |
/** | |
* Send required variables to JavaScript land | |
* | |
* @since 3.4.0 | |
* | |
* @param array $extra_args | |
*/ | |
public function _js_vars($extra_args = array()) | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_Theme_Install_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying themes to install in a list table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_Themes_List_Table | |
*/ | |
class WP_Theme_Install_List_Table extends \WP_Themes_List_Table | |
{ | |
public $features = array(); | |
/** | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* @global array $tabs | |
* @global string $tab | |
* @global int $paged | |
* @global string $type | |
* @global array $theme_field_defaults | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* @global array $tabs | |
* @global string $tab | |
* @return array | |
*/ | |
protected function get_views() | |
{ | |
} | |
/** | |
*/ | |
public function display() | |
{ | |
} | |
/** | |
*/ | |
public function display_rows() | |
{ | |
} | |
/** | |
* Prints a theme from the WordPress.org API. | |
* | |
* @since 3.1.0 | |
* | |
* @global array $themes_allowedtags | |
* | |
* @param object $theme { | |
* An object that contains theme data returned by the WordPress.org API. | |
* | |
* @type string $name Theme name, e.g. 'Twenty Nineteen'. | |
* @type string $slug Theme slug, e.g. 'twentynineteen'. | |
* @type string $version Theme version, e.g. '1.1'. | |
* @type string $author Theme author username, e.g. 'melchoyce'. | |
* @type string $preview_url Preview URL, e.g. 'http://2019.wordpress.net/'. | |
* @type string $screenshot_url Screenshot URL, e.g. 'https://wordpress.org/themes/twentynineteen/'. | |
* @type float $rating Rating score. | |
* @type int $num_ratings The number of ratings. | |
* @type string $homepage Theme homepage, e.g. 'https://wordpress.org/themes/twentynineteen/'. | |
* @type string $description Theme description. | |
* @type string $download_link Theme ZIP download URL. | |
* } | |
*/ | |
public function single_row($theme) | |
{ | |
} | |
/** | |
* Prints the wrapper for the theme installer. | |
*/ | |
public function theme_installer() | |
{ | |
} | |
/** | |
* Prints the wrapper for the theme installer with a provided theme's data. | |
* Used to make the theme installer work for no-js. | |
* | |
* @param object $theme - A WordPress.org Theme API object. | |
*/ | |
public function theme_installer_single($theme) | |
{ | |
} | |
/** | |
* Prints the info for a theme (to be used in the theme installer modal). | |
* | |
* @global array $themes_allowedtags | |
* | |
* @param object $theme - A WordPress.org Theme API object. | |
*/ | |
public function install_theme_info($theme) | |
{ | |
} | |
/** | |
* Send required variables to JavaScript land | |
* | |
* @since 3.4.0 | |
* | |
* @global string $tab Current tab within Themes->Install screen | |
* @global string $type Type of search. | |
* | |
* @param array $extra_args Unused. | |
*/ | |
public function _js_vars($extra_args = array()) | |
{ | |
} | |
/** | |
* Check to see if the theme is already installed. | |
* | |
* @since 3.4.0 | |
* | |
* @param object $theme - A WordPress.org Theme API object. | |
* @return string Theme status. | |
*/ | |
private function _get_theme_status($theme) | |
{ | |
} | |
} | |
/** | |
* List Table API: WP_Users_List_Table class | |
* | |
* @package WordPress | |
* @subpackage Administration | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement displaying users in a list table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @see WP_List_Table | |
*/ | |
class WP_Users_List_Table extends \WP_List_Table | |
{ | |
/** | |
* Site ID to generate the Users list table for. | |
* | |
* @since 3.1.0 | |
* @var int | |
*/ | |
public $site_id; | |
/** | |
* Whether or not the current Users list table is for Multisite. | |
* | |
* @since 3.1.0 | |
* @var bool | |
*/ | |
public $is_site_users; | |
/** | |
* Constructor. | |
* | |
* @since 3.1.0 | |
* | |
* @see WP_List_Table::__construct() for more information on default arguments. | |
* | |
* @param array $args An associative array of arguments. | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* Check the current user's permissions. | |
* | |
* @since 3.1.0 | |
* | |
* @return bool | |
*/ | |
public function ajax_user_can() | |
{ | |
} | |
/** | |
* Prepare the users list for display. | |
* | |
* @since 3.1.0 | |
* | |
* @global string $role | |
* @global string $usersearch | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
* Output 'no users' message. | |
* | |
* @since 3.1.0 | |
*/ | |
public function no_items() | |
{ | |
} | |
/** | |
* Return an associative array listing all the views that can be used | |
* with this table. | |
* | |
* Provides a list of roles and user count for that role for easy | |
* Filtersing of the user table. | |
* | |
* @since 3.1.0 | |
* | |
* @global string $role | |
* | |
* @return array An array of HTML links, one for each view. | |
*/ | |
protected function get_views() | |
{ | |
} | |
/** | |
* Retrieve an associative array of bulk actions available on this table. | |
* | |
* @since 3.1.0 | |
* | |
* @return array Array of bulk actions. | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
* Output the controls to allow user roles to be changed in bulk. | |
* | |
* @since 3.1.0 | |
* | |
* @param string $which Whether this is being invoked above ("top") | |
* or below the table ("bottom"). | |
*/ | |
protected function extra_tablenav($which) | |
{ | |
} | |
/** | |
* Capture the bulk action required, and return it. | |
* | |
* Overridden from the base class implementation to capture | |
* the role change drop-down. | |
* | |
* @since 3.1.0 | |
* | |
* @return string The bulk action required. | |
*/ | |
public function current_action() | |
{ | |
} | |
/** | |
* Get a list of columns for the list table. | |
* | |
* @since 3.1.0 | |
* | |
* @return array Array in which the key is the ID of the column, | |
* and the value is the description. | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* Get a list of sortable columns for the list table. | |
* | |
* @since 3.1.0 | |
* | |
* @return array Array of sortable columns. | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
* Generate the list table rows. | |
* | |
* @since 3.1.0 | |
*/ | |
public function display_rows() | |
{ | |
} | |
/** | |
* Generate HTML for a single row on the users.php admin panel. | |
* | |
* @since 3.1.0 | |
* @since 4.2.0 The `$style` parameter was deprecated. | |
* @since 4.4.0 The `$role` parameter was deprecated. | |
* | |
* @param WP_User $user_object The current user object. | |
* @param string $style Deprecated. Not used. | |
* @param string $role Deprecated. Not used. | |
* @param int $numposts Optional. Post count to display for this user. Defaults | |
* to zero, as in, a new user has made zero posts. | |
* @return string Output for a single row. | |
*/ | |
public function single_row($user_object, $style = '', $role = '', $numposts = 0) | |
{ | |
} | |
/** | |
* Gets the name of the default primary column. | |
* | |
* @since 4.3.0 | |
* | |
* @return string Name of the default primary column, in this case, 'username'. | |
*/ | |
protected function get_default_primary_column_name() | |
{ | |
} | |
/** | |
* Returns an array of user roles for a given user object. | |
* | |
* @since 4.4.0 | |
* | |
* @param WP_User $user_object The WP_User object. | |
* @return string[] An array of user roles. | |
*/ | |
protected function get_role_list($user_object) | |
{ | |
} | |
} | |
/** | |
* WordPress User Search class. | |
* | |
* @since 2.1.0 | |
* @deprecated 3.1.0 Use WP_User_Query | |
*/ | |
class WP_User_Search | |
{ | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 2.1.0 | |
* @access private | |
* @var mixed | |
*/ | |
var $results; | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 2.1.0 | |
* @access private | |
* @var string | |
*/ | |
var $search_term; | |
/** | |
* Page number. | |
* | |
* @since 2.1.0 | |
* @access private | |
* @var int | |
*/ | |
var $page; | |
/** | |
* Role name that users have. | |
* | |
* @since 2.5.0 | |
* @access private | |
* @var string | |
*/ | |
var $role; | |
/** | |
* Raw page number. | |
* | |
* @since 2.1.0 | |
* @access private | |
* @var int|bool | |
*/ | |
var $raw_page; | |
/** | |
* Amount of users to display per page. | |
* | |
* @since 2.1.0 | |
* @access public | |
* @var int | |
*/ | |
var $users_per_page = 50; | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 2.1.0 | |
* @access private | |
* @var int | |
*/ | |
var $first_user; | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 2.1.0 | |
* @access private | |
* @var int | |
*/ | |
var $last_user; | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 2.1.0 | |
* @access private | |
* @var string | |
*/ | |
var $query_limit; | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 3.0.0 | |
* @access private | |
* @var string | |
*/ | |
var $query_orderby; | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 3.0.0 | |
* @access private | |
* @var string | |
*/ | |
var $query_from; | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 3.0.0 | |
* @access private | |
* @var string | |
*/ | |
var $query_where; | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 2.1.0 | |
* @access private | |
* @var int | |
*/ | |
var $total_users_for_query = 0; | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 2.1.0 | |
* @access private | |
* @var bool | |
*/ | |
var $too_many_total_users = \false; | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 2.1.0 | |
* @access private | |
* @var WP_Error | |
*/ | |
var $search_errors; | |
/** | |
* {@internal Missing Description}} | |
* | |
* @since 2.7.0 | |
* @access private | |
* @var string | |
*/ | |
var $paging_text; | |
/** | |
* PHP5 Constructor - Sets up the object properties. | |
* | |
* @since 2.1.0 | |
* | |
* @param string $search_term Search terms string. | |
* @param int $page Optional. Page ID. | |
* @param string $role Role name. | |
* @return WP_User_Search | |
*/ | |
function __construct($search_term = '', $page = '', $role = '') | |
{ | |
} | |
/** | |
* PHP4 Constructor - Sets up the object properties. | |
* | |
* @since 2.1.0 | |
* | |
* @param string $search_term Search terms string. | |
* @param int $page Optional. Page ID. | |
* @param string $role Role name. | |
* @return WP_User_Search | |
*/ | |
public function WP_User_Search($search_term = '', $page = '', $role = '') | |
{ | |
} | |
/** | |
* Prepares the user search query (legacy). | |
* | |
* @since 2.1.0 | |
* @access public | |
*/ | |
public function prepare_query() | |
{ | |
} | |
/** | |
* Executes the user search query. | |
* | |
* @since 2.1.0 | |
* @access public | |
*/ | |
public function query() | |
{ | |
} | |
/** | |
* Prepares variables for use in templates. | |
* | |
* @since 2.1.0 | |
* @access public | |
*/ | |
function prepare_vars_for_template_usage() | |
{ | |
} | |
/** | |
* Handles paging for the user search query. | |
* | |
* @since 2.1.0 | |
* @access public | |
*/ | |
public function do_paging() | |
{ | |
} | |
/** | |
* Retrieves the user search query results. | |
* | |
* @since 2.1.0 | |
* @access public | |
* | |
* @return array | |
*/ | |
public function get_results() | |
{ | |
} | |
/** | |
* Displaying paging text. | |
* | |
* @see do_paging() Builds paging text. | |
* | |
* @since 2.1.0 | |
* @access public | |
*/ | |
function page_links() | |
{ | |
} | |
/** | |
* Whether paging is enabled. | |
* | |
* @see do_paging() Builds paging text. | |
* | |
* @since 2.1.0 | |
* @access public | |
* | |
* @return bool | |
*/ | |
function results_are_paged() | |
{ | |
} | |
/** | |
* Whether there are search terms. | |
* | |
* @since 2.1.0 | |
* @access public | |
* | |
* @return bool | |
*/ | |
function is_search() | |
{ | |
} | |
} | |
/** | |
* WP_Privacy_Policy_Content class. | |
* TODO: move this to a new file. | |
* | |
* @since 4.9.6 | |
*/ | |
final class WP_Privacy_Policy_Content | |
{ | |
private static $policy_content = array(); | |
/** | |
* Constructor | |
* | |
* @since 4.9.6 | |
*/ | |
private function __construct() | |
{ | |
} | |
/** | |
* Add content to the postbox shown when editing the privacy policy. | |
* | |
* Plugins and themes should suggest text for inclusion in the site's privacy policy. | |
* The suggested text should contain information about any functionality that affects user privacy, | |
* and will be shown in the Suggested Privacy Policy Content postbox. | |
* | |
* Intended for use from `wp_add_privacy_policy_content()`. | |
* | |
* @since 4.9.6 | |
* | |
* @param string $plugin_name The name of the plugin or theme that is suggesting content for the site's privacy policy. | |
* @param string $policy_text The suggested content for inclusion in the policy. | |
*/ | |
public static function add($plugin_name, $policy_text) | |
{ | |
} | |
/** | |
* Quick check if any privacy info has changed. | |
* | |
* @since 4.9.6 | |
*/ | |
public static function text_change_check() | |
{ | |
} | |
/** | |
* Output a warning when some privacy info has changed. | |
* | |
* @since 4.9.6 | |
*/ | |
public static function policy_text_changed_notice() | |
{ | |
} | |
/** | |
* Update the cached policy info when the policy page is updated. | |
* | |
* @since 4.9.6 | |
* @access private | |
*/ | |
public static function _policy_page_updated($post_id) | |
{ | |
} | |
/** | |
* Check for updated, added or removed privacy policy information from plugins. | |
* | |
* Caches the current info in post_meta of the policy page. | |
* | |
* @since 4.9.6 | |
* | |
* @return array The privacy policy text/informtion added by core and plugins. | |
*/ | |
public static function get_suggested_policy_text() | |
{ | |
} | |
/** | |
* Add a notice with a link to the guide when editing the privacy policy page. | |
* | |
* @since 4.9.6 | |
* @since 5.0.0 The $post parameter is now optional. | |
* | |
* @param WP_Post|null $post The currently edited post. Default null. | |
*/ | |
public static function notice($post = \null) | |
{ | |
} | |
/** | |
* Output the privacy policy guide together with content from the theme and plugins. | |
* | |
* @since 4.9.6 | |
*/ | |
public static function privacy_policy_guide() | |
{ | |
} | |
/** | |
* Return the default suggested privacy policy content. | |
* | |
* @since 4.9.6 | |
* @since 5.0.0 Added the `$blocks` parameter. | |
* | |
* @param bool $description Whether to include the descriptions under the section headings. Default false. | |
* @param bool $blocks Whether to format the content for the block editor. Default true. | |
* @return string The default policy content. | |
*/ | |
public static function get_default_content($description = \false, $blocks = \true) | |
{ | |
} | |
/** | |
* Add the suggested privacy policy text to the policy postbox. | |
* | |
* @since 4.9.6 | |
*/ | |
public static function add_suggested_content() | |
{ | |
} | |
} | |
/** | |
* WP_Privacy_Requests_Table class. | |
* | |
* @since 4.9.6 | |
*/ | |
abstract class WP_Privacy_Requests_Table extends \WP_List_Table | |
{ | |
/** | |
* Action name for the requests this table will work with. Classes | |
* which inherit from WP_Privacy_Requests_Table should define this. | |
* | |
* Example: 'export_personal_data'. | |
* | |
* @since 4.9.6 | |
* | |
* @var string $request_type Name of action. | |
*/ | |
protected $request_type = 'INVALID'; | |
/** | |
* Post type to be used. | |
* | |
* @since 4.9.6 | |
* | |
* @var string $post_type The post type. | |
*/ | |
protected $post_type = 'INVALID'; | |
/** | |
* Get columns to show in the list table. | |
* | |
* @since 4.9.6 | |
* | |
* @return array Array of columns. | |
*/ | |
public function get_columns() | |
{ | |
} | |
/** | |
* Get a list of sortable columns. | |
* | |
* @since 4.9.6 | |
* | |
* @return array Default sortable columns. | |
*/ | |
protected function get_sortable_columns() | |
{ | |
} | |
/** | |
* Default primary column. | |
* | |
* @since 4.9.6 | |
* | |
* @return string Default primary column name. | |
*/ | |
protected function get_default_primary_column_name() | |
{ | |
} | |
/** | |
* Count number of requests for each status. | |
* | |
* @since 4.9.6 | |
* | |
* @return object Number of posts for each status. | |
*/ | |
protected function get_request_counts() | |
{ | |
} | |
/** | |
* Get an associative array ( id => link ) with the list of views available on this table. | |
* | |
* @since 4.9.6 | |
* | |
* @return array Associative array of views in the format of $view_name => $view_markup. | |
*/ | |
protected function get_views() | |
{ | |
} | |
/** | |
* Get bulk actions. | |
* | |
* @since 4.9.6 | |
* | |
* @return array List of bulk actions. | |
*/ | |
protected function get_bulk_actions() | |
{ | |
} | |
/** | |
* Process bulk actions. | |
* | |
* @since 4.9.6 | |
*/ | |
public function process_bulk_action() | |
{ | |
} | |
/** | |
* Prepare items to output. | |
* | |
* @since 4.9.6 | |
* @since 5.1.0 Added support for column sorting. | |
*/ | |
public function prepare_items() | |
{ | |
} | |
/** | |
* Checkbox column. | |
* | |
* @since 4.9.6 | |
* | |
* @param WP_User_Request $item Item being shown. | |
* @return string Checkbox column markup. | |
*/ | |
public function column_cb($item) | |
{ | |
} | |
/** | |
* Status column. | |
* | |
* @since 4.9.6 | |
* | |
* @param WP_User_Request $item Item being shown. | |
* @return string Status column markup. | |
*/ | |
public function column_status($item) | |
{ | |
} | |
/** | |
* Convert timestamp for display. | |
* | |
* @since 4.9.6 | |
* | |
* @param int $timestamp Event timestamp. | |
* @return string Human readable date. | |
*/ | |
protected function get_timestamp_as_date($timestamp) | |
{ | |
} | |
/** | |
* Default column handler. | |
* | |
* @since 4.9.6 | |
* | |
* @param WP_User_Request $item Item being shown. | |
* @param string $column_name Name of column being shown. | |
* @return string Default column output. | |
*/ | |
public function column_default($item, $column_name) | |
{ | |
} | |
/** | |
* Actions column. Overridden by children. | |
* | |
* @since 4.9.6 | |
* | |
* @param WP_User_Request $item Item being shown. | |
* @return string Email column markup. | |
*/ | |
public function column_email($item) | |
{ | |
} | |
/** | |
* Next steps column. Overridden by children. | |
* | |
* @since 4.9.6 | |
* | |
* @param WP_User_Request $item Item being shown. | |
*/ | |
public function column_next_steps($item) | |
{ | |
} | |
/** | |
* Generates content for a single row of the table, | |
* | |
* @since 4.9.6 | |
* | |
* @param WP_User_Request $item The current item. | |
*/ | |
public function single_row($item) | |
{ | |
} | |
/** | |
* Embed scripts used to perform actions. Overridden by children. | |
* | |
* @since 4.9.6 | |
*/ | |
public function embed_scripts() | |
{ | |
} | |
} | |
/** | |
* WP_Privacy_Data_Export_Requests_Table class. | |
* | |
* @since 4.9.6 | |
*/ | |
class WP_Privacy_Data_Export_Requests_Table extends \WP_Privacy_Requests_Table | |
{ | |
/** | |
* Action name for the requests this table will work with. | |
* | |
* @since 4.9.6 | |
* | |
* @var string $request_type Name of action. | |
*/ | |
protected $request_type = 'export_personal_data'; | |
/** | |
* Post type for the requests. | |
* | |
* @since 4.9.6 | |
* | |
* @var string $post_type The post type. | |
*/ | |
protected $post_type = 'user_request'; | |
/** | |
* Actions column. | |
* | |
* @since 4.9.6 | |
* | |
* @param WP_User_Request $item Item being shown. | |
* @return string Email column markup. | |
*/ | |
public function column_email($item) | |
{ | |
} | |
/** | |
* Displays the next steps column. | |
* | |
* @since 4.9.6 | |
* | |
* @param WP_User_Request $item Item being shown. | |
*/ | |
public function column_next_steps($item) | |
{ | |
} | |
} | |
/** | |
* WP_Privacy_Data_Removal_Requests_Table class. | |
* | |
* @since 4.9.6 | |
*/ | |
class WP_Privacy_Data_Removal_Requests_Table extends \WP_Privacy_Requests_Table | |
{ | |
/** | |
* Action name for the requests this table will work with. | |
* | |
* @since 4.9.6 | |
* | |
* @var string $request_type Name of action. | |
*/ | |
protected $request_type = 'remove_personal_data'; | |
/** | |
* Post type for the requests. | |
* | |
* @since 4.9.6 | |
* | |
* @var string $post_type The post type. | |
*/ | |
protected $post_type = 'user_request'; | |
/** | |
* Actions column. | |
* | |
* @since 4.9.6 | |
* | |
* @param WP_User_Request $item Item being shown. | |
* @return string Email column markup. | |
*/ | |
public function column_email($item) | |
{ | |
} | |
/** | |
* Next steps column. | |
* | |
* @since 4.9.6 | |
* | |
* @param WP_User_Request $item Item being shown. | |
*/ | |
public function column_next_steps($item) | |
{ | |
} | |
} | |
///////////////////////////////////////////////////////////////// | |
/// getID3() by James Heinrich <info@getid3.org> // | |
// available at http://getid3.sourceforge.net // | |
// or http://www.getid3.org // | |
// also https://github.com/JamesHeinrich/getID3 // | |
///////////////////////////////////////////////////////////////// | |
// // | |
// getid3.lib.php - part of getID3() // | |
// See readme.txt for more details // | |
// /// | |
///////////////////////////////////////////////////////////////// | |
class getid3_lib | |
{ | |
public static function PrintHexBytes($string, $hex = \true, $spaces = \true, $htmlencoding = 'UTF-8') | |
{ | |
} | |
public static function trunc($floatnumber) | |
{ | |
} | |
public static function safe_inc(&$variable, $increment = 1) | |
{ | |
} | |
public static function CastAsInt($floatnum) | |
{ | |
} | |
public static function intValueSupported($num) | |
{ | |
} | |
public static function DecimalizeFraction($fraction) | |
{ | |
} | |
public static function DecimalBinary2Float($binarynumerator) | |
{ | |
} | |
public static function NormalizeBinaryPoint($binarypointnumber, $maxbits = 52) | |
{ | |
} | |
public static function Float2BinaryDecimal($floatvalue) | |
{ | |
} | |
public static function Float2String($floatvalue, $bits) | |
{ | |
} | |
public static function LittleEndian2Float($byteword) | |
{ | |
} | |
public static function BigEndian2Float($byteword) | |
{ | |
} | |
public static function BigEndian2Int($byteword, $synchsafe = \false, $signed = \false) | |
{ | |
} | |
public static function LittleEndian2Int($byteword, $signed = \false) | |
{ | |
} | |
public static function LittleEndian2Bin($byteword) | |
{ | |
} | |
public static function BigEndian2Bin($byteword) | |
{ | |
} | |
public static function BigEndian2String($number, $minbytes = 1, $synchsafe = \false, $signed = \false) | |
{ | |
} | |
public static function Dec2Bin($number) | |
{ | |
} | |
public static function Bin2Dec($binstring, $signed = \false) | |
{ | |
} | |
public static function Bin2String($binstring) | |
{ | |
} | |
public static function LittleEndian2String($number, $minbytes = 1, $synchsafe = \false) | |
{ | |
} | |
public static function array_merge_clobber($array1, $array2) | |
{ | |
} | |
public static function array_merge_noclobber($array1, $array2) | |
{ | |
} | |
public static function flipped_array_merge_noclobber($array1, $array2) | |
{ | |
} | |
public static function ksort_recursive(&$theArray) | |
{ | |
} | |
public static function fileextension($filename, $numextensions = 1) | |
{ | |
} | |
public static function PlaytimeString($seconds) | |
{ | |
} | |
public static function DateMac2Unix($macdate) | |
{ | |
} | |
public static function FixedPoint8_8($rawdata) | |
{ | |
} | |
public static function FixedPoint16_16($rawdata) | |
{ | |
} | |
public static function FixedPoint2_30($rawdata) | |
{ | |
} | |
public static function CreateDeepArray($ArrayPath, $Separator, $Value) | |
{ | |
} | |
public static function array_max($arraydata, $returnkey = \false) | |
{ | |
} | |
public static function array_min($arraydata, $returnkey = \false) | |
{ | |
} | |
public static function XML2array($XMLstring) | |
{ | |
} | |
public static function SimpleXMLelement2array($XMLobject) | |
{ | |
} | |
// Allan Hansen <ahØartemis*dk> | |
// self::md5_data() - returns md5sum for a file from startuing position to absolute end position | |
public static function hash_data($file, $offset, $end, $algorithm) | |
{ | |
} | |
public static function CopyFileParts($filename_source, $filename_dest, $offset, $length) | |
{ | |
} | |
public static function iconv_fallback_int_utf8($charval) | |
{ | |
} | |
// ISO-8859-1 => UTF-8 | |
public static function iconv_fallback_iso88591_utf8($string, $bom = \false) | |
{ | |
} | |
// ISO-8859-1 => UTF-16BE | |
public static function iconv_fallback_iso88591_utf16be($string, $bom = \false) | |
{ | |
} | |
// ISO-8859-1 => UTF-16LE | |
public static function iconv_fallback_iso88591_utf16le($string, $bom = \false) | |
{ | |
} | |
// ISO-8859-1 => UTF-16LE (BOM) | |
public static function iconv_fallback_iso88591_utf16($string) | |
{ | |
} | |
// UTF-8 => ISO-8859-1 | |
public static function iconv_fallback_utf8_iso88591($string) | |
{ | |
} | |
// UTF-8 => UTF-16BE | |
public static function iconv_fallback_utf8_utf16be($string, $bom = \false) | |
{ | |
} | |
// UTF-8 => UTF-16LE | |
public static function iconv_fallback_utf8_utf16le($string, $bom = \false) | |
{ | |
} | |
// UTF-8 => UTF-16LE (BOM) | |
public static function iconv_fallback_utf8_utf16($string) | |
{ | |
} | |
// UTF-16BE => UTF-8 | |
public static function iconv_fallback_utf16be_utf8($string) | |
{ | |
} | |
// UTF-16LE => UTF-8 | |
public static function iconv_fallback_utf16le_utf8($string) | |
{ | |
} | |
// UTF-16BE => ISO-8859-1 | |
public static function iconv_fallback_utf16be_iso88591($string) | |
{ | |
} | |
// UTF-16LE => ISO-8859-1 | |
public static function iconv_fallback_utf16le_iso88591($string) | |
{ | |
} | |
// UTF-16 (BOM) => ISO-8859-1 | |
public static function iconv_fallback_utf16_iso88591($string) | |
{ | |
} | |
// UTF-16 (BOM) => UTF-8 | |
public static function iconv_fallback_utf16_utf8($string) | |
{ | |
} | |
public static function iconv_fallback($in_charset, $out_charset, $string) | |
{ | |
} | |
public static function recursiveMultiByteCharString2HTML($data, $charset = 'ISO-8859-1') | |
{ | |
} | |
public static function MultiByteCharString2HTML($string, $charset = 'ISO-8859-1') | |
{ | |
} | |
public static function RGADnameLookup($namecode) | |
{ | |
} | |
public static function RGADoriginatorLookup($originatorcode) | |
{ | |
} | |
public static function RGADadjustmentLookup($rawadjustment, $signbit) | |
{ | |
} | |
public static function RGADgainString($namecode, $originatorcode, $replaygain) | |
{ | |
} | |
public static function RGADamplitude2dB($amplitude) | |
{ | |
} | |
public static function GetDataImageSize($imgData, &$imageinfo = array()) | |
{ | |
} | |
public static function ImageExtFromMime($mime_type) | |
{ | |
} | |
public static function ImageTypesLookup($imagetypeid) | |
{ | |
} | |
public static function CopyTagsToComments(&$ThisFileInfo) | |
{ | |
} | |
public static function EmbeddedLookup($key, $begin, $end, $file, $name) | |
{ | |
} | |
public static function IncludeDependency($filename, $sourcefile, $DieOnFailure = \false) | |
{ | |
} | |
public static function trimNullByte($string) | |
{ | |
} | |
public static function getFileSizeSyscall($path) | |
{ | |
} | |
/** | |
* Workaround for Bug #37268 (https://bugs.php.net/bug.php?id=37268) | |
* @param string $path A path. | |
* @param string $suffix If the name component ends in suffix this will also be cut off. | |
* @return string | |
*/ | |
public static function mb_basename($path, $suffix = \null) | |
{ | |
} | |
} | |
// End: Defines | |
class getID3 | |
{ | |
// public: Settings | |
public $encoding = 'UTF-8'; | |
// CASE SENSITIVE! - i.e. (must be supported by iconv()). Examples: ISO-8859-1 UTF-8 UTF-16 UTF-16BE | |
public $encoding_id3v1 = 'ISO-8859-1'; | |
// Should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'EUC-CN' or 'CP1252' | |
// public: Optional tag checks - disable for speed. | |
public $option_tag_id3v1 = \true; | |
// Read and process ID3v1 tags | |
public $option_tag_id3v2 = \true; | |
// Read and process ID3v2 tags | |
public $option_tag_lyrics3 = \true; | |
// Read and process Lyrics3 tags | |
public $option_tag_apetag = \true; | |
// Read and process APE tags | |
public $option_tags_process = \true; | |
// Copy tags to root key 'tags' and encode to $this->encoding | |
public $option_tags_html = \true; | |
// Copy tags to root key 'tags_html' properly translated from various encodings to HTML entities | |
// public: Optional tag/comment calucations | |
public $option_extra_info = \true; | |
// Calculate additional info such as bitrate, channelmode etc | |
// public: Optional handling of embedded attachments (e.g. images) | |
public $option_save_attachments = \true; | |
// defaults to true (ATTACHMENTS_INLINE) for backward compatibility | |
// public: Optional calculations | |
public $option_md5_data = \false; | |
// Get MD5 sum of data part - slow | |
public $option_md5_data_source = \false; | |
// Use MD5 of source file if availble - only FLAC and OptimFROG | |
public $option_sha1_data = \false; | |
// Get SHA1 sum of data part - slow | |
public $option_max_2gb_check = \null; | |
// Check whether file is larger than 2GB and thus not supported by 32-bit PHP (null: auto-detect based on PHP_INT_MAX) | |
// public: Read buffer size in bytes | |
public $option_fread_buffer_size = 32768; | |
// Public variables | |
public $filename; | |
// Filename of file being analysed. | |
public $fp; | |
// Filepointer to file being analysed. | |
public $info; | |
// Result array. | |
public $tempdir = \GETID3_TEMP_DIR; | |
public $memory_limit = 0; | |
// Protected variables | |
protected $startup_error = ''; | |
protected $startup_warning = ''; | |
const VERSION = '1.9.14-201706111222'; | |
const FREAD_BUFFER_SIZE = 32768; | |
const ATTACHMENTS_NONE = \false; | |
const ATTACHMENTS_INLINE = \true; | |
// public: constructor | |
public function __construct() | |
{ | |
} | |
public function version() | |
{ | |
} | |
public function fread_buffer_size() | |
{ | |
} | |
// public: setOption | |
public function setOption($optArray) | |
{ | |
} | |
public function openfile($filename, $filesize = \null) | |
{ | |
} | |
// public: analyze file | |
public function analyze($filename, $filesize = \null, $original_filename = '') | |
{ | |
} | |
// private: error handling | |
public function error($message) | |
{ | |
} | |
// private: warning handling | |
public function warning($message) | |
{ | |
} | |
// private: CleanUp | |
private function CleanUp() | |
{ | |
} | |
// return array containing information about all supported formats | |
public function GetFileFormatArray() | |
{ | |
} | |
public function GetFileFormat(&$filedata, $filename = '') | |
{ | |
} | |
// converts array to $encoding charset from $this->encoding | |
public function CharConvert(&$array, $encoding) | |
{ | |
} | |
public function HandleAllTags() | |
{ | |
} | |
public function getHashdata($algorithm) | |
{ | |
} | |
public function ChannelsBitratePlaytimeCalculations() | |
{ | |
} | |
public function CalculateCompressionRatioVideo() | |
{ | |
} | |
public function CalculateCompressionRatioAudio() | |
{ | |
} | |
public function CalculateReplayGain() | |
{ | |
} | |
public function ProcessAudioStreams() | |
{ | |
} | |
public function getid3_tempnam() | |
{ | |
} | |
public function include_module($name) | |
{ | |
} | |
public static function is_writable($filename) | |
{ | |
} | |
} | |
abstract class getid3_handler | |
{ | |
/** | |
* @var getID3 | |
*/ | |
protected $getid3; | |
// pointer | |
protected $data_string_flag = \false; | |
// analyzing filepointer or string | |
protected $data_string = ''; | |
// string to analyze | |
protected $data_string_position = 0; | |
// seek position in string | |
protected $data_string_length = 0; | |
// string length | |
private $dependency_to = \null; | |
public function __construct(\getID3 $getid3, $call_module = \null) | |
{ | |
} | |
// Analyze from file pointer | |
public abstract function Analyze(); | |
// Analyze from string instead | |
public function AnalyzeString($string) | |
{ | |
} | |
public function setStringMode($string) | |
{ | |
} | |
protected function ftell() | |
{ | |
} | |
protected function fread($bytes) | |
{ | |
} | |
protected function fseek($bytes, $whence = \SEEK_SET) | |
{ | |
} | |
protected function feof() | |
{ | |
} | |
protected final function isDependencyFor($module) | |
{ | |
} | |
protected function error($text) | |
{ | |
} | |
protected function warning($text) | |
{ | |
} | |
protected function notice($text) | |
{ | |
} | |
public function saveAttachment($name, $offset, $length, $image_mime = \null) | |
{ | |
} | |
} | |
class getid3_exception extends \Exception | |
{ | |
public $message; | |
} | |
class getid3_asf extends \getid3_handler | |
{ | |
public function __construct(\getID3 $getid3) | |
{ | |
} | |
public function Analyze() | |
{ | |
} | |
public static function codecListObjectTypeLookup($CodecListType) | |
{ | |
} | |
public static function KnownGUIDs() | |
{ | |
} | |
public static function GUIDname($GUIDstring) | |
{ | |
} | |
public static function ASFIndexObjectIndexTypeLookup($id) | |
{ | |
} | |
public static function GUIDtoBytestring($GUIDstring) | |
{ | |
} | |
public static function BytestringToGUID($Bytestring) | |
{ | |
} | |
public static function FILETIMEtoUNIXtime($FILETIME, $round = \true) | |
{ | |
} | |
public static function WMpictureTypeLookup($WMpictureType) | |
{ | |
} | |
public function HeaderExtensionObjectDataParse(&$asf_header_extension_object_data, &$unhandled_sections) | |
{ | |
} | |
public static function metadataLibraryObjectDataTypeLookup($id) | |
{ | |
} | |
public function ASF_WMpicture(&$data) | |
{ | |
} | |
// Remove terminator 00 00 and convert UTF-16LE to Latin-1 | |
public static function TrimConvert($string) | |
{ | |
} | |
// Remove terminator 00 00 | |
public static function TrimTerm($string) | |
{ | |
} | |
} | |
class getid3_flv extends \getid3_handler | |
{ | |
const magic = 'FLV'; | |
public $max_frames = 100000; | |
// break out of the loop if too many frames have been scanned; only scan this many if meta frame does not contain useful duration | |
public function Analyze() | |
{ | |
} | |
public static function audioFormatLookup($id) | |
{ | |
} | |
public static function audioRateLookup($id) | |
{ | |
} | |
public static function audioBitDepthLookup($id) | |
{ | |
} | |
public static function videoCodecLookup($id) | |
{ | |
} | |
} | |
class AMFStream | |
{ | |
public $bytes; | |
public $pos; | |
public function __construct(&$bytes) | |
{ | |
} | |
public function readByte() | |
{ | |
} | |
public function readInt() | |
{ | |
} | |
public function readLong() | |
{ | |
} | |
public function readDouble() | |
{ | |
} | |
public function readUTF() | |
{ | |
} | |
public function readLongUTF() | |
{ | |
} | |
public function read($length) | |
{ | |
} | |
public function peekByte() | |
{ | |
} | |
public function peekInt() | |
{ | |
} | |
public function peekLong() | |
{ | |
} | |
public function peekDouble() | |
{ | |
} | |
public function peekUTF() | |
{ | |
} | |
public function peekLongUTF() | |
{ | |
} | |
} | |
class AMFReader | |
{ | |
public $stream; | |
public function __construct(&$stream) | |
{ | |
} | |
public function readData() | |
{ | |
} | |
public function readDouble() | |
{ | |
} | |
public function readBoolean() | |
{ | |
} | |
public function readString() | |
{ | |
} | |
public function readObject() | |
{ | |
} | |
public function readMixedArray() | |
{ | |
} | |
public function readArray() | |
{ | |
} | |
public function readDate() | |
{ | |
} | |
public function readLongString() | |
{ | |
} | |
public function readXML() | |
{ | |
} | |
public function readTypedObject() | |
{ | |
} | |
} | |
class AVCSequenceParameterSetReader | |
{ | |
public $sps; | |
public $start = 0; | |
public $currentBytes = 0; | |
public $currentBits = 0; | |
public $width; | |
public $height; | |
public function __construct($sps) | |
{ | |
} | |
public function readData() | |
{ | |
} | |
public function skipBits($bits) | |
{ | |
} | |
public function getBit() | |
{ | |
} | |
public function getBits($bits) | |
{ | |
} | |
public function expGolombUe() | |
{ | |
} | |
public function expGolombSe() | |
{ | |
} | |
public function getWidth() | |
{ | |
} | |
public function getHeight() | |
{ | |
} | |
} | |
// [FD] -- Relative position of the data that should be in position of the virtual block. | |
/** | |
* @tutorial http://www.matroska.org/technical/specs/index.html | |
* | |
* @todo Rewrite EBML parser to reduce it's size and honor default element values | |
* @todo After rewrite implement stream size calculation, that will provide additional useful info and enable AAC/FLAC audio bitrate detection | |
*/ | |
class getid3_matroska extends \getid3_handler | |
{ | |
// public options | |
public static $hide_clusters = \true; | |
// if true, do not return information about CLUSTER chunks, since there's a lot of them and they're not usually useful [default: TRUE] | |
public static $parse_whole_file = \false; | |
// true to parse the whole file, not only header [default: FALSE] | |
// private parser settings/placeholders | |
private $EBMLbuffer = ''; | |
private $EBMLbuffer_offset = 0; | |
private $EBMLbuffer_length = 0; | |
private $current_offset = 0; | |
private $unuseful_elements = array(\EBML_ID_CRC32, \EBML_ID_VOID); | |
public function Analyze() | |
{ | |
} | |
private function parseEBML(&$info) | |
{ | |
} | |
private function EnsureBufferHasEnoughData($min_data = 1024) | |
{ | |
} | |
private function readEBMLint() | |
{ | |
} | |
private function readEBMLelementData($length, $check_buffer = \false) | |
{ | |
} | |
private function getEBMLelement(&$element, $parent_end, $get_data = \false) | |
{ | |
} | |
private function unhandledElement($type, $line, $element) | |
{ | |
} | |
private function ExtractCommentsSimpleTag($SimpleTagArray) | |
{ | |
} | |
private function HandleEMBLSimpleTag($parent_end) | |
{ | |
} | |
private function HandleEMBLClusterBlock($element, $block_type, &$info) | |
{ | |
} | |
private static function EBML2Int($EBMLstring) | |
{ | |
} | |
private static function EBMLdate2unix($EBMLdatestamp) | |
{ | |
} | |
public static function TargetTypeValue($target_type) | |
{ | |
} | |
public static function BlockLacingType($lacingtype) | |
{ | |
} | |
public static function CodecIDtoCommonName($codecid) | |
{ | |
} | |
private static function EBMLidName($value) | |
{ | |
} | |
public static function displayUnit($value) | |
{ | |
} | |
private static function getDefaultStreamInfo($streams) | |
{ | |
} | |
} | |
// needed for ISO 639-2 language code lookup | |
class getid3_quicktime extends \getid3_handler | |
{ | |
public $ReturnAtomData = \true; | |
public $ParseAllPossibleAtoms = \false; | |
public function Analyze() | |
{ | |
} | |
public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) | |
{ | |
} | |
public function QuicktimeParseContainerAtom($atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) | |
{ | |
} | |
public function quicktime_read_mp4_descr_length($data, &$offset) | |
{ | |
} | |
public function QuicktimeLanguageLookup($languageid) | |
{ | |
} | |
public function QuicktimeVideoCodecLookup($codecid) | |
{ | |
} | |
public function QuicktimeAudioCodecLookup($codecid) | |
{ | |
} | |
public function QuicktimeDCOMLookup($compressionid) | |
{ | |
} | |
public function QuicktimeColorNameLookup($colordepthid) | |
{ | |
} | |
public function QuicktimeSTIKLookup($stik) | |
{ | |
} | |
public function QuicktimeIODSaudioProfileName($audio_profile_id) | |
{ | |
} | |
public function QuicktimeIODSvideoProfileName($video_profile_id) | |
{ | |
} | |
public function QuicktimeContentRatingLookup($rtng) | |
{ | |
} | |
public function QuicktimeStoreAccountTypeLookup($akid) | |
{ | |
} | |
public function QuicktimeStoreFrontCodeLookup($sfid) | |
{ | |
} | |
public function QuicktimeParseNikonNCTG($atom_data) | |
{ | |
} | |
public function CopyToAppropriateCommentsSection($keyname, $data, $boxname = '') | |
{ | |
} | |
public function LociString($lstring, &$count) | |
{ | |
} | |
public function NoNullString($nullterminatedstring) | |
{ | |
} | |
public function Pascal2String($pascalstring) | |
{ | |
} | |
/* | |
// helper functions for m4b audiobook chapters | |
// code by Steffen Hartmann 2015-Nov-08 | |
*/ | |
public function search_tag_by_key($info, $tag, $history, &$result) | |
{ | |
} | |
public function search_tag_by_pair($info, $k, $v, $history, &$result) | |
{ | |
} | |
public function quicktime_time_to_sample_table($info) | |
{ | |
} | |
function quicktime_bookmark_time_scale($info) | |
{ | |
} | |
} | |
class getid3_riff extends \getid3_handler | |
{ | |
protected $container = 'riff'; | |
// default | |
public function Analyze() | |
{ | |
} | |
public function ParseRIFFAMV($startoffset, $maxoffset) | |
{ | |
} | |
public function ParseRIFF($startoffset, $maxoffset) | |
{ | |
} | |
public function ParseRIFFdata(&$RIFFdata) | |
{ | |
} | |
public static function parseComments(&$RIFFinfoArray, &$CommentsTargetArray) | |
{ | |
} | |
public static function parseWAVEFORMATex($WaveFormatExData) | |
{ | |
} | |
public function parseWavPackHeader($WavPackChunkData) | |
{ | |
} | |
public static function ParseBITMAPINFOHEADER($BITMAPINFOHEADER, $littleEndian = \true) | |
{ | |
} | |
public static function ParseDIVXTAG($DIVXTAG, $raw = \false) | |
{ | |
} | |
public static function waveSNDMtagLookup($tagshortname) | |
{ | |
} | |
public static function wFormatTagLookup($wFormatTag) | |
{ | |
} | |
public static function fourccLookup($fourcc) | |
{ | |
} | |
private function EitherEndian2Int($byteword, $signed = \false) | |
{ | |
} | |
} | |
///////////////////////////////////////////////////////////////// | |
/// getID3() by James Heinrich <info@getid3.org> // | |
// available at http://getid3.sourceforge.net // | |
// or http://www.getid3.org // | |
// also https://github.com/JamesHeinrich/getID3 // | |
///////////////////////////////////////////////////////////////// | |
// See readme.txt for more details // | |
///////////////////////////////////////////////////////////////// | |
// // | |
// module.audio.ac3.php // | |
// module for analyzing AC-3 (aka Dolby Digital) audio files // | |
// dependencies: NONE // | |
// /// | |
///////////////////////////////////////////////////////////////// | |
class getid3_ac3 extends \getid3_handler | |
{ | |
private $AC3header = array(); | |
private $BSIoffset = 0; | |
const syncword = 0xb77; | |
public function Analyze() | |
{ | |
} | |
private function readHeaderBSI($length) | |
{ | |
} | |
public static function sampleRateCodeLookup($fscod) | |
{ | |
} | |
public static function sampleRateCodeLookup2($fscod2) | |
{ | |
} | |
public static function serviceTypeLookup($bsmod, $acmod) | |
{ | |
} | |
public static function audioCodingModeLookup($acmod) | |
{ | |
} | |
public static function centerMixLevelLookup($cmixlev) | |
{ | |
} | |
public static function surroundMixLevelLookup($surmixlev) | |
{ | |
} | |
public static function dolbySurroundModeLookup($dsurmod) | |
{ | |
} | |
public static function channelsEnabledLookup($acmod, $lfeon) | |
{ | |
} | |
public static function heavyCompression($compre) | |
{ | |
} | |
public static function roomTypeLookup($roomtyp) | |
{ | |
} | |
public static function frameSizeLookup($frmsizecod, $fscod) | |
{ | |
} | |
public static function bitrateLookup($frmsizecod) | |
{ | |
} | |
public static function blocksPerSyncFrame($numblkscod) | |
{ | |
} | |
} | |
///////////////////////////////////////////////////////////////// | |
/// getID3() by James Heinrich <info@getid3.org> // | |
// available at http://getid3.sourceforge.net // | |
// or http://www.getid3.org // | |
// also https://github.com/JamesHeinrich/getID3 // | |
///////////////////////////////////////////////////////////////// | |
// See readme.txt for more details // | |
///////////////////////////////////////////////////////////////// | |
// // | |
// module.audio.dts.php // | |
// module for analyzing DTS Audio files // | |
// dependencies: NONE // | |
// // | |
///////////////////////////////////////////////////////////////// | |
/** | |
* @tutorial http://wiki.multimedia.cx/index.php?title=DTS | |
*/ | |
class getid3_dts extends \getid3_handler | |
{ | |
/** | |
* Default DTS syncword used in native .cpt or .dts formats | |
*/ | |
const syncword = "��\1"; | |
private $readBinDataOffset = 0; | |
/** | |
* Possible syncwords indicating bitstream encoding | |
*/ | |
public static $syncwords = array( | |
0 => "��\1", | |
// raw big-endian | |
1 => "�\1�", | |
// raw little-endian | |
2 => "\37��\0", | |
// 14-bit big-endian | |
3 => "�\37\0�", | |
); | |
// 14-bit little-endian | |
public function Analyze() | |
{ | |
} | |
private function readBinData($bin, $length) | |
{ | |
} | |
public static function bitrateLookup($index) | |
{ | |
} | |
public static function sampleRateLookup($index) | |
{ | |
} | |
public static function bitPerSampleLookup($index) | |
{ | |
} | |
public static function numChannelsLookup($index) | |
{ | |
} | |
public static function channelArrangementLookup($index) | |
{ | |
} | |
public static function dialogNormalization($index, $version) | |
{ | |
} | |
} | |
/** | |
* @tutorial http://flac.sourceforge.net/format.html | |
*/ | |
class getid3_flac extends \getid3_handler | |
{ | |
const syncword = 'fLaC'; | |
public function Analyze() | |
{ | |
} | |
public function parseMETAdata() | |
{ | |
} | |
private function parseSTREAMINFO($BlockData) | |
{ | |
} | |
private function parseAPPLICATION($BlockData) | |
{ | |
} | |
private function parseSEEKTABLE($BlockData) | |
{ | |
} | |
private function parseVORBIS_COMMENT($BlockData) | |
{ | |
} | |
private function parseCUESHEET($BlockData) | |
{ | |
} | |
/** | |
* Parse METADATA_BLOCK_PICTURE flac structure and extract attachment | |
* External usage: audio.ogg | |
*/ | |
public function parsePICTURE() | |
{ | |
} | |
public static function metaBlockTypeLookup($blocktype) | |
{ | |
} | |
public static function applicationIDLookup($applicationid) | |
{ | |
} | |
public static function pictureTypeLookup($type_id) | |
{ | |
} | |
} | |
class getid3_mp3 extends \getid3_handler | |
{ | |
public $allow_bruteforce = \false; | |
// forces getID3() to scan the file byte-by-byte and log all the valid audio frame headers - extremely slow, unrecommended, but may provide data from otherwise-unusuable files | |
public function Analyze() | |
{ | |
} | |
public function GuessEncoderOptions() | |
{ | |
} | |
public function decodeMPEGaudioHeader($offset, &$info, $recursivesearch = \true, $ScanAsCBR = \false, $FastMPEGheaderScan = \false) | |
{ | |
} | |
public function RecursiveFrameScanning(&$offset, &$nextframetestoffset, $ScanAsCBR) | |
{ | |
} | |
public function FreeFormatFrameLength($offset, $deepscan = \false) | |
{ | |
} | |
public function getOnlyMPEGaudioInfoBruteForce() | |
{ | |
} | |
public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram = \false) | |
{ | |
} | |
public static function MPEGaudioVersionArray() | |
{ | |
} | |
public static function MPEGaudioLayerArray() | |
{ | |
} | |
public static function MPEGaudioBitrateArray() | |
{ | |
} | |
public static function MPEGaudioFrequencyArray() | |
{ | |
} | |
public static function MPEGaudioChannelModeArray() | |
{ | |
} | |
public static function MPEGaudioModeExtensionArray() | |
{ | |
} | |
public static function MPEGaudioEmphasisArray() | |
{ | |
} | |
public static function MPEGaudioHeaderBytesValid($head4, $allowBitrate15 = \false) | |
{ | |
} | |
public static function MPEGaudioHeaderValid($rawarray, $echoerrors = \false, $allowBitrate15 = \false) | |
{ | |
} | |
public static function MPEGaudioHeaderDecode($Header4Bytes) | |
{ | |
} | |
public static function MPEGaudioFrameLength(&$bitrate, &$version, &$layer, $padding, &$samplerate) | |
{ | |
} | |
public static function ClosestStandardMP3Bitrate($bit_rate) | |
{ | |
} | |
public static function XingVBRidOffset($version, $channelmode) | |
{ | |
} | |
public static function LAMEvbrMethodLookup($VBRmethodID) | |
{ | |
} | |
public static function LAMEmiscStereoModeLookup($StereoModeID) | |
{ | |
} | |
public static function LAMEmiscSourceSampleFrequencyLookup($SourceSampleFrequencyID) | |
{ | |
} | |
public static function LAMEsurroundInfoLookup($SurroundInfoID) | |
{ | |
} | |
public static function LAMEpresetUsedLookup($LAMEtag) | |
{ | |
} | |
} | |
class getid3_ogg extends \getid3_handler | |
{ | |
// http://xiph.org/vorbis/doc/Vorbis_I_spec.html | |
public function Analyze() | |
{ | |
} | |
public function ParseVorbisPageHeader(&$filedata, &$filedataoffset, &$oggpageinfo) | |
{ | |
} | |
// http://tools.ietf.org/html/draft-ietf-codec-oggopus-03 | |
public function ParseOpusPageHeader(&$filedata, &$filedataoffset, &$oggpageinfo) | |
{ | |
} | |
public function ParseOggPageHeader() | |
{ | |
} | |
// http://xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810005 | |
public function ParseVorbisComments() | |
{ | |
} | |
public static function SpeexBandModeLookup($mode) | |
{ | |
} | |
public static function OggPageSegmentLength($OggInfoArray, $SegmentNumber = 1) | |
{ | |
} | |
public static function get_quality_from_nominal_bitrate($nominal_bitrate) | |
{ | |
} | |
public static function TheoraColorSpace($colorspace_id) | |
{ | |
} | |
public static function TheoraPixelFormat($pixelformat_id) | |
{ | |
} | |
} | |
///////////////////////////////////////////////////////////////// | |
/// getID3() by James Heinrich <info@getid3.org> // | |
// available at http://getid3.sourceforge.net // | |
// or http://www.getid3.org // | |
// also https://github.com/JamesHeinrich/getID3 // | |
///////////////////////////////////////////////////////////////// | |
// See readme.txt for more details // | |
///////////////////////////////////////////////////////////////// | |
// // | |
// module.tag.apetag.php // | |
// module for analyzing APE tags // | |
// dependencies: NONE // | |
// /// | |
///////////////////////////////////////////////////////////////// | |
class getid3_apetag extends \getid3_handler | |
{ | |
public $inline_attachments = \true; | |
// true: return full data for all attachments; false: return no data for all attachments; integer: return data for attachments <= than this; string: save as file to this directory | |
public $overrideendoffset = 0; | |
public function Analyze() | |
{ | |
} | |
public function parseAPEheaderFooter($APEheaderFooterData) | |
{ | |
} | |
public function parseAPEtagFlags($rawflagint) | |
{ | |
} | |
public function APEcontentTypeFlagLookup($contenttypeid) | |
{ | |
} | |
public function APEtagItemIsUTF8Lookup($itemkey) | |
{ | |
} | |
} | |
///////////////////////////////////////////////////////////////// | |
/// getID3() by James Heinrich <info@getid3.org> // | |
// available at http://getid3.sourceforge.net // | |
// or http://www.getid3.org // | |
// also https://github.com/JamesHeinrich/getID3 // | |
///////////////////////////////////////////////////////////////// | |
// See readme.txt for more details // | |
///////////////////////////////////////////////////////////////// | |
// // | |
// module.tag.id3v1.php // | |
// module for analyzing ID3v1 tags // | |
// dependencies: NONE // | |
// /// | |
///////////////////////////////////////////////////////////////// | |
class getid3_id3v1 extends \getid3_handler | |
{ | |
public function Analyze() | |
{ | |
} | |
public static function cutfield($str) | |
{ | |
} | |
public static function ArrayOfGenres($allowSCMPXextended = \false) | |
{ | |
} | |
public static function LookupGenreName($genreid, $allowSCMPXextended = \true) | |
{ | |
} | |
public static function LookupGenreID($genre, $allowSCMPXextended = \false) | |
{ | |
} | |
public static function StandardiseID3v1GenreName($OriginalGenre) | |
{ | |
} | |
public static function GenerateID3v1Tag($title, $artist, $album, $year, $genreid, $comment, $track = '') | |
{ | |
} | |
} | |
class getid3_id3v2 extends \getid3_handler | |
{ | |
public $StartingOffset = 0; | |
public function Analyze() | |
{ | |
} | |
public function ParseID3v2GenreString($genrestring) | |
{ | |
} | |
public function ParseID3v2Frame(&$parsedFrame) | |
{ | |
} | |
public function DeUnsynchronise($data) | |
{ | |
} | |
public function LookupExtendedHeaderRestrictionsTagSizeLimits($index) | |
{ | |
} | |
public function LookupExtendedHeaderRestrictionsTextEncodings($index) | |
{ | |
} | |
public function LookupExtendedHeaderRestrictionsTextFieldSize($index) | |
{ | |
} | |
public function LookupExtendedHeaderRestrictionsImageEncoding($index) | |
{ | |
} | |
public function LookupExtendedHeaderRestrictionsImageSizeSize($index) | |
{ | |
} | |
public function LookupCurrencyUnits($currencyid) | |
{ | |
} | |
public function LookupCurrencyCountry($currencyid) | |
{ | |
} | |
public static function LanguageLookup($languagecode, $casesensitive = \false) | |
{ | |
} | |
public static function ETCOEventLookup($index) | |
{ | |
} | |
public static function SYTLContentTypeLookup($index) | |
{ | |
} | |
public static function APICPictureTypeLookup($index, $returnarray = \false) | |
{ | |
} | |
public static function COMRReceivedAsLookup($index) | |
{ | |
} | |
public static function RVA2ChannelTypeLookup($index) | |
{ | |
} | |
public static function FrameNameLongLookup($framename) | |
{ | |
} | |
public static function FrameNameShortLookup($framename) | |
{ | |
} | |
public static function TextEncodingTerminatorLookup($encoding) | |
{ | |
} | |
public static function TextEncodingNameLookup($encoding) | |
{ | |
} | |
public static function IsValidID3v2FrameName($framename, $id3v2majorversion) | |
{ | |
} | |
public static function IsANumber($numberstring, $allowdecimal = \false, $allownegative = \false) | |
{ | |
} | |
public static function IsValidDateStampString($datestamp) | |
{ | |
} | |
public static function ID3v2HeaderLength($majorversion) | |
{ | |
} | |
public static function ID3v22iTunesBrokenFrameName($frame_name) | |
{ | |
} | |
} | |
///////////////////////////////////////////////////////////////// | |
/// getID3() by James Heinrich <info@getid3.org> // | |
// available at http://getid3.sourceforge.net // | |
// or http://www.getid3.org // | |
// also https://github.com/JamesHeinrich/getID3 // | |
///////////////////////////////////////////////////////////////// | |
// See readme.txt for more details // | |
///////////////////////////////////////////////////////////////// | |
/// // | |
// module.tag.lyrics3.php // | |
// module for analyzing Lyrics3 tags // | |
// dependencies: module.tag.apetag.php (optional) // | |
// /// | |
///////////////////////////////////////////////////////////////// | |
class getid3_lyrics3 extends \getid3_handler | |
{ | |
public function Analyze() | |
{ | |
} | |
public function getLyrics3Data($endoffset, $version, $length) | |
{ | |
} | |
public function Lyrics3Timestamp2Seconds($rawtimestamp) | |
{ | |
} | |
public function Lyrics3LyricsTimestampParse(&$Lyrics3data) | |
{ | |
} | |
public function IntString2Bool($char) | |
{ | |
} | |
} | |
/** | |
* IXR_Base64 | |
* | |
* @package IXR | |
* @since 1.5.0 | |
*/ | |
class IXR_Base64 | |
{ | |
var $data; | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($data) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function IXR_Base64($data) | |
{ | |
} | |
function getXml() | |
{ | |
} | |
} | |
/** | |
* IXR_Client | |
* | |
* @package IXR | |
* @since 1.5.0 | |
* | |
*/ | |
class IXR_Client | |
{ | |
var $server; | |
var $port; | |
var $path; | |
var $useragent; | |
var $response; | |
var $message = \false; | |
var $debug = \false; | |
var $timeout; | |
var $headers = array(); | |
// Storage place for an error message | |
var $error = \false; | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($server, $path = \false, $port = 80, $timeout = 15) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function IXR_Client($server, $path = \false, $port = 80, $timeout = 15) | |
{ | |
} | |
function query() | |
{ | |
} | |
function getResponse() | |
{ | |
} | |
function isError() | |
{ | |
} | |
function getErrorCode() | |
{ | |
} | |
function getErrorMessage() | |
{ | |
} | |
} | |
/** | |
* IXR_ClientMulticall | |
* | |
* @package IXR | |
* @since 1.5.0 | |
*/ | |
class IXR_ClientMulticall extends \IXR_Client | |
{ | |
var $calls = array(); | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($server, $path = \false, $port = 80) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function IXR_ClientMulticall($server, $path = \false, $port = 80) | |
{ | |
} | |
function addCall() | |
{ | |
} | |
function query() | |
{ | |
} | |
} | |
/** | |
* IXR_Date | |
* | |
* @package IXR | |
* @since 1.5.0 | |
*/ | |
class IXR_Date | |
{ | |
var $year; | |
var $month; | |
var $day; | |
var $hour; | |
var $minute; | |
var $second; | |
var $timezone; | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($time) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function IXR_Date($time) | |
{ | |
} | |
function parseTimestamp($timestamp) | |
{ | |
} | |
function parseIso($iso) | |
{ | |
} | |
function getIso() | |
{ | |
} | |
function getXml() | |
{ | |
} | |
function getTimestamp() | |
{ | |
} | |
} | |
/** | |
* IXR_Error | |
* | |
* @package IXR | |
* @since 1.5.0 | |
*/ | |
class IXR_Error | |
{ | |
var $code; | |
var $message; | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($code, $message) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function IXR_Error($code, $message) | |
{ | |
} | |
function getXml() | |
{ | |
} | |
} | |
/** | |
* IXR_Server | |
* | |
* @package IXR | |
* @since 1.5.0 | |
*/ | |
class IXR_Server | |
{ | |
var $data; | |
var $callbacks = array(); | |
var $message; | |
var $capabilities; | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($callbacks = \false, $data = \false, $wait = \false) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function IXR_Server($callbacks = \false, $data = \false, $wait = \false) | |
{ | |
} | |
function serve($data = \false) | |
{ | |
} | |
function call($methodname, $args) | |
{ | |
} | |
function error($error, $message = \false) | |
{ | |
} | |
function output($xml) | |
{ | |
} | |
function hasMethod($method) | |
{ | |
} | |
function setCapabilities() | |
{ | |
} | |
function getCapabilities($args) | |
{ | |
} | |
function setCallbacks() | |
{ | |
} | |
function listMethods($args) | |
{ | |
} | |
function multiCall($methodcalls) | |
{ | |
} | |
} | |
/** | |
* IXR_IntrospectionServer | |
* | |
* @package IXR | |
* @since 1.5.0 | |
*/ | |
class IXR_IntrospectionServer extends \IXR_Server | |
{ | |
var $signatures; | |
var $help; | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct() | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function IXR_IntrospectionServer() | |
{ | |
} | |
function addCallback($method, $callback, $args, $help) | |
{ | |
} | |
function call($methodname, $args) | |
{ | |
} | |
function methodSignature($method) | |
{ | |
} | |
function methodHelp($method) | |
{ | |
} | |
} | |
/** | |
* IXR_MESSAGE | |
* | |
* @package IXR | |
* @since 1.5.0 | |
* | |
*/ | |
class IXR_Message | |
{ | |
var $message = \false; | |
var $messageType = \false; | |
// methodCall / methodResponse / fault | |
var $faultCode = \false; | |
var $faultString = \false; | |
var $methodName = ''; | |
var $params = array(); | |
// Current variable stacks | |
var $_arraystructs = array(); | |
// The stack used to keep track of the current array/struct | |
var $_arraystructstypes = array(); | |
// Stack keeping track of if things are structs or array | |
var $_currentStructName = array(); | |
// A stack as well | |
var $_param; | |
var $_value; | |
var $_currentTag; | |
var $_currentTagContents; | |
// The XML parser | |
var $_parser; | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($message) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function IXR_Message($message) | |
{ | |
} | |
function parse() | |
{ | |
} | |
function tag_open($parser, $tag, $attr) | |
{ | |
} | |
function cdata($parser, $cdata) | |
{ | |
} | |
function tag_close($parser, $tag) | |
{ | |
} | |
} | |
/** | |
* IXR_Request | |
* | |
* @package IXR | |
* @since 1.5.0 | |
*/ | |
class IXR_Request | |
{ | |
var $method; | |
var $args; | |
var $xml; | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($method, $args) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function IXR_Request($method, $args) | |
{ | |
} | |
function getLength() | |
{ | |
} | |
function getXml() | |
{ | |
} | |
} | |
/** | |
* IXR_Value | |
* | |
* @package IXR | |
* @since 1.5.0 | |
*/ | |
class IXR_Value | |
{ | |
var $data; | |
var $type; | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($data, $type = \false) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function IXR_Value($data, $type = \false) | |
{ | |
} | |
function calculateType() | |
{ | |
} | |
function getXml() | |
{ | |
} | |
/** | |
* Checks whether or not the supplied array is a struct or not | |
* | |
* @param array $array | |
* @return bool | |
*/ | |
function isStruct($array) | |
{ | |
} | |
} | |
/** | |
* Authentication provider interface | |
* | |
* @package Requests | |
* @subpackage Authentication | |
*/ | |
/** | |
* Authentication provider interface | |
* | |
* Implement this interface to act as an authentication provider. | |
* | |
* Parameters should be passed via the constructor where possible, as this | |
* makes it much easier for users to use your provider. | |
* | |
* @see Requests_Hooks | |
* @package Requests | |
* @subpackage Authentication | |
*/ | |
interface Requests_Auth | |
{ | |
/** | |
* Register hooks as needed | |
* | |
* This method is called in {@see Requests::request} when the user has set | |
* an instance as the 'auth' option. Use this callback to register all the | |
* hooks you'll need. | |
* | |
* @see Requests_Hooks::register | |
* @param Requests_Hooks $hooks Hook system | |
*/ | |
public function register(\Requests_Hooks &$hooks); | |
} | |
/** | |
* Basic Authentication provider | |
* | |
* @package Requests | |
* @subpackage Authentication | |
*/ | |
/** | |
* Basic Authentication provider | |
* | |
* Provides a handler for Basic HTTP authentication via the Authorization | |
* header. | |
* | |
* @package Requests | |
* @subpackage Authentication | |
*/ | |
class Requests_Auth_Basic implements \Requests_Auth | |
{ | |
/** | |
* Username | |
* | |
* @var string | |
*/ | |
public $user; | |
/** | |
* Password | |
* | |
* @var string | |
*/ | |
public $pass; | |
/** | |
* Constructor | |
* | |
* @throws Requests_Exception On incorrect number of arguments (`authbasicbadargs`) | |
* @param array|null $args Array of user and password. Must have exactly two elements | |
*/ | |
public function __construct($args = \null) | |
{ | |
} | |
/** | |
* Register the necessary callbacks | |
* | |
* @see curl_before_send | |
* @see fsockopen_header | |
* @param Requests_Hooks $hooks Hook system | |
*/ | |
public function register(\Requests_Hooks &$hooks) | |
{ | |
} | |
/** | |
* Set cURL parameters before the data is sent | |
* | |
* @param resource $handle cURL resource | |
*/ | |
public function curl_before_send(&$handle) | |
{ | |
} | |
/** | |
* Add extra headers to the request before sending | |
* | |
* @param string $out HTTP header string | |
*/ | |
public function fsockopen_header(&$out) | |
{ | |
} | |
/** | |
* Get the authentication string (user:pass) | |
* | |
* @return string | |
*/ | |
public function getAuthString() | |
{ | |
} | |
} | |
/** | |
* Cookie storage object | |
* | |
* @package Requests | |
* @subpackage Cookies | |
*/ | |
/** | |
* Cookie storage object | |
* | |
* @package Requests | |
* @subpackage Cookies | |
*/ | |
class Requests_Cookie | |
{ | |
/** | |
* Cookie name. | |
* | |
* @var string | |
*/ | |
public $name; | |
/** | |
* Cookie value. | |
* | |
* @var string | |
*/ | |
public $value; | |
/** | |
* Cookie attributes | |
* | |
* Valid keys are (currently) path, domain, expires, max-age, secure and | |
* httponly. | |
* | |
* @var Requests_Utility_CaseInsensitiveDictionary|array Array-like object | |
*/ | |
public $attributes = array(); | |
/** | |
* Cookie flags | |
* | |
* Valid keys are (currently) creation, last-access, persistent and | |
* host-only. | |
* | |
* @var array | |
*/ | |
public $flags = array(); | |
/** | |
* Reference time for relative calculations | |
* | |
* This is used in place of `time()` when calculating Max-Age expiration and | |
* checking time validity. | |
* | |
* @var int | |
*/ | |
public $reference_time = 0; | |
/** | |
* Create a new cookie object | |
* | |
* @param string $name | |
* @param string $value | |
* @param array|Requests_Utility_CaseInsensitiveDictionary $attributes Associative array of attribute data | |
*/ | |
public function __construct($name, $value, $attributes = array(), $flags = array(), $reference_time = \null) | |
{ | |
} | |
/** | |
* Check if a cookie is expired. | |
* | |
* Checks the age against $this->reference_time to determine if the cookie | |
* is expired. | |
* | |
* @return boolean True if expired, false if time is valid. | |
*/ | |
public function is_expired() | |
{ | |
} | |
/** | |
* Check if a cookie is valid for a given URI | |
* | |
* @param Requests_IRI $uri URI to check | |
* @return boolean Whether the cookie is valid for the given URI | |
*/ | |
public function uri_matches(\Requests_IRI $uri) | |
{ | |
} | |
/** | |
* Check if a cookie is valid for a given domain | |
* | |
* @param string $string Domain to check | |
* @return boolean Whether the cookie is valid for the given domain | |
*/ | |
public function domain_matches($string) | |
{ | |
} | |
/** | |
* Check if a cookie is valid for a given path | |
* | |
* From the path-match check in RFC 6265 section 5.1.4 | |
* | |
* @param string $request_path Path to check | |
* @return boolean Whether the cookie is valid for the given path | |
*/ | |
public function path_matches($request_path) | |
{ | |
} | |
/** | |
* Normalize cookie and attributes | |
* | |
* @return boolean Whether the cookie was successfully normalized | |
*/ | |
public function normalize() | |
{ | |
} | |
/** | |
* Parse an individual cookie attribute | |
* | |
* Handles parsing individual attributes from the cookie values. | |
* | |
* @param string $name Attribute name | |
* @param string|boolean $value Attribute value (string value, or true if empty/flag) | |
* @return mixed Value if available, or null if the attribute value is invalid (and should be skipped) | |
*/ | |
protected function normalize_attribute($name, $value) | |
{ | |
} | |
/** | |
* Format a cookie for a Cookie header | |
* | |
* This is used when sending cookies to a server. | |
* | |
* @return string Cookie formatted for Cookie header | |
*/ | |
public function format_for_header() | |
{ | |
} | |
/** | |
* Format a cookie for a Cookie header | |
* | |
* @codeCoverageIgnore | |
* @deprecated Use {@see Requests_Cookie::format_for_header} | |
* @return string | |
*/ | |
public function formatForHeader() | |
{ | |
} | |
/** | |
* Format a cookie for a Set-Cookie header | |
* | |
* This is used when sending cookies to clients. This isn't really | |
* applicable to client-side usage, but might be handy for debugging. | |
* | |
* @return string Cookie formatted for Set-Cookie header | |
*/ | |
public function format_for_set_cookie() | |
{ | |
} | |
/** | |
* Format a cookie for a Set-Cookie header | |
* | |
* @codeCoverageIgnore | |
* @deprecated Use {@see Requests_Cookie::format_for_set_cookie} | |
* @return string | |
*/ | |
public function formatForSetCookie() | |
{ | |
} | |
/** | |
* Get the cookie value | |
* | |
* Attributes and other data can be accessed via methods. | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Parse a cookie string into a cookie object | |
* | |
* Based on Mozilla's parsing code in Firefox and related projects, which | |
* is an intentional deviation from RFC 2109 and RFC 2616. RFC 6265 | |
* specifies some of this handling, but not in a thorough manner. | |
* | |
* @param string Cookie header value (from a Set-Cookie header) | |
* @return Requests_Cookie Parsed cookie object | |
*/ | |
public static function parse($string, $name = '', $reference_time = \null) | |
{ | |
} | |
/** | |
* Parse all Set-Cookie headers from request headers | |
* | |
* @param Requests_Response_Headers $headers Headers to parse from | |
* @param Requests_IRI|null $origin URI for comparing cookie origins | |
* @param int|null $time Reference time for expiration calculation | |
* @return array | |
*/ | |
public static function parse_from_headers(\Requests_Response_Headers $headers, \Requests_IRI $origin = \null, $time = \null) | |
{ | |
} | |
/** | |
* Parse all Set-Cookie headers from request headers | |
* | |
* @codeCoverageIgnore | |
* @deprecated Use {@see Requests_Cookie::parse_from_headers} | |
* @return string | |
*/ | |
public static function parseFromHeaders(\Requests_Response_Headers $headers) | |
{ | |
} | |
} | |
/** | |
* Cookie holder object | |
* | |
* @package Requests | |
* @subpackage Cookies | |
*/ | |
/** | |
* Cookie holder object | |
* | |
* @package Requests | |
* @subpackage Cookies | |
*/ | |
class Requests_Cookie_Jar implements \ArrayAccess, \IteratorAggregate | |
{ | |
/** | |
* Actual item data | |
* | |
* @var array | |
*/ | |
protected $cookies = array(); | |
/** | |
* Create a new jar | |
* | |
* @param array $cookies Existing cookie values | |
*/ | |
public function __construct($cookies = array()) | |
{ | |
} | |
/** | |
* Normalise cookie data into a Requests_Cookie | |
* | |
* @param string|Requests_Cookie $cookie | |
* @return Requests_Cookie | |
*/ | |
public function normalize_cookie($cookie, $key = \null) | |
{ | |
} | |
/** | |
* Normalise cookie data into a Requests_Cookie | |
* | |
* @codeCoverageIgnore | |
* @deprecated Use {@see Requests_Cookie_Jar::normalize_cookie} | |
* @return Requests_Cookie | |
*/ | |
public function normalizeCookie($cookie, $key = \null) | |
{ | |
} | |
/** | |
* Check if the given item exists | |
* | |
* @param string $key Item key | |
* @return boolean Does the item exist? | |
*/ | |
public function offsetExists($key) | |
{ | |
} | |
/** | |
* Get the value for the item | |
* | |
* @param string $key Item key | |
* @return string Item value | |
*/ | |
public function offsetGet($key) | |
{ | |
} | |
/** | |
* Set the given item | |
* | |
* @throws Requests_Exception On attempting to use dictionary as list (`invalidset`) | |
* | |
* @param string $key Item name | |
* @param string $value Item value | |
*/ | |
public function offsetSet($key, $value) | |
{ | |
} | |
/** | |
* Unset the given header | |
* | |
* @param string $key | |
*/ | |
public function offsetUnset($key) | |
{ | |
} | |
/** | |
* Get an iterator for the data | |
* | |
* @return ArrayIterator | |
*/ | |
public function getIterator() | |
{ | |
} | |
/** | |
* Register the cookie handler with the request's hooking system | |
* | |
* @param Requests_Hooker $hooks Hooking system | |
*/ | |
public function register(\Requests_Hooker $hooks) | |
{ | |
} | |
/** | |
* Add Cookie header to a request if we have any | |
* | |
* As per RFC 6265, cookies are separated by '; ' | |
* | |
* @param string $url | |
* @param array $headers | |
* @param array $data | |
* @param string $type | |
* @param array $options | |
*/ | |
public function before_request($url, &$headers, &$data, &$type, &$options) | |
{ | |
} | |
/** | |
* Parse all cookies from a response and attach them to the response | |
* | |
* @var Requests_Response $response | |
*/ | |
public function before_redirect_check(\Requests_Response &$return) | |
{ | |
} | |
} | |
/** | |
* Exception for HTTP requests | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for HTTP requests | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception extends \Exception | |
{ | |
/** | |
* Type of exception | |
* | |
* @var string | |
*/ | |
protected $type; | |
/** | |
* Data associated with the exception | |
* | |
* @var mixed | |
*/ | |
protected $data; | |
/** | |
* Create a new exception | |
* | |
* @param string $message Exception message | |
* @param string $type Exception type | |
* @param mixed $data Associated data | |
* @param integer $code Exception numerical code, if applicable | |
*/ | |
public function __construct($message, $type, $data = \null, $code = 0) | |
{ | |
} | |
/** | |
* Like {@see getCode()}, but a string code. | |
* | |
* @codeCoverageIgnore | |
* @return string | |
*/ | |
public function getType() | |
{ | |
} | |
/** | |
* Gives any relevant data | |
* | |
* @codeCoverageIgnore | |
* @return mixed | |
*/ | |
public function getData() | |
{ | |
} | |
} | |
/** | |
* Exception based on HTTP response | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception based on HTTP response | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP extends \Requests_Exception | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 0; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Unknown'; | |
/** | |
* Create a new exception | |
* | |
* There is no mechanism to pass in the status code, as this is set by the | |
* subclass used. Reason phrases can vary, however. | |
* | |
* @param string|null $reason Reason phrase | |
* @param mixed $data Associated data | |
*/ | |
public function __construct($reason = \null, $data = \null) | |
{ | |
} | |
/** | |
* Get the status message | |
*/ | |
public function getReason() | |
{ | |
} | |
/** | |
* Get the correct exception class for a given error code | |
* | |
* @param int|bool $code HTTP status code, or false if unavailable | |
* @return string Exception class name to use | |
*/ | |
public static function get_class($code) | |
{ | |
} | |
} | |
/** | |
* Exception for 304 Not Modified responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 304 Not Modified responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_304 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 304; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Not Modified'; | |
} | |
/** | |
* Exception for 305 Use Proxy responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 305 Use Proxy responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_305 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 305; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Use Proxy'; | |
} | |
/** | |
* Exception for 306 Switch Proxy responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 306 Switch Proxy responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_306 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 306; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Switch Proxy'; | |
} | |
/** | |
* Exception for 400 Bad Request responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 400 Bad Request responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_400 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 400; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Bad Request'; | |
} | |
/** | |
* Exception for 401 Unauthorized responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 401 Unauthorized responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_401 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 401; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Unauthorized'; | |
} | |
/** | |
* Exception for 402 Payment Required responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 402 Payment Required responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_402 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 402; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Payment Required'; | |
} | |
/** | |
* Exception for 403 Forbidden responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 403 Forbidden responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_403 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 403; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Forbidden'; | |
} | |
/** | |
* Exception for 404 Not Found responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 404 Not Found responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_404 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 404; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Not Found'; | |
} | |
/** | |
* Exception for 405 Method Not Allowed responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 405 Method Not Allowed responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_405 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 405; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Method Not Allowed'; | |
} | |
/** | |
* Exception for 406 Not Acceptable responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 406 Not Acceptable responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_406 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 406; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Not Acceptable'; | |
} | |
/** | |
* Exception for 407 Proxy Authentication Required responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 407 Proxy Authentication Required responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_407 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 407; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Proxy Authentication Required'; | |
} | |
/** | |
* Exception for 408 Request Timeout responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 408 Request Timeout responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_408 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 408; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Request Timeout'; | |
} | |
/** | |
* Exception for 409 Conflict responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 409 Conflict responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_409 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 409; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Conflict'; | |
} | |
/** | |
* Exception for 410 Gone responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 410 Gone responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_410 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 410; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Gone'; | |
} | |
/** | |
* Exception for 411 Length Required responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 411 Length Required responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_411 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 411; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Length Required'; | |
} | |
/** | |
* Exception for 412 Precondition Failed responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 412 Precondition Failed responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_412 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 412; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Precondition Failed'; | |
} | |
/** | |
* Exception for 413 Request Entity Too Large responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 413 Request Entity Too Large responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_413 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 413; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Request Entity Too Large'; | |
} | |
/** | |
* Exception for 414 Request-URI Too Large responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 414 Request-URI Too Large responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_414 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 414; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Request-URI Too Large'; | |
} | |
/** | |
* Exception for 415 Unsupported Media Type responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 415 Unsupported Media Type responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_415 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 415; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Unsupported Media Type'; | |
} | |
/** | |
* Exception for 416 Requested Range Not Satisfiable responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 416 Requested Range Not Satisfiable responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_416 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 416; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Requested Range Not Satisfiable'; | |
} | |
/** | |
* Exception for 417 Expectation Failed responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 417 Expectation Failed responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_417 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 417; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Expectation Failed'; | |
} | |
/** | |
* Exception for 418 I'm A Teapot responses | |
* | |
* @see https://tools.ietf.org/html/rfc2324 | |
* @package Requests | |
*/ | |
/** | |
* Exception for 418 I'm A Teapot responses | |
* | |
* @see https://tools.ietf.org/html/rfc2324 | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_418 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 418; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = "I'm A Teapot"; | |
} | |
/** | |
* Exception for 428 Precondition Required responses | |
* | |
* @see https://tools.ietf.org/html/rfc6585 | |
* @package Requests | |
*/ | |
/** | |
* Exception for 428 Precondition Required responses | |
* | |
* @see https://tools.ietf.org/html/rfc6585 | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_428 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 428; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Precondition Required'; | |
} | |
/** | |
* Exception for 429 Too Many Requests responses | |
* | |
* @see https://tools.ietf.org/html/draft-nottingham-http-new-status-04 | |
* @package Requests | |
*/ | |
/** | |
* Exception for 429 Too Many Requests responses | |
* | |
* @see https://tools.ietf.org/html/draft-nottingham-http-new-status-04 | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_429 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 429; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Too Many Requests'; | |
} | |
/** | |
* Exception for 431 Request Header Fields Too Large responses | |
* | |
* @see https://tools.ietf.org/html/rfc6585 | |
* @package Requests | |
*/ | |
/** | |
* Exception for 431 Request Header Fields Too Large responses | |
* | |
* @see https://tools.ietf.org/html/rfc6585 | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_431 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 431; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Request Header Fields Too Large'; | |
} | |
/** | |
* Exception for 500 Internal Server Error responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 500 Internal Server Error responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_500 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 500; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Internal Server Error'; | |
} | |
/** | |
* Exception for 501 Not Implemented responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 501 Not Implemented responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_501 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 501; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Not Implemented'; | |
} | |
/** | |
* Exception for 502 Bad Gateway responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 502 Bad Gateway responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_502 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 502; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Bad Gateway'; | |
} | |
/** | |
* Exception for 503 Service Unavailable responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 503 Service Unavailable responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_503 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 503; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Service Unavailable'; | |
} | |
/** | |
* Exception for 504 Gateway Timeout responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 504 Gateway Timeout responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_504 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 504; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Gateway Timeout'; | |
} | |
/** | |
* Exception for 505 HTTP Version Not Supported responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for 505 HTTP Version Not Supported responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_505 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 505; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'HTTP Version Not Supported'; | |
} | |
/** | |
* Exception for 511 Network Authentication Required responses | |
* | |
* @see https://tools.ietf.org/html/rfc6585 | |
* @package Requests | |
*/ | |
/** | |
* Exception for 511 Network Authentication Required responses | |
* | |
* @see https://tools.ietf.org/html/rfc6585 | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_511 extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer | |
*/ | |
protected $code = 511; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Network Authentication Required'; | |
} | |
/** | |
* Exception for unknown status responses | |
* | |
* @package Requests | |
*/ | |
/** | |
* Exception for unknown status responses | |
* | |
* @package Requests | |
*/ | |
class Requests_Exception_HTTP_Unknown extends \Requests_Exception_HTTP | |
{ | |
/** | |
* HTTP status code | |
* | |
* @var integer|bool Code if available, false if an error occurred | |
*/ | |
protected $code = 0; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
protected $reason = 'Unknown'; | |
/** | |
* Create a new exception | |
* | |
* If `$data` is an instance of {@see Requests_Response}, uses the status | |
* code from it. Otherwise, sets as 0 | |
* | |
* @param string|null $reason Reason phrase | |
* @param mixed $data Associated data | |
*/ | |
public function __construct($reason = \null, $data = \null) | |
{ | |
} | |
} | |
class Requests_Exception_Transport extends \Requests_Exception | |
{ | |
} | |
class Requests_Exception_Transport_cURL extends \Requests_Exception_Transport | |
{ | |
const EASY = 'cURLEasy'; | |
const MULTI = 'cURLMulti'; | |
const SHARE = 'cURLShare'; | |
/** | |
* cURL error code | |
* | |
* @var integer | |
*/ | |
protected $code = -1; | |
/** | |
* Which type of cURL error | |
* | |
* EASY|MULTI|SHARE | |
* | |
* @var string | |
*/ | |
protected $type = 'Unknown'; | |
/** | |
* Clear text error message | |
* | |
* @var string | |
*/ | |
protected $reason = 'Unknown'; | |
public function __construct($message, $type, $data = \null, $code = 0) | |
{ | |
} | |
/** | |
* Get the error message | |
*/ | |
public function getReason() | |
{ | |
} | |
} | |
/** | |
* Event dispatcher | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
/** | |
* Event dispatcher | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
interface Requests_Hooker | |
{ | |
/** | |
* Register a callback for a hook | |
* | |
* @param string $hook Hook name | |
* @param callback $callback Function/method to call on event | |
* @param int $priority Priority number. <0 is executed earlier, >0 is executed later | |
*/ | |
public function register($hook, $callback, $priority = 0); | |
/** | |
* Dispatch a message | |
* | |
* @param string $hook Hook name | |
* @param array $parameters Parameters to pass to callbacks | |
* @return boolean Successfulness | |
*/ | |
public function dispatch($hook, $parameters = array()); | |
} | |
/** | |
* Handles adding and dispatching events | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
/** | |
* Handles adding and dispatching events | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
class Requests_Hooks implements \Requests_Hooker | |
{ | |
/** | |
* Registered callbacks for each hook | |
* | |
* @var array | |
*/ | |
protected $hooks = array(); | |
/** | |
* Constructor | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Register a callback for a hook | |
* | |
* @param string $hook Hook name | |
* @param callback $callback Function/method to call on event | |
* @param int $priority Priority number. <0 is executed earlier, >0 is executed later | |
*/ | |
public function register($hook, $callback, $priority = 0) | |
{ | |
} | |
/** | |
* Dispatch a message | |
* | |
* @param string $hook Hook name | |
* @param array $parameters Parameters to pass to callbacks | |
* @return boolean Successfulness | |
*/ | |
public function dispatch($hook, $parameters = array()) | |
{ | |
} | |
} | |
/** | |
* IDNA URL encoder | |
* | |
* Note: Not fully compliant, as nameprep does nothing yet. | |
* | |
* @package Requests | |
* @subpackage Utilities | |
* @see https://tools.ietf.org/html/rfc3490 IDNA specification | |
* @see https://tools.ietf.org/html/rfc3492 Punycode/Bootstrap specification | |
*/ | |
class Requests_IDNAEncoder | |
{ | |
/** | |
* ACE prefix used for IDNA | |
* | |
* @see https://tools.ietf.org/html/rfc3490#section-5 | |
* @var string | |
*/ | |
const ACE_PREFIX = 'xn--'; | |
/**#@+ | |
* Bootstrap constant for Punycode | |
* | |
* @see https://tools.ietf.org/html/rfc3492#section-5 | |
* @var int | |
*/ | |
const BOOTSTRAP_BASE = 36; | |
const BOOTSTRAP_TMIN = 1; | |
const BOOTSTRAP_TMAX = 26; | |
const BOOTSTRAP_SKEW = 38; | |
const BOOTSTRAP_DAMP = 700; | |
const BOOTSTRAP_INITIAL_BIAS = 72; | |
const BOOTSTRAP_INITIAL_N = 128; | |
/**#@-*/ | |
/** | |
* Encode a hostname using Punycode | |
* | |
* @param string $string Hostname | |
* @return string Punycode-encoded hostname | |
*/ | |
public static function encode($string) | |
{ | |
} | |
/** | |
* Convert a UTF-8 string to an ASCII string using Punycode | |
* | |
* @throws Requests_Exception Provided string longer than 64 ASCII characters (`idna.provided_too_long`) | |
* @throws Requests_Exception Prepared string longer than 64 ASCII characters (`idna.prepared_too_long`) | |
* @throws Requests_Exception Provided string already begins with xn-- (`idna.provided_is_prefixed`) | |
* @throws Requests_Exception Encoded string longer than 64 ASCII characters (`idna.encoded_too_long`) | |
* | |
* @param string $string ASCII or UTF-8 string (max length 64 characters) | |
* @return string ASCII string | |
*/ | |
public static function to_ascii($string) | |
{ | |
} | |
/** | |
* Check whether a given string contains only ASCII characters | |
* | |
* @internal (Testing found regex was the fastest implementation) | |
* | |
* @param string $string | |
* @return bool Is the string ASCII-only? | |
*/ | |
protected static function is_ascii($string) | |
{ | |
} | |
/** | |
* Prepare a string for use as an IDNA name | |
* | |
* @todo Implement this based on RFC 3491 and the newer 5891 | |
* @param string $string | |
* @return string Prepared string | |
*/ | |
protected static function nameprep($string) | |
{ | |
} | |
/** | |
* Convert a UTF-8 string to a UCS-4 codepoint array | |
* | |
* Based on Requests_IRI::replace_invalid_with_pct_encoding() | |
* | |
* @throws Requests_Exception Invalid UTF-8 codepoint (`idna.invalidcodepoint`) | |
* @param string $input | |
* @return array Unicode code points | |
*/ | |
protected static function utf8_to_codepoints($input) | |
{ | |
} | |
/** | |
* RFC3492-compliant encoder | |
* | |
* @internal Pseudo-code from Section 6.3 is commented with "#" next to relevant code | |
* @throws Requests_Exception On character outside of the domain (never happens with Punycode) (`idna.character_outside_domain`) | |
* | |
* @param string $input UTF-8 encoded string to encode | |
* @return string Punycode-encoded string | |
*/ | |
public static function punycode_encode($input) | |
{ | |
} | |
/** | |
* Convert a digit to its respective character | |
* | |
* @see https://tools.ietf.org/html/rfc3492#section-5 | |
* @throws Requests_Exception On invalid digit (`idna.invalid_digit`) | |
* | |
* @param int $digit Digit in the range 0-35 | |
* @return string Single character corresponding to digit | |
*/ | |
protected static function digit_to_char($digit) | |
{ | |
} | |
/** | |
* Adapt the bias | |
* | |
* @see https://tools.ietf.org/html/rfc3492#section-6.1 | |
* @param int $delta | |
* @param int $numpoints | |
* @param bool $firsttime | |
* @return int New bias | |
*/ | |
protected static function adapt($delta, $numpoints, $firsttime) | |
{ | |
} | |
} | |
/** | |
* Class to validate and to work with IPv6 addresses | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
/** | |
* Class to validate and to work with IPv6 addresses | |
* | |
* This was originally based on the PEAR class of the same name, but has been | |
* entirely rewritten. | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
class Requests_IPv6 | |
{ | |
/** | |
* Uncompresses an IPv6 address | |
* | |
* RFC 4291 allows you to compress consecutive zero pieces in an address to | |
* '::'. This method expects a valid IPv6 address and expands the '::' to | |
* the required number of zero pieces. | |
* | |
* Example: FF01::101 -> FF01:0:0:0:0:0:0:101 | |
* ::1 -> 0:0:0:0:0:0:0:1 | |
* | |
* @author Alexander Merz <alexander.merz@web.de> | |
* @author elfrink at introweb dot nl | |
* @author Josh Peck <jmp at joshpeck dot org> | |
* @copyright 2003-2005 The PHP Group | |
* @license http://www.opensource.org/licenses/bsd-license.php | |
* @param string $ip An IPv6 address | |
* @return string The uncompressed IPv6 address | |
*/ | |
public static function uncompress($ip) | |
{ | |
} | |
/** | |
* Compresses an IPv6 address | |
* | |
* RFC 4291 allows you to compress consecutive zero pieces in an address to | |
* '::'. This method expects a valid IPv6 address and compresses consecutive | |
* zero pieces to '::'. | |
* | |
* Example: FF01:0:0:0:0:0:0:101 -> FF01::101 | |
* 0:0:0:0:0:0:0:1 -> ::1 | |
* | |
* @see uncompress() | |
* @param string $ip An IPv6 address | |
* @return string The compressed IPv6 address | |
*/ | |
public static function compress($ip) | |
{ | |
} | |
/** | |
* Splits an IPv6 address into the IPv6 and IPv4 representation parts | |
* | |
* RFC 4291 allows you to represent the last two parts of an IPv6 address | |
* using the standard IPv4 representation | |
* | |
* Example: 0:0:0:0:0:0:13.1.68.3 | |
* 0:0:0:0:0:FFFF:129.144.52.38 | |
* | |
* @param string $ip An IPv6 address | |
* @return string[] [0] contains the IPv6 represented part, and [1] the IPv4 represented part | |
*/ | |
protected static function split_v6_v4($ip) | |
{ | |
} | |
/** | |
* Checks an IPv6 address | |
* | |
* Checks if the given IP is a valid IPv6 address | |
* | |
* @param string $ip An IPv6 address | |
* @return bool true if $ip is a valid IPv6 address | |
*/ | |
public static function check_ipv6($ip) | |
{ | |
} | |
} | |
/** | |
* IRI parser/serialiser/normaliser | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
/** | |
* IRI parser/serialiser/normaliser | |
* | |
* Copyright (c) 2007-2010, Geoffrey Sneddon and Steve Minutillo. | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, | |
* this list of conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, | |
* this list of conditions and the following disclaimer in the documentation | |
* and/or other materials provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors | |
* may be used to endorse or promote products derived from this software | |
* without specific prior written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE | |
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package Requests | |
* @subpackage Utilities | |
* @author Geoffrey Sneddon | |
* @author Steve Minutillo | |
* @copyright 2007-2009 Geoffrey Sneddon and Steve Minutillo | |
* @license http://www.opensource.org/licenses/bsd-license.php | |
* @link http://hg.gsnedders.com/iri/ | |
* | |
* @property string $iri IRI we're working with | |
* @property-read string $uri IRI in URI form, {@see to_uri} | |
* @property string $scheme Scheme part of the IRI | |
* @property string $authority Authority part, formatted for a URI (userinfo + host + port) | |
* @property string $iauthority Authority part of the IRI (userinfo + host + port) | |
* @property string $userinfo Userinfo part, formatted for a URI (after '://' and before '@') | |
* @property string $iuserinfo Userinfo part of the IRI (after '://' and before '@') | |
* @property string $host Host part, formatted for a URI | |
* @property string $ihost Host part of the IRI | |
* @property string $port Port part of the IRI (after ':') | |
* @property string $path Path part, formatted for a URI (after first '/') | |
* @property string $ipath Path part of the IRI (after first '/') | |
* @property string $query Query part, formatted for a URI (after '?') | |
* @property string $iquery Query part of the IRI (after '?') | |
* @property string $fragment Fragment, formatted for a URI (after '#') | |
* @property string $ifragment Fragment part of the IRI (after '#') | |
*/ | |
class Requests_IRI | |
{ | |
/** | |
* Scheme | |
* | |
* @var string | |
*/ | |
protected $scheme = \null; | |
/** | |
* User Information | |
* | |
* @var string | |
*/ | |
protected $iuserinfo = \null; | |
/** | |
* ihost | |
* | |
* @var string | |
*/ | |
protected $ihost = \null; | |
/** | |
* Port | |
* | |
* @var string | |
*/ | |
protected $port = \null; | |
/** | |
* ipath | |
* | |
* @var string | |
*/ | |
protected $ipath = ''; | |
/** | |
* iquery | |
* | |
* @var string | |
*/ | |
protected $iquery = \null; | |
/** | |
* ifragment | |
* | |
* @var string | |
*/ | |
protected $ifragment = \null; | |
/** | |
* Normalization database | |
* | |
* Each key is the scheme, each value is an array with each key as the IRI | |
* part and value as the default value for that part. | |
*/ | |
protected $normalization = array('acap' => array('port' => 674), 'dict' => array('port' => 2628), 'file' => array('ihost' => 'localhost'), 'http' => array('port' => 80), 'https' => array('port' => 443)); | |
/** | |
* Return the entire IRI when you try and read the object as a string | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Overload __set() to provide access via properties | |
* | |
* @param string $name Property name | |
* @param mixed $value Property value | |
*/ | |
public function __set($name, $value) | |
{ | |
} | |
/** | |
* Overload __get() to provide access via properties | |
* | |
* @param string $name Property name | |
* @return mixed | |
*/ | |
public function __get($name) | |
{ | |
} | |
/** | |
* Overload __isset() to provide access via properties | |
* | |
* @param string $name Property name | |
* @return bool | |
*/ | |
public function __isset($name) | |
{ | |
} | |
/** | |
* Overload __unset() to provide access via properties | |
* | |
* @param string $name Property name | |
*/ | |
public function __unset($name) | |
{ | |
} | |
/** | |
* Create a new IRI object, from a specified string | |
* | |
* @param string|null $iri | |
*/ | |
public function __construct($iri = \null) | |
{ | |
} | |
/** | |
* Create a new IRI object by resolving a relative IRI | |
* | |
* Returns false if $base is not absolute, otherwise an IRI. | |
* | |
* @param IRI|string $base (Absolute) Base IRI | |
* @param IRI|string $relative Relative IRI | |
* @return IRI|false | |
*/ | |
public static function absolutize($base, $relative) | |
{ | |
} | |
/** | |
* Parse an IRI into scheme/authority/path/query/fragment segments | |
* | |
* @param string $iri | |
* @return array | |
*/ | |
protected function parse_iri($iri) | |
{ | |
} | |
/** | |
* Remove dot segments from a path | |
* | |
* @param string $input | |
* @return string | |
*/ | |
protected function remove_dot_segments($input) | |
{ | |
} | |
/** | |
* Replace invalid character with percent encoding | |
* | |
* @param string $string Input string | |
* @param string $extra_chars Valid characters not in iunreserved or | |
* iprivate (this is ASCII-only) | |
* @param bool $iprivate Allow iprivate | |
* @return string | |
*/ | |
protected function replace_invalid_with_pct_encoding($string, $extra_chars, $iprivate = \false) | |
{ | |
} | |
/** | |
* Callback function for preg_replace_callback. | |
* | |
* Removes sequences of percent encoded bytes that represent UTF-8 | |
* encoded characters in iunreserved | |
* | |
* @param array $match PCRE match | |
* @return string Replacement | |
*/ | |
protected function remove_iunreserved_percent_encoded($match) | |
{ | |
} | |
protected function scheme_normalization() | |
{ | |
} | |
/** | |
* Check if the object represents a valid IRI. This needs to be done on each | |
* call as some things change depending on another part of the IRI. | |
* | |
* @return bool | |
*/ | |
public function is_valid() | |
{ | |
} | |
/** | |
* Set the entire IRI. Returns true on success, false on failure (if there | |
* are any invalid characters). | |
* | |
* @param string $iri | |
* @return bool | |
*/ | |
protected function set_iri($iri) | |
{ | |
} | |
/** | |
* Set the scheme. Returns true on success, false on failure (if there are | |
* any invalid characters). | |
* | |
* @param string $scheme | |
* @return bool | |
*/ | |
protected function set_scheme($scheme) | |
{ | |
} | |
/** | |
* Set the authority. Returns true on success, false on failure (if there are | |
* any invalid characters). | |
* | |
* @param string $authority | |
* @return bool | |
*/ | |
protected function set_authority($authority) | |
{ | |
} | |
/** | |
* Set the iuserinfo. | |
* | |
* @param string $iuserinfo | |
* @return bool | |
*/ | |
protected function set_userinfo($iuserinfo) | |
{ | |
} | |
/** | |
* Set the ihost. Returns true on success, false on failure (if there are | |
* any invalid characters). | |
* | |
* @param string $ihost | |
* @return bool | |
*/ | |
protected function set_host($ihost) | |
{ | |
} | |
/** | |
* Set the port. Returns true on success, false on failure (if there are | |
* any invalid characters). | |
* | |
* @param string $port | |
* @return bool | |
*/ | |
protected function set_port($port) | |
{ | |
} | |
/** | |
* Set the ipath. | |
* | |
* @param string $ipath | |
* @return bool | |
*/ | |
protected function set_path($ipath) | |
{ | |
} | |
/** | |
* Set the iquery. | |
* | |
* @param string $iquery | |
* @return bool | |
*/ | |
protected function set_query($iquery) | |
{ | |
} | |
/** | |
* Set the ifragment. | |
* | |
* @param string $ifragment | |
* @return bool | |
*/ | |
protected function set_fragment($ifragment) | |
{ | |
} | |
/** | |
* Convert an IRI to a URI (or parts thereof) | |
* | |
* @param string|bool IRI to convert (or false from {@see get_iri}) | |
* @return string|false URI if IRI is valid, false otherwise. | |
*/ | |
protected function to_uri($string) | |
{ | |
} | |
/** | |
* Get the complete IRI | |
* | |
* @return string | |
*/ | |
protected function get_iri() | |
{ | |
} | |
/** | |
* Get the complete URI | |
* | |
* @return string | |
*/ | |
protected function get_uri() | |
{ | |
} | |
/** | |
* Get the complete iauthority | |
* | |
* @return string | |
*/ | |
protected function get_iauthority() | |
{ | |
} | |
/** | |
* Get the complete authority | |
* | |
* @return string | |
*/ | |
protected function get_authority() | |
{ | |
} | |
} | |
/** | |
* Proxy connection interface | |
* | |
* @package Requests | |
* @subpackage Proxy | |
* @since 1.6 | |
*/ | |
/** | |
* Proxy connection interface | |
* | |
* Implement this interface to handle proxy settings and authentication | |
* | |
* Parameters should be passed via the constructor where possible, as this | |
* makes it much easier for users to use your provider. | |
* | |
* @see Requests_Hooks | |
* @package Requests | |
* @subpackage Proxy | |
* @since 1.6 | |
*/ | |
interface Requests_Proxy | |
{ | |
/** | |
* Register hooks as needed | |
* | |
* This method is called in {@see Requests::request} when the user has set | |
* an instance as the 'auth' option. Use this callback to register all the | |
* hooks you'll need. | |
* | |
* @see Requests_Hooks::register | |
* @param Requests_Hooks $hooks Hook system | |
*/ | |
public function register(\Requests_Hooks &$hooks); | |
} | |
/** | |
* HTTP Proxy connection interface | |
* | |
* @package Requests | |
* @subpackage Proxy | |
* @since 1.6 | |
*/ | |
/** | |
* HTTP Proxy connection interface | |
* | |
* Provides a handler for connection via an HTTP proxy | |
* | |
* @package Requests | |
* @subpackage Proxy | |
* @since 1.6 | |
*/ | |
class Requests_Proxy_HTTP implements \Requests_Proxy | |
{ | |
/** | |
* Proxy host and port | |
* | |
* Notation: "host:port" (eg 127.0.0.1:8080 or someproxy.com:3128) | |
* | |
* @var string | |
*/ | |
public $proxy; | |
/** | |
* Username | |
* | |
* @var string | |
*/ | |
public $user; | |
/** | |
* Password | |
* | |
* @var string | |
*/ | |
public $pass; | |
/** | |
* Do we need to authenticate? (ie username & password have been provided) | |
* | |
* @var boolean | |
*/ | |
public $use_authentication; | |
/** | |
* Constructor | |
* | |
* @since 1.6 | |
* @throws Requests_Exception On incorrect number of arguments (`authbasicbadargs`) | |
* @param array|null $args Array of user and password. Must have exactly two elements | |
*/ | |
public function __construct($args = \null) | |
{ | |
} | |
/** | |
* Register the necessary callbacks | |
* | |
* @since 1.6 | |
* @see curl_before_send | |
* @see fsockopen_remote_socket | |
* @see fsockopen_remote_host_path | |
* @see fsockopen_header | |
* @param Requests_Hooks $hooks Hook system | |
*/ | |
public function register(\Requests_Hooks &$hooks) | |
{ | |
} | |
/** | |
* Set cURL parameters before the data is sent | |
* | |
* @since 1.6 | |
* @param resource $handle cURL resource | |
*/ | |
public function curl_before_send(&$handle) | |
{ | |
} | |
/** | |
* Alter remote socket information before opening socket connection | |
* | |
* @since 1.6 | |
* @param string $remote_socket Socket connection string | |
*/ | |
public function fsockopen_remote_socket(&$remote_socket) | |
{ | |
} | |
/** | |
* Alter remote path before getting stream data | |
* | |
* @since 1.6 | |
* @param string $path Path to send in HTTP request string ("GET ...") | |
* @param string $url Full URL we're requesting | |
*/ | |
public function fsockopen_remote_host_path(&$path, $url) | |
{ | |
} | |
/** | |
* Add extra headers to the request before sending | |
* | |
* @since 1.6 | |
* @param string $out HTTP header string | |
*/ | |
public function fsockopen_header(&$out) | |
{ | |
} | |
/** | |
* Get the authentication string (user:pass) | |
* | |
* @since 1.6 | |
* @return string | |
*/ | |
public function get_auth_string() | |
{ | |
} | |
} | |
/** | |
* HTTP response class | |
* | |
* Contains a response from Requests::request() | |
* @package Requests | |
*/ | |
/** | |
* HTTP response class | |
* | |
* Contains a response from Requests::request() | |
* @package Requests | |
*/ | |
class Requests_Response | |
{ | |
/** | |
* Constructor | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Response body | |
* | |
* @var string | |
*/ | |
public $body = ''; | |
/** | |
* Raw HTTP data from the transport | |
* | |
* @var string | |
*/ | |
public $raw = ''; | |
/** | |
* Headers, as an associative array | |
* | |
* @var Requests_Response_Headers Array-like object representing headers | |
*/ | |
public $headers = array(); | |
/** | |
* Status code, false if non-blocking | |
* | |
* @var integer|boolean | |
*/ | |
public $status_code = \false; | |
/** | |
* Protocol version, false if non-blocking | |
* @var float|boolean | |
*/ | |
public $protocol_version = \false; | |
/** | |
* Whether the request succeeded or not | |
* | |
* @var boolean | |
*/ | |
public $success = \false; | |
/** | |
* Number of redirects the request used | |
* | |
* @var integer | |
*/ | |
public $redirects = 0; | |
/** | |
* URL requested | |
* | |
* @var string | |
*/ | |
public $url = ''; | |
/** | |
* Previous requests (from redirects) | |
* | |
* @var array Array of Requests_Response objects | |
*/ | |
public $history = array(); | |
/** | |
* Cookies from the request | |
* | |
* @var Requests_Cookie_Jar Array-like object representing a cookie jar | |
*/ | |
public $cookies = array(); | |
/** | |
* Is the response a redirect? | |
* | |
* @return boolean True if redirect (3xx status), false if not. | |
*/ | |
public function is_redirect() | |
{ | |
} | |
/** | |
* Throws an exception if the request was not successful | |
* | |
* @throws Requests_Exception If `$allow_redirects` is false, and code is 3xx (`response.no_redirects`) | |
* @throws Requests_Exception_HTTP On non-successful status code. Exception class corresponds to code (e.g. {@see Requests_Exception_HTTP_404}) | |
* @param boolean $allow_redirects Set to false to throw on a 3xx as well | |
*/ | |
public function throw_for_status($allow_redirects = \true) | |
{ | |
} | |
} | |
/** | |
* Case-insensitive dictionary, suitable for HTTP headers | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
/** | |
* Case-insensitive dictionary, suitable for HTTP headers | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
class Requests_Utility_CaseInsensitiveDictionary implements \ArrayAccess, \IteratorAggregate | |
{ | |
/** | |
* Actual item data | |
* | |
* @var array | |
*/ | |
protected $data = array(); | |
/** | |
* Creates a case insensitive dictionary. | |
* | |
* @param array $data Dictionary/map to convert to case-insensitive | |
*/ | |
public function __construct(array $data = array()) | |
{ | |
} | |
/** | |
* Check if the given item exists | |
* | |
* @param string $key Item key | |
* @return boolean Does the item exist? | |
*/ | |
public function offsetExists($key) | |
{ | |
} | |
/** | |
* Get the value for the item | |
* | |
* @param string $key Item key | |
* @return string Item value | |
*/ | |
public function offsetGet($key) | |
{ | |
} | |
/** | |
* Set the given item | |
* | |
* @throws Requests_Exception On attempting to use dictionary as list (`invalidset`) | |
* | |
* @param string $key Item name | |
* @param string $value Item value | |
*/ | |
public function offsetSet($key, $value) | |
{ | |
} | |
/** | |
* Unset the given header | |
* | |
* @param string $key | |
*/ | |
public function offsetUnset($key) | |
{ | |
} | |
/** | |
* Get an iterator for the data | |
* | |
* @return ArrayIterator | |
*/ | |
public function getIterator() | |
{ | |
} | |
/** | |
* Get the headers as an array | |
* | |
* @return array Header data | |
*/ | |
public function getAll() | |
{ | |
} | |
} | |
/** | |
* Case-insensitive dictionary, suitable for HTTP headers | |
* | |
* @package Requests | |
*/ | |
/** | |
* Case-insensitive dictionary, suitable for HTTP headers | |
* | |
* @package Requests | |
*/ | |
class Requests_Response_Headers extends \Requests_Utility_CaseInsensitiveDictionary | |
{ | |
/** | |
* Get the given header | |
* | |
* Unlike {@see self::getValues()}, this returns a string. If there are | |
* multiple values, it concatenates them with a comma as per RFC2616. | |
* | |
* Avoid using this where commas may be used unquoted in values, such as | |
* Set-Cookie headers. | |
* | |
* @param string $key | |
* @return string Header value | |
*/ | |
public function offsetGet($key) | |
{ | |
} | |
/** | |
* Set the given item | |
* | |
* @throws Requests_Exception On attempting to use dictionary as list (`invalidset`) | |
* | |
* @param string $key Item name | |
* @param string $value Item value | |
*/ | |
public function offsetSet($key, $value) | |
{ | |
} | |
/** | |
* Get all values for a given header | |
* | |
* @param string $key | |
* @return array Header values | |
*/ | |
public function getValues($key) | |
{ | |
} | |
/** | |
* Flattens a value into a string | |
* | |
* Converts an array into a string by imploding values with a comma, as per | |
* RFC2616's rules for folding headers. | |
* | |
* @param string|array $value Value to flatten | |
* @return string Flattened value | |
*/ | |
public function flatten($value) | |
{ | |
} | |
/** | |
* Get an iterator for the data | |
* | |
* Converts the internal | |
* @return ArrayIterator | |
*/ | |
public function getIterator() | |
{ | |
} | |
} | |
/** | |
* SSL utilities for Requests | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
/** | |
* SSL utilities for Requests | |
* | |
* Collection of utilities for working with and verifying SSL certificates. | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
class Requests_SSL | |
{ | |
/** | |
* Verify the certificate against common name and subject alternative names | |
* | |
* Unfortunately, PHP doesn't check the certificate against the alternative | |
* names, leading things like 'https://www.github.com/' to be invalid. | |
* Instead | |
* | |
* @see https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1 | |
* | |
* @throws Requests_Exception On not obtaining a match for the host (`fsockopen.ssl.no_match`) | |
* @param string $host Host name to verify against | |
* @param array $cert Certificate data from openssl_x509_parse() | |
* @return bool | |
*/ | |
public static function verify_certificate($host, $cert) | |
{ | |
} | |
/** | |
* Verify that a reference name is valid | |
* | |
* Verifies a dNSName for HTTPS usage, (almost) as per Firefox's rules: | |
* - Wildcards can only occur in a name with more than 3 components | |
* - Wildcards can only occur as the last character in the first | |
* component | |
* - Wildcards may be preceded by additional characters | |
* | |
* We modify these rules to be a bit stricter and only allow the wildcard | |
* character to be the full first component; that is, with the exclusion of | |
* the third rule. | |
* | |
* @param string $reference Reference dNSName | |
* @return boolean Is the name valid? | |
*/ | |
public static function verify_reference_name($reference) | |
{ | |
} | |
/** | |
* Match a hostname against a dNSName reference | |
* | |
* @param string $host Requested host | |
* @param string $reference dNSName to match against | |
* @return boolean Does the domain match? | |
*/ | |
public static function match_domain($host, $reference) | |
{ | |
} | |
} | |
/** | |
* Session handler for persistent requests and default parameters | |
* | |
* @package Requests | |
* @subpackage Session Handler | |
*/ | |
/** | |
* Session handler for persistent requests and default parameters | |
* | |
* Allows various options to be set as default values, and merges both the | |
* options and URL properties together. A base URL can be set for all requests, | |
* with all subrequests resolved from this. Base options can be set (including | |
* a shared cookie jar), then overridden for individual requests. | |
* | |
* @package Requests | |
* @subpackage Session Handler | |
*/ | |
class Requests_Session | |
{ | |
/** | |
* Base URL for requests | |
* | |
* URLs will be made absolute using this as the base | |
* @var string|null | |
*/ | |
public $url = \null; | |
/** | |
* Base headers for requests | |
* @var array | |
*/ | |
public $headers = array(); | |
/** | |
* Base data for requests | |
* | |
* If both the base data and the per-request data are arrays, the data will | |
* be merged before sending the request. | |
* | |
* @var array | |
*/ | |
public $data = array(); | |
/** | |
* Base options for requests | |
* | |
* The base options are merged with the per-request data for each request. | |
* The only default option is a shared cookie jar between requests. | |
* | |
* Values here can also be set directly via properties on the Session | |
* object, e.g. `$session->useragent = 'X';` | |
* | |
* @var array | |
*/ | |
public $options = array(); | |
/** | |
* Create a new session | |
* | |
* @param string|null $url Base URL for requests | |
* @param array $headers Default headers for requests | |
* @param array $data Default data for requests | |
* @param array $options Default options for requests | |
*/ | |
public function __construct($url = \null, $headers = array(), $data = array(), $options = array()) | |
{ | |
} | |
/** | |
* Get a property's value | |
* | |
* @param string $key Property key | |
* @return mixed|null Property value, null if none found | |
*/ | |
public function __get($key) | |
{ | |
} | |
/** | |
* Set a property's value | |
* | |
* @param string $key Property key | |
* @param mixed $value Property value | |
*/ | |
public function __set($key, $value) | |
{ | |
} | |
/** | |
* Remove a property's value | |
* | |
* @param string $key Property key | |
*/ | |
public function __isset($key) | |
{ | |
} | |
/** | |
* Remove a property's value | |
* | |
* @param string $key Property key | |
*/ | |
public function __unset($key) | |
{ | |
} | |
/**#@+ | |
* @see request() | |
* @param string $url | |
* @param array $headers | |
* @param array $options | |
* @return Requests_Response | |
*/ | |
/** | |
* Send a GET request | |
*/ | |
public function get($url, $headers = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send a HEAD request | |
*/ | |
public function head($url, $headers = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send a DELETE request | |
*/ | |
public function delete($url, $headers = array(), $options = array()) | |
{ | |
} | |
/**#@-*/ | |
/**#@+ | |
* @see request() | |
* @param string $url | |
* @param array $headers | |
* @param array $data | |
* @param array $options | |
* @return Requests_Response | |
*/ | |
/** | |
* Send a POST request | |
*/ | |
public function post($url, $headers = array(), $data = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send a PUT request | |
*/ | |
public function put($url, $headers = array(), $data = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send a PATCH request | |
* | |
* Note: Unlike {@see post} and {@see put}, `$headers` is required, as the | |
* specification recommends that should send an ETag | |
* | |
* @link https://tools.ietf.org/html/rfc5789 | |
*/ | |
public function patch($url, $headers, $data = array(), $options = array()) | |
{ | |
} | |
/**#@-*/ | |
/** | |
* Main interface for HTTP requests | |
* | |
* This method initiates a request and sends it via a transport before | |
* parsing. | |
* | |
* @see Requests::request() | |
* | |
* @throws Requests_Exception On invalid URLs (`nonhttp`) | |
* | |
* @param string $url URL to request | |
* @param array $headers Extra headers to send with the request | |
* @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests | |
* @param string $type HTTP request type (use Requests constants) | |
* @param array $options Options for the request (see {@see Requests::request}) | |
* @return Requests_Response | |
*/ | |
public function request($url, $headers = array(), $data = array(), $type = \Requests::GET, $options = array()) | |
{ | |
} | |
/** | |
* Send multiple HTTP requests simultaneously | |
* | |
* @see Requests::request_multiple() | |
* | |
* @param array $requests Requests data (see {@see Requests::request_multiple}) | |
* @param array $options Global and default options (see {@see Requests::request}) | |
* @return array Responses (either Requests_Response or a Requests_Exception object) | |
*/ | |
public function request_multiple($requests, $options = array()) | |
{ | |
} | |
/** | |
* Merge a request's data with the default data | |
* | |
* @param array $request Request data (same form as {@see request_multiple}) | |
* @param boolean $merge_options Should we merge options as well? | |
* @return array Request data | |
*/ | |
protected function merge_request($request, $merge_options = \true) | |
{ | |
} | |
} | |
/** | |
* Base HTTP transport | |
* | |
* @package Requests | |
* @subpackage Transport | |
*/ | |
/** | |
* Base HTTP transport | |
* | |
* @package Requests | |
* @subpackage Transport | |
*/ | |
interface Requests_Transport | |
{ | |
/** | |
* Perform a request | |
* | |
* @param string $url URL to request | |
* @param array $headers Associative array of request headers | |
* @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD | |
* @param array $options Request options, see {@see Requests::response()} for documentation | |
* @return string Raw HTTP result | |
*/ | |
public function request($url, $headers = array(), $data = array(), $options = array()); | |
/** | |
* Send multiple requests simultaneously | |
* | |
* @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see Requests_Transport::request} | |
* @param array $options Global options, see {@see Requests::response()} for documentation | |
* @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well) | |
*/ | |
public function request_multiple($requests, $options); | |
/** | |
* Self-test whether the transport can be used | |
* @return bool | |
*/ | |
public static function test(); | |
} | |
/** | |
* cURL HTTP transport | |
* | |
* @package Requests | |
* @subpackage Transport | |
*/ | |
/** | |
* cURL HTTP transport | |
* | |
* @package Requests | |
* @subpackage Transport | |
*/ | |
class Requests_Transport_cURL implements \Requests_Transport | |
{ | |
const CURL_7_10_5 = 0x70a05; | |
const CURL_7_16_2 = 0x71002; | |
/** | |
* Raw HTTP data | |
* | |
* @var string | |
*/ | |
public $headers = ''; | |
/** | |
* Raw body data | |
* | |
* @var string | |
*/ | |
public $response_data = ''; | |
/** | |
* Information on the current request | |
* | |
* @var array cURL information array, see {@see https://secure.php.net/curl_getinfo} | |
*/ | |
public $info; | |
/** | |
* Version string | |
* | |
* @var long | |
*/ | |
public $version; | |
/** | |
* cURL handle | |
* | |
* @var resource | |
*/ | |
protected $handle; | |
/** | |
* Hook dispatcher instance | |
* | |
* @var Requests_Hooks | |
*/ | |
protected $hooks; | |
/** | |
* Have we finished the headers yet? | |
* | |
* @var boolean | |
*/ | |
protected $done_headers = \false; | |
/** | |
* If streaming to a file, keep the file pointer | |
* | |
* @var resource | |
*/ | |
protected $stream_handle; | |
/** | |
* How many bytes are in the response body? | |
* | |
* @var int | |
*/ | |
protected $response_bytes; | |
/** | |
* What's the maximum number of bytes we should keep? | |
* | |
* @var int|bool Byte count, or false if no limit. | |
*/ | |
protected $response_byte_limit; | |
/** | |
* Constructor | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Destructor | |
*/ | |
public function __destruct() | |
{ | |
} | |
/** | |
* Perform a request | |
* | |
* @throws Requests_Exception On a cURL error (`curlerror`) | |
* | |
* @param string $url URL to request | |
* @param array $headers Associative array of request headers | |
* @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD | |
* @param array $options Request options, see {@see Requests::response()} for documentation | |
* @return string Raw HTTP result | |
*/ | |
public function request($url, $headers = array(), $data = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send multiple requests simultaneously | |
* | |
* @param array $requests Request data | |
* @param array $options Global options | |
* @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well) | |
*/ | |
public function request_multiple($requests, $options) | |
{ | |
} | |
/** | |
* Get the cURL handle for use in a multi-request | |
* | |
* @param string $url URL to request | |
* @param array $headers Associative array of request headers | |
* @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD | |
* @param array $options Request options, see {@see Requests::response()} for documentation | |
* @return resource Subrequest's cURL handle | |
*/ | |
public function &get_subrequest_handle($url, $headers, $data, $options) | |
{ | |
} | |
/** | |
* Setup the cURL handle for the given data | |
* | |
* @param string $url URL to request | |
* @param array $headers Associative array of request headers | |
* @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD | |
* @param array $options Request options, see {@see Requests::response()} for documentation | |
*/ | |
protected function setup_handle($url, $headers, $data, $options) | |
{ | |
} | |
/** | |
* Process a response | |
* | |
* @param string $response Response data from the body | |
* @param array $options Request options | |
* @return string HTTP response data including headers | |
*/ | |
public function process_response($response, $options) | |
{ | |
} | |
/** | |
* Collect the headers as they are received | |
* | |
* @param resource $handle cURL resource | |
* @param string $headers Header string | |
* @return integer Length of provided header | |
*/ | |
public function stream_headers($handle, $headers) | |
{ | |
} | |
/** | |
* Collect data as it's received | |
* | |
* @since 1.6.1 | |
* | |
* @param resource $handle cURL resource | |
* @param string $data Body data | |
* @return integer Length of provided data | |
*/ | |
public function stream_body($handle, $data) | |
{ | |
} | |
/** | |
* Format a URL given GET data | |
* | |
* @param string $url | |
* @param array|object $data Data to build query using, see {@see https://secure.php.net/http_build_query} | |
* @return string URL with data | |
*/ | |
protected static function format_get($url, $data) | |
{ | |
} | |
/** | |
* Whether this transport is valid | |
* | |
* @codeCoverageIgnore | |
* @return boolean True if the transport is valid, false otherwise. | |
*/ | |
public static function test($capabilities = array()) | |
{ | |
} | |
} | |
/** | |
* fsockopen HTTP transport | |
* | |
* @package Requests | |
* @subpackage Transport | |
*/ | |
/** | |
* fsockopen HTTP transport | |
* | |
* @package Requests | |
* @subpackage Transport | |
*/ | |
class Requests_Transport_fsockopen implements \Requests_Transport | |
{ | |
/** | |
* Second to microsecond conversion | |
* | |
* @var integer | |
*/ | |
const SECOND_IN_MICROSECONDS = 1000000; | |
/** | |
* Raw HTTP data | |
* | |
* @var string | |
*/ | |
public $headers = ''; | |
/** | |
* Stream metadata | |
* | |
* @var array Associative array of properties, see {@see https://secure.php.net/stream_get_meta_data} | |
*/ | |
public $info; | |
/** | |
* What's the maximum number of bytes we should keep? | |
* | |
* @var int|bool Byte count, or false if no limit. | |
*/ | |
protected $max_bytes = \false; | |
protected $connect_error = ''; | |
/** | |
* Perform a request | |
* | |
* @throws Requests_Exception On failure to connect to socket (`fsockopenerror`) | |
* @throws Requests_Exception On socket timeout (`timeout`) | |
* | |
* @param string $url URL to request | |
* @param array $headers Associative array of request headers | |
* @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD | |
* @param array $options Request options, see {@see Requests::response()} for documentation | |
* @return string Raw HTTP result | |
*/ | |
public function request($url, $headers = array(), $data = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send multiple requests simultaneously | |
* | |
* @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see Requests_Transport::request} | |
* @param array $options Global options, see {@see Requests::response()} for documentation | |
* @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well) | |
*/ | |
public function request_multiple($requests, $options) | |
{ | |
} | |
/** | |
* Retrieve the encodings we can accept | |
* | |
* @return string Accept-Encoding header value | |
*/ | |
protected static function accept_encoding() | |
{ | |
} | |
/** | |
* Format a URL given GET data | |
* | |
* @param array $url_parts | |
* @param array|object $data Data to build query using, see {@see https://secure.php.net/http_build_query} | |
* @return string URL with data | |
*/ | |
protected static function format_get($url_parts, $data) | |
{ | |
} | |
/** | |
* Error handler for stream_socket_client() | |
* | |
* @param int $errno Error number (e.g. E_WARNING) | |
* @param string $errstr Error message | |
*/ | |
public function connect_error_handler($errno, $errstr) | |
{ | |
} | |
/** | |
* Verify the certificate against common name and subject alternative names | |
* | |
* Unfortunately, PHP doesn't check the certificate against the alternative | |
* names, leading things like 'https://www.github.com/' to be invalid. | |
* Instead | |
* | |
* @see https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1 | |
* | |
* @throws Requests_Exception On failure to connect via TLS (`fsockopen.ssl.connect_error`) | |
* @throws Requests_Exception On not obtaining a match for the host (`fsockopen.ssl.no_match`) | |
* @param string $host Host name to verify against | |
* @param resource $context Stream context | |
* @return bool | |
*/ | |
public function verify_certificate_from_context($host, $context) | |
{ | |
} | |
/** | |
* Whether this transport is valid | |
* | |
* @codeCoverageIgnore | |
* @return boolean True if the transport is valid, false otherwise. | |
*/ | |
public static function test($capabilities = array()) | |
{ | |
} | |
} | |
/** | |
* Iterator for arrays requiring filtered values | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
/** | |
* Iterator for arrays requiring filtered values | |
* | |
* @package Requests | |
* @subpackage Utilities | |
*/ | |
class Requests_Utility_FilteredIterator extends \ArrayIterator | |
{ | |
/** | |
* Callback to run as a filter | |
* | |
* @var callable | |
*/ | |
protected $callback; | |
/** | |
* Create a new iterator | |
* | |
* @param array $data | |
* @param callable $callback Callback to be called on each value | |
*/ | |
public function __construct($data, $callback) | |
{ | |
} | |
/** | |
* Get the current item's value after filtering | |
* | |
* @return string | |
*/ | |
public function current() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Manages all author-related data | |
* | |
* Used by {@see SimplePie_Item::get_author()} and {@see SimplePie::get_authors()} | |
* | |
* This class can be overloaded with {@see SimplePie::set_author_class()} | |
* | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie_Author | |
{ | |
/** | |
* Author's name | |
* | |
* @var string | |
* @see get_name() | |
*/ | |
var $name; | |
/** | |
* Author's link | |
* | |
* @var string | |
* @see get_link() | |
*/ | |
var $link; | |
/** | |
* Author's email address | |
* | |
* @var string | |
* @see get_email() | |
*/ | |
var $email; | |
/** | |
* Constructor, used to input the data | |
* | |
* @param string $name | |
* @param string $link | |
* @param string $email | |
*/ | |
public function __construct($name = \null, $link = \null, $email = \null) | |
{ | |
} | |
/** | |
* String-ified version | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Author's name | |
* | |
* @return string|null | |
*/ | |
public function get_name() | |
{ | |
} | |
/** | |
* Author's link | |
* | |
* @return string|null | |
*/ | |
public function get_link() | |
{ | |
} | |
/** | |
* Author's email address | |
* | |
* @return string|null | |
*/ | |
public function get_email() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Used to create cache objects | |
* | |
* This class can be overloaded with {@see SimplePie::set_cache_class()}, | |
* although the preferred way is to create your own handler | |
* via {@see register()} | |
* | |
* @package SimplePie | |
* @subpackage Caching | |
*/ | |
class SimplePie_Cache | |
{ | |
/** | |
* Cache handler classes | |
* | |
* These receive 3 parameters to their constructor, as documented in | |
* {@see register()} | |
* @var array | |
*/ | |
protected static $handlers = array('mysql' => 'SimplePie_Cache_MySQL', 'memcache' => 'SimplePie_Cache_Memcache'); | |
/** | |
* Don't call the constructor. Please. | |
*/ | |
private function __construct() | |
{ | |
} | |
/** | |
* Create a new SimplePie_Cache object | |
* | |
* @param string $location URL location (scheme is used to determine handler) | |
* @param string $filename Unique identifier for cache object | |
* @param string $extension 'spi' or 'spc' | |
* @return SimplePie_Cache_Base Type of object depends on scheme of `$location` | |
*/ | |
public static function get_handler($location, $filename, $extension) | |
{ | |
} | |
/** | |
* Create a new SimplePie_Cache object | |
* | |
* @deprecated Use {@see get_handler} instead | |
*/ | |
public function create($location, $filename, $extension) | |
{ | |
} | |
/** | |
* Register a handler | |
* | |
* @param string $type DSN type to register for | |
* @param string $class Name of handler class. Must implement SimplePie_Cache_Base | |
*/ | |
public static function register($type, $class) | |
{ | |
} | |
/** | |
* Parse a URL into an array | |
* | |
* @param string $url | |
* @return array | |
*/ | |
public static function parse_URL($url) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Base for cache objects | |
* | |
* Classes to be used with {@see SimplePie_Cache::register()} are expected | |
* to implement this interface. | |
* | |
* @package SimplePie | |
* @subpackage Caching | |
*/ | |
interface SimplePie_Cache_Base | |
{ | |
/** | |
* Feed cache type | |
* | |
* @var string | |
*/ | |
const TYPE_FEED = 'spc'; | |
/** | |
* Image cache type | |
* | |
* @var string | |
*/ | |
const TYPE_IMAGE = 'spi'; | |
/** | |
* Create a new cache object | |
* | |
* @param string $location Location string (from SimplePie::$cache_location) | |
* @param string $name Unique ID for the cache | |
* @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data | |
*/ | |
public function __construct($location, $name, $type); | |
/** | |
* Save data to the cache | |
* | |
* @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property | |
* @return bool Successfulness | |
*/ | |
public function save($data); | |
/** | |
* Retrieve the data saved to the cache | |
* | |
* @return array Data for SimplePie::$data | |
*/ | |
public function load(); | |
/** | |
* Retrieve the last modified time for the cache | |
* | |
* @return int Timestamp | |
*/ | |
public function mtime(); | |
/** | |
* Set the last modified time to the current time | |
* | |
* @return bool Success status | |
*/ | |
public function touch(); | |
/** | |
* Remove the cache | |
* | |
* @return bool Success status | |
*/ | |
public function unlink(); | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Base class for database-based caches | |
* | |
* @package SimplePie | |
* @subpackage Caching | |
*/ | |
abstract class SimplePie_Cache_DB implements \SimplePie_Cache_Base | |
{ | |
/** | |
* Helper for database conversion | |
* | |
* Converts a given {@see SimplePie} object into data to be stored | |
* | |
* @param SimplePie $data | |
* @return array First item is the serialized data for storage, second item is the unique ID for this item | |
*/ | |
protected static function prepare_simplepie_object_for_cache($data) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Caches data to the filesystem | |
* | |
* @package SimplePie | |
* @subpackage Caching | |
*/ | |
class SimplePie_Cache_File implements \SimplePie_Cache_Base | |
{ | |
/** | |
* Location string | |
* | |
* @see SimplePie::$cache_location | |
* @var string | |
*/ | |
protected $location; | |
/** | |
* Filename | |
* | |
* @var string | |
*/ | |
protected $filename; | |
/** | |
* File extension | |
* | |
* @var string | |
*/ | |
protected $extension; | |
/** | |
* File path | |
* | |
* @var string | |
*/ | |
protected $name; | |
/** | |
* Create a new cache object | |
* | |
* @param string $location Location string (from SimplePie::$cache_location) | |
* @param string $name Unique ID for the cache | |
* @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data | |
*/ | |
public function __construct($location, $name, $type) | |
{ | |
} | |
/** | |
* Save data to the cache | |
* | |
* @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property | |
* @return bool Successfulness | |
*/ | |
public function save($data) | |
{ | |
} | |
/** | |
* Retrieve the data saved to the cache | |
* | |
* @return array Data for SimplePie::$data | |
*/ | |
public function load() | |
{ | |
} | |
/** | |
* Retrieve the last modified time for the cache | |
* | |
* @return int Timestamp | |
*/ | |
public function mtime() | |
{ | |
} | |
/** | |
* Set the last modified time to the current time | |
* | |
* @return bool Success status | |
*/ | |
public function touch() | |
{ | |
} | |
/** | |
* Remove the cache | |
* | |
* @return bool Success status | |
*/ | |
public function unlink() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Caches data to memcache | |
* | |
* Registered for URLs with the "memcache" protocol | |
* | |
* For example, `memcache://localhost:11211/?timeout=3600&prefix=sp_` will | |
* connect to memcache on `localhost` on port 11211. All tables will be | |
* prefixed with `sp_` and data will expire after 3600 seconds | |
* | |
* @package SimplePie | |
* @subpackage Caching | |
* @uses Memcache | |
*/ | |
class SimplePie_Cache_Memcache implements \SimplePie_Cache_Base | |
{ | |
/** | |
* Memcache instance | |
* | |
* @var Memcache | |
*/ | |
protected $cache; | |
/** | |
* Options | |
* | |
* @var array | |
*/ | |
protected $options; | |
/** | |
* Cache name | |
* | |
* @var string | |
*/ | |
protected $name; | |
/** | |
* Create a new cache object | |
* | |
* @param string $location Location string (from SimplePie::$cache_location) | |
* @param string $name Unique ID for the cache | |
* @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data | |
*/ | |
public function __construct($location, $name, $type) | |
{ | |
} | |
/** | |
* Save data to the cache | |
* | |
* @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property | |
* @return bool Successfulness | |
*/ | |
public function save($data) | |
{ | |
} | |
/** | |
* Retrieve the data saved to the cache | |
* | |
* @return array Data for SimplePie::$data | |
*/ | |
public function load() | |
{ | |
} | |
/** | |
* Retrieve the last modified time for the cache | |
* | |
* @return int Timestamp | |
*/ | |
public function mtime() | |
{ | |
} | |
/** | |
* Set the last modified time to the current time | |
* | |
* @return bool Success status | |
*/ | |
public function touch() | |
{ | |
} | |
/** | |
* Remove the cache | |
* | |
* @return bool Success status | |
*/ | |
public function unlink() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Caches data to a MySQL database | |
* | |
* Registered for URLs with the "mysql" protocol | |
* | |
* For example, `mysql://root:password@localhost:3306/mydb?prefix=sp_` will | |
* connect to the `mydb` database on `localhost` on port 3306, with the user | |
* `root` and the password `password`. All tables will be prefixed with `sp_` | |
* | |
* @package SimplePie | |
* @subpackage Caching | |
*/ | |
class SimplePie_Cache_MySQL extends \SimplePie_Cache_DB | |
{ | |
/** | |
* PDO instance | |
* | |
* @var PDO | |
*/ | |
protected $mysql; | |
/** | |
* Options | |
* | |
* @var array | |
*/ | |
protected $options; | |
/** | |
* Cache ID | |
* | |
* @var string | |
*/ | |
protected $id; | |
/** | |
* Create a new cache object | |
* | |
* @param string $location Location string (from SimplePie::$cache_location) | |
* @param string $name Unique ID for the cache | |
* @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data | |
*/ | |
public function __construct($location, $name, $type) | |
{ | |
} | |
/** | |
* Save data to the cache | |
* | |
* @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property | |
* @return bool Successfulness | |
*/ | |
public function save($data) | |
{ | |
} | |
/** | |
* Retrieve the data saved to the cache | |
* | |
* @return array Data for SimplePie::$data | |
*/ | |
public function load() | |
{ | |
} | |
/** | |
* Retrieve the last modified time for the cache | |
* | |
* @return int Timestamp | |
*/ | |
public function mtime() | |
{ | |
} | |
/** | |
* Set the last modified time to the current time | |
* | |
* @return bool Success status | |
*/ | |
public function touch() | |
{ | |
} | |
/** | |
* Remove the cache | |
* | |
* @return bool Success status | |
*/ | |
public function unlink() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Handles `<media:text>` captions as defined in Media RSS. | |
* | |
* Used by {@see SimplePie_Enclosure::get_caption()} and {@see SimplePie_Enclosure::get_captions()} | |
* | |
* This class can be overloaded with {@see SimplePie::set_caption_class()} | |
* | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie_Caption | |
{ | |
/** | |
* Content type | |
* | |
* @var string | |
* @see get_type() | |
*/ | |
var $type; | |
/** | |
* Language | |
* | |
* @var string | |
* @see get_language() | |
*/ | |
var $lang; | |
/** | |
* Start time | |
* | |
* @var string | |
* @see get_starttime() | |
*/ | |
var $startTime; | |
/** | |
* End time | |
* | |
* @var string | |
* @see get_endtime() | |
*/ | |
var $endTime; | |
/** | |
* Caption text | |
* | |
* @var string | |
* @see get_text() | |
*/ | |
var $text; | |
/** | |
* Constructor, used to input the data | |
* | |
* For documentation on all the parameters, see the corresponding | |
* properties and their accessors | |
*/ | |
public function __construct($type = \null, $lang = \null, $startTime = \null, $endTime = \null, $text = \null) | |
{ | |
} | |
/** | |
* String-ified version | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Get the end time | |
* | |
* @return string|null Time in the format 'hh:mm:ss.SSS' | |
*/ | |
public function get_endtime() | |
{ | |
} | |
/** | |
* Get the language | |
* | |
* @link http://tools.ietf.org/html/rfc3066 | |
* @return string|null Language code as per RFC 3066 | |
*/ | |
public function get_language() | |
{ | |
} | |
/** | |
* Get the start time | |
* | |
* @return string|null Time in the format 'hh:mm:ss.SSS' | |
*/ | |
public function get_starttime() | |
{ | |
} | |
/** | |
* Get the text of the caption | |
* | |
* @return string|null | |
*/ | |
public function get_text() | |
{ | |
} | |
/** | |
* Get the content type (not MIME type) | |
* | |
* @return string|null Either 'text' or 'html' | |
*/ | |
public function get_type() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Manages all category-related data | |
* | |
* Used by {@see SimplePie_Item::get_category()} and {@see SimplePie_Item::get_categories()} | |
* | |
* This class can be overloaded with {@see SimplePie::set_category_class()} | |
* | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie_Category | |
{ | |
/** | |
* Category identifier | |
* | |
* @var string | |
* @see get_term | |
*/ | |
var $term; | |
/** | |
* Categorization scheme identifier | |
* | |
* @var string | |
* @see get_scheme() | |
*/ | |
var $scheme; | |
/** | |
* Human readable label | |
* | |
* @var string | |
* @see get_label() | |
*/ | |
var $label; | |
/** | |
* Constructor, used to input the data | |
* | |
* @param string $term | |
* @param string $scheme | |
* @param string $label | |
*/ | |
public function __construct($term = \null, $scheme = \null, $label = \null) | |
{ | |
} | |
/** | |
* String-ified version | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Get the category identifier | |
* | |
* @return string|null | |
*/ | |
public function get_term() | |
{ | |
} | |
/** | |
* Get the categorization scheme identifier | |
* | |
* @return string|null | |
*/ | |
public function get_scheme() | |
{ | |
} | |
/** | |
* Get the human readable label | |
* | |
* @return string|null | |
*/ | |
public function get_label() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Content-type sniffing | |
* | |
* Based on the rules in http://tools.ietf.org/html/draft-abarth-mime-sniff-06 | |
* | |
* This is used since we can't always trust Content-Type headers, and is based | |
* upon the HTML5 parsing rules. | |
* | |
* | |
* This class can be overloaded with {@see SimplePie::set_content_type_sniffer_class()} | |
* | |
* @package SimplePie | |
* @subpackage HTTP | |
*/ | |
class SimplePie_Content_Type_Sniffer | |
{ | |
/** | |
* File object | |
* | |
* @var SimplePie_File | |
*/ | |
var $file; | |
/** | |
* Create an instance of the class with the input file | |
* | |
* @param SimplePie_Content_Type_Sniffer $file Input file | |
*/ | |
public function __construct($file) | |
{ | |
} | |
/** | |
* Get the Content-Type of the specified file | |
* | |
* @return string Actual Content-Type | |
*/ | |
public function get_type() | |
{ | |
} | |
/** | |
* Sniff text or binary | |
* | |
* @return string Actual Content-Type | |
*/ | |
public function text_or_binary() | |
{ | |
} | |
/** | |
* Sniff unknown | |
* | |
* @return string Actual Content-Type | |
*/ | |
public function unknown() | |
{ | |
} | |
/** | |
* Sniff images | |
* | |
* @return string Actual Content-Type | |
*/ | |
public function image() | |
{ | |
} | |
/** | |
* Sniff HTML | |
* | |
* @return string Actual Content-Type | |
*/ | |
public function feed_or_html() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Manages `<media:copyright>` copyright tags as defined in Media RSS | |
* | |
* Used by {@see SimplePie_Enclosure::get_copyright()} | |
* | |
* This class can be overloaded with {@see SimplePie::set_copyright_class()} | |
* | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie_Copyright | |
{ | |
/** | |
* Copyright URL | |
* | |
* @var string | |
* @see get_url() | |
*/ | |
var $url; | |
/** | |
* Attribution | |
* | |
* @var string | |
* @see get_attribution() | |
*/ | |
var $label; | |
/** | |
* Constructor, used to input the data | |
* | |
* For documentation on all the parameters, see the corresponding | |
* properties and their accessors | |
*/ | |
public function __construct($url = \null, $label = \null) | |
{ | |
} | |
/** | |
* String-ified version | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Get the copyright URL | |
* | |
* @return string|null URL to copyright information | |
*/ | |
public function get_url() | |
{ | |
} | |
/** | |
* Get the attribution text | |
* | |
* @return string|null | |
*/ | |
public function get_attribution() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie | |
{ | |
/** | |
* @var array Raw data | |
* @access private | |
*/ | |
public $data = array(); | |
/** | |
* @var mixed Error string | |
* @access private | |
*/ | |
public $error; | |
/** | |
* @var object Instance of SimplePie_Sanitize (or other class) | |
* @see SimplePie::set_sanitize_class() | |
* @access private | |
*/ | |
public $sanitize; | |
/** | |
* @var string SimplePie Useragent | |
* @see SimplePie::set_useragent() | |
* @access private | |
*/ | |
public $useragent = \SIMPLEPIE_USERAGENT; | |
/** | |
* @var string Feed URL | |
* @see SimplePie::set_feed_url() | |
* @access private | |
*/ | |
public $feed_url; | |
/** | |
* @var object Instance of SimplePie_File to use as a feed | |
* @see SimplePie::set_file() | |
* @access private | |
*/ | |
public $file; | |
/** | |
* @var string Raw feed data | |
* @see SimplePie::set_raw_data() | |
* @access private | |
*/ | |
public $raw_data; | |
/** | |
* @var int Timeout for fetching remote files | |
* @see SimplePie::set_timeout() | |
* @access private | |
*/ | |
public $timeout = 10; | |
/** | |
* @var bool Forces fsockopen() to be used for remote files instead | |
* of cURL, even if a new enough version is installed | |
* @see SimplePie::force_fsockopen() | |
* @access private | |
*/ | |
public $force_fsockopen = \false; | |
/** | |
* @var bool Force the given data/URL to be treated as a feed no matter what | |
* it appears like | |
* @see SimplePie::force_feed() | |
* @access private | |
*/ | |
public $force_feed = \false; | |
/** | |
* @var bool Enable/Disable Caching | |
* @see SimplePie::enable_cache() | |
* @access private | |
*/ | |
public $cache = \true; | |
/** | |
* @var int Cache duration (in seconds) | |
* @see SimplePie::set_cache_duration() | |
* @access private | |
*/ | |
public $cache_duration = 3600; | |
/** | |
* @var int Auto-discovery cache duration (in seconds) | |
* @see SimplePie::set_autodiscovery_cache_duration() | |
* @access private | |
*/ | |
public $autodiscovery_cache_duration = 604800; | |
// 7 Days. | |
/** | |
* @var string Cache location (relative to executing script) | |
* @see SimplePie::set_cache_location() | |
* @access private | |
*/ | |
public $cache_location = './cache'; | |
/** | |
* @var string Function that creates the cache filename | |
* @see SimplePie::set_cache_name_function() | |
* @access private | |
*/ | |
public $cache_name_function = 'md5'; | |
/** | |
* @var bool Reorder feed by date descending | |
* @see SimplePie::enable_order_by_date() | |
* @access private | |
*/ | |
public $order_by_date = \true; | |
/** | |
* @var mixed Force input encoding to be set to the follow value | |
* (false, or anything type-cast to false, disables this feature) | |
* @see SimplePie::set_input_encoding() | |
* @access private | |
*/ | |
public $input_encoding = \false; | |
/** | |
* @var int Feed Autodiscovery Level | |
* @see SimplePie::set_autodiscovery_level() | |
* @access private | |
*/ | |
public $autodiscovery = \SIMPLEPIE_LOCATOR_ALL; | |
/** | |
* Class registry object | |
* | |
* @var SimplePie_Registry | |
*/ | |
public $registry; | |
/** | |
* @var int Maximum number of feeds to check with autodiscovery | |
* @see SimplePie::set_max_checked_feeds() | |
* @access private | |
*/ | |
public $max_checked_feeds = 10; | |
/** | |
* @var array All the feeds found during the autodiscovery process | |
* @see SimplePie::get_all_discovered_feeds() | |
* @access private | |
*/ | |
public $all_discovered_feeds = array(); | |
/** | |
* @var string Web-accessible path to the handler_image.php file. | |
* @see SimplePie::set_image_handler() | |
* @access private | |
*/ | |
public $image_handler = ''; | |
/** | |
* @var array Stores the URLs when multiple feeds are being initialized. | |
* @see SimplePie::set_feed_url() | |
* @access private | |
*/ | |
public $multifeed_url = array(); | |
/** | |
* @var array Stores SimplePie objects when multiple feeds initialized. | |
* @access private | |
*/ | |
public $multifeed_objects = array(); | |
/** | |
* @var array Stores the get_object_vars() array for use with multifeeds. | |
* @see SimplePie::set_feed_url() | |
* @access private | |
*/ | |
public $config_settings = \null; | |
/** | |
* @var integer Stores the number of items to return per-feed with multifeeds. | |
* @see SimplePie::set_item_limit() | |
* @access private | |
*/ | |
public $item_limit = 0; | |
/** | |
* @var array Stores the default attributes to be stripped by strip_attributes(). | |
* @see SimplePie::strip_attributes() | |
* @access private | |
*/ | |
public $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'); | |
/** | |
* @var array Stores the default tags to be stripped by strip_htmltags(). | |
* @see SimplePie::strip_htmltags() | |
* @access private | |
*/ | |
public $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'); | |
/** | |
* The SimplePie class contains feed level data and options | |
* | |
* To use SimplePie, create the SimplePie object with no parameters. You can | |
* then set configuration options using the provided methods. After setting | |
* them, you must initialise the feed using $feed->init(). At that point the | |
* object's methods and properties will be available to you. | |
* | |
* Previously, it was possible to pass in the feed URL along with cache | |
* options directly into the constructor. This has been removed as of 1.3 as | |
* it caused a lot of confusion. | |
* | |
* @since 1.0 Preview Release | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Used for converting object to a string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Remove items that link back to this before destroying this object | |
*/ | |
public function __destruct() | |
{ | |
} | |
/** | |
* Force the given data/URL to be treated as a feed | |
* | |
* This tells SimplePie to ignore the content-type provided by the server. | |
* Be careful when using this option, as it will also disable autodiscovery. | |
* | |
* @since 1.1 | |
* @param bool $enable Force the given data/URL to be treated as a feed | |
*/ | |
public function force_feed($enable = \false) | |
{ | |
} | |
/** | |
* Set the URL of the feed you want to parse | |
* | |
* This allows you to enter the URL of the feed you want to parse, or the | |
* website you want to try to use auto-discovery on. This takes priority | |
* over any set raw data. | |
* | |
* You can set multiple feeds to mash together by passing an array instead | |
* of a string for the $url. Remember that with each additional feed comes | |
* additional processing and resources. | |
* | |
* @since 1.0 Preview Release | |
* @see set_raw_data() | |
* @param string|array $url This is the URL (or array of URLs) that you want to parse. | |
*/ | |
public function set_feed_url($url) | |
{ | |
} | |
/** | |
* Set an instance of {@see SimplePie_File} to use as a feed | |
* | |
* @param SimplePie_File &$file | |
* @return bool True on success, false on failure | |
*/ | |
public function set_file(&$file) | |
{ | |
} | |
/** | |
* Set the raw XML data to parse | |
* | |
* Allows you to use a string of RSS/Atom data instead of a remote feed. | |
* | |
* If you have a feed available as a string in PHP, you can tell SimplePie | |
* to parse that data string instead of a remote feed. Any set feed URL | |
* takes precedence. | |
* | |
* @since 1.0 Beta 3 | |
* @param string $data RSS or Atom data as a string. | |
* @see set_feed_url() | |
*/ | |
public function set_raw_data($data) | |
{ | |
} | |
/** | |
* Set the the default timeout for fetching remote feeds | |
* | |
* This allows you to change the maximum time the feed's server to respond | |
* and send the feed back. | |
* | |
* @since 1.0 Beta 3 | |
* @param int $timeout The maximum number of seconds to spend waiting to retrieve a feed. | |
*/ | |
public function set_timeout($timeout = 10) | |
{ | |
} | |
/** | |
* Force SimplePie to use fsockopen() instead of cURL | |
* | |
* @since 1.0 Beta 3 | |
* @param bool $enable Force fsockopen() to be used | |
*/ | |
public function force_fsockopen($enable = \false) | |
{ | |
} | |
/** | |
* Enable/disable caching in SimplePie. | |
* | |
* This option allows you to disable caching all-together in SimplePie. | |
* However, disabling the cache can lead to longer load times. | |
* | |
* @since 1.0 Preview Release | |
* @param bool $enable Enable caching | |
*/ | |
public function enable_cache($enable = \true) | |
{ | |
} | |
/** | |
* Set the length of time (in seconds) that the contents of a feed will be | |
* cached | |
* | |
* @param int $seconds The feed content cache duration | |
*/ | |
public function set_cache_duration($seconds = 3600) | |
{ | |
} | |
/** | |
* Set the length of time (in seconds) that the autodiscovered feed URL will | |
* be cached | |
* | |
* @param int $seconds The autodiscovered feed URL cache duration. | |
*/ | |
public function set_autodiscovery_cache_duration($seconds = 604800) | |
{ | |
} | |
/** | |
* Set the file system location where the cached files should be stored | |
* | |
* @param string $location The file system location. | |
*/ | |
public function set_cache_location($location = './cache') | |
{ | |
} | |
/** | |
* Set whether feed items should be sorted into reverse chronological order | |
* | |
* @param bool $enable Sort as reverse chronological order. | |
*/ | |
public function enable_order_by_date($enable = \true) | |
{ | |
} | |
/** | |
* Set the character encoding used to parse the feed | |
* | |
* This overrides the encoding reported by the feed, however it will fall | |
* back to the normal encoding detection if the override fails | |
* | |
* @param string $encoding Character encoding | |
*/ | |
public function set_input_encoding($encoding = \false) | |
{ | |
} | |
/** | |
* Set how much feed autodiscovery to do | |
* | |
* @see SIMPLEPIE_LOCATOR_NONE | |
* @see SIMPLEPIE_LOCATOR_AUTODISCOVERY | |
* @see SIMPLEPIE_LOCATOR_LOCAL_EXTENSION | |
* @see SIMPLEPIE_LOCATOR_LOCAL_BODY | |
* @see SIMPLEPIE_LOCATOR_REMOTE_EXTENSION | |
* @see SIMPLEPIE_LOCATOR_REMOTE_BODY | |
* @see SIMPLEPIE_LOCATOR_ALL | |
* @param int $level Feed Autodiscovery Level (level can be a combination of the above constants, see bitwise OR operator) | |
*/ | |
public function set_autodiscovery_level($level = \SIMPLEPIE_LOCATOR_ALL) | |
{ | |
} | |
/** | |
* Get the class registry | |
* | |
* Use this to override SimplePie's default classes | |
* @see SimplePie_Registry | |
* @return SimplePie_Registry | |
*/ | |
public function &get_registry() | |
{ | |
} | |
/**#@+ | |
* Useful when you are overloading or extending SimplePie's default classes. | |
* | |
* @deprecated Use {@see get_registry()} instead | |
* @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation | |
* @param string $class Name of custom class | |
* @return boolean True on success, false otherwise | |
*/ | |
/** | |
* Set which class SimplePie uses for caching | |
*/ | |
public function set_cache_class($class = 'SimplePie_Cache') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for auto-discovery | |
*/ | |
public function set_locator_class($class = 'SimplePie_Locator') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for XML parsing | |
*/ | |
public function set_parser_class($class = 'SimplePie_Parser') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for remote file fetching | |
*/ | |
public function set_file_class($class = 'SimplePie_File') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for data sanitization | |
*/ | |
public function set_sanitize_class($class = 'SimplePie_Sanitize') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for handling feed items | |
*/ | |
public function set_item_class($class = 'SimplePie_Item') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for handling author data | |
*/ | |
public function set_author_class($class = 'SimplePie_Author') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for handling category data | |
*/ | |
public function set_category_class($class = 'SimplePie_Category') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for feed enclosures | |
*/ | |
public function set_enclosure_class($class = 'SimplePie_Enclosure') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for `<media:text>` captions | |
*/ | |
public function set_caption_class($class = 'SimplePie_Caption') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for `<media:copyright>` | |
*/ | |
public function set_copyright_class($class = 'SimplePie_Copyright') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for `<media:credit>` | |
*/ | |
public function set_credit_class($class = 'SimplePie_Credit') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for `<media:rating>` | |
*/ | |
public function set_rating_class($class = 'SimplePie_Rating') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for `<media:restriction>` | |
*/ | |
public function set_restriction_class($class = 'SimplePie_Restriction') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses for content-type sniffing | |
*/ | |
public function set_content_type_sniffer_class($class = 'SimplePie_Content_Type_Sniffer') | |
{ | |
} | |
/** | |
* Set which class SimplePie uses item sources | |
*/ | |
public function set_source_class($class = 'SimplePie_Source') | |
{ | |
} | |
/**#@-*/ | |
/** | |
* Set the user agent string | |
* | |
* @param string $ua New user agent string. | |
*/ | |
public function set_useragent($ua = \SIMPLEPIE_USERAGENT) | |
{ | |
} | |
/** | |
* Set callback function to create cache filename with | |
* | |
* @param mixed $function Callback function | |
*/ | |
public function set_cache_name_function($function = 'md5') | |
{ | |
} | |
/** | |
* Set options to make SP as fast as possible | |
* | |
* Forgoes a substantial amount of data sanitization in favor of speed. This | |
* turns SimplePie into a dumb parser of feeds. | |
* | |
* @param bool $set Whether to set them or not | |
*/ | |
public function set_stupidly_fast($set = \false) | |
{ | |
} | |
/** | |
* Set maximum number of feeds to check with autodiscovery | |
* | |
* @param int $max Maximum number of feeds to check | |
*/ | |
public function set_max_checked_feeds($max = 10) | |
{ | |
} | |
public function remove_div($enable = \true) | |
{ | |
} | |
public function strip_htmltags($tags = '', $encode = \null) | |
{ | |
} | |
public function encode_instead_of_strip($enable = \true) | |
{ | |
} | |
public function strip_attributes($attribs = '') | |
{ | |
} | |
/** | |
* Set the output encoding | |
* | |
* Allows you to override SimplePie's output to match that of your webpage. | |
* This is useful for times when your webpages are not being served as | |
* UTF-8. This setting will be obeyed by {@see handle_content_type()}, and | |
* is similar to {@see set_input_encoding()}. | |
* | |
* It should be noted, however, that not all character encodings can support | |
* all characters. If your page is being served as ISO-8859-1 and you try | |
* to display a Japanese feed, you'll likely see garbled characters. | |
* Because of this, it is highly recommended to ensure that your webpages | |
* are served as UTF-8. | |
* | |
* The number of supported character encodings depends on whether your web | |
* host supports {@link http://php.net/mbstring mbstring}, | |
* {@link http://php.net/iconv iconv}, or both. See | |
* {@link http://simplepie.org/wiki/faq/Supported_Character_Encodings} for | |
* more information. | |
* | |
* @param string $encoding | |
*/ | |
public function set_output_encoding($encoding = 'UTF-8') | |
{ | |
} | |
public function strip_comments($strip = \false) | |
{ | |
} | |
/** | |
* Set element/attribute key/value pairs of HTML attributes | |
* containing URLs that need to be resolved relative to the feed | |
* | |
* Defaults to |a|@href, |area|@href, |blockquote|@cite, |del|@cite, | |
* |form|@action, |img|@longdesc, |img|@src, |input|@src, |ins|@cite, | |
* |q|@cite | |
* | |
* @since 1.0 | |
* @param array|null $element_attribute Element/attribute key/value pairs, null for default | |
*/ | |
public function set_url_replacements($element_attribute = \null) | |
{ | |
} | |
/** | |
* Set the handler to enable the display of cached images. | |
* | |
* @param str $page Web-accessible path to the handler_image.php file. | |
* @param str $qs The query string that the value should be passed to. | |
*/ | |
public function set_image_handler($page = \false, $qs = 'i') | |
{ | |
} | |
/** | |
* Set the limit for items returned per-feed with multifeeds | |
* | |
* @param integer $limit The maximum number of items to return. | |
*/ | |
public function set_item_limit($limit = 0) | |
{ | |
} | |
/** | |
* Initialize the feed object | |
* | |
* This is what makes everything happen. Period. This is where all of the | |
* configuration options get processed, feeds are fetched, cached, and | |
* parsed, and all of that other good stuff. | |
* | |
* @return boolean True if successful, false otherwise | |
*/ | |
public function init() | |
{ | |
} | |
/** | |
* Fetch the data via SimplePie_File | |
* | |
* If the data is already cached, attempt to fetch it from there instead | |
* @param SimplePie_Cache|false $cache Cache handler, or false to not load from the cache | |
* @return array|true Returns true if the data was loaded from the cache, or an array of HTTP headers and sniffed type | |
*/ | |
protected function fetch_data(&$cache) | |
{ | |
} | |
/** | |
* Get the error message for the occurred error. | |
* | |
* @return string|array Error message, or array of messages for multifeeds | |
*/ | |
public function error() | |
{ | |
} | |
/** | |
* Get the raw XML | |
* | |
* This is the same as the old `$feed->enable_xml_dump(true)`, but returns | |
* the data instead of printing it. | |
* | |
* @return string|boolean Raw XML data, false if the cache is used | |
*/ | |
public function get_raw_data() | |
{ | |
} | |
/** | |
* Get the character encoding used for output | |
* | |
* @since Preview Release | |
* @return string | |
*/ | |
public function get_encoding() | |
{ | |
} | |
/** | |
* Send the content-type header with correct encoding | |
* | |
* This method ensures that the SimplePie-enabled page is being served with | |
* the correct {@link http://www.iana.org/assignments/media-types/ mime-type} | |
* and character encoding HTTP headers (character encoding determined by the | |
* {@see set_output_encoding} config option). | |
* | |
* This won't work properly if any content or whitespace has already been | |
* sent to the browser, because it relies on PHP's | |
* {@link http://php.net/header header()} function, and these are the | |
* circumstances under which the function works. | |
* | |
* Because it's setting these settings for the entire page (as is the nature | |
* of HTTP headers), this should only be used once per page (again, at the | |
* top). | |
* | |
* @param string $mime MIME type to serve the page as | |
*/ | |
public function handle_content_type($mime = 'text/html') | |
{ | |
} | |
/** | |
* Get the type of the feed | |
* | |
* This returns a SIMPLEPIE_TYPE_* constant, which can be tested against | |
* using {@link http://php.net/language.operators.bitwise bitwise operators} | |
* | |
* @since 0.8 (usage changed to using constants in 1.0) | |
* @see SIMPLEPIE_TYPE_NONE Unknown. | |
* @see SIMPLEPIE_TYPE_RSS_090 RSS 0.90. | |
* @see SIMPLEPIE_TYPE_RSS_091_NETSCAPE RSS 0.91 (Netscape). | |
* @see SIMPLEPIE_TYPE_RSS_091_USERLAND RSS 0.91 (Userland). | |
* @see SIMPLEPIE_TYPE_RSS_091 RSS 0.91. | |
* @see SIMPLEPIE_TYPE_RSS_092 RSS 0.92. | |
* @see SIMPLEPIE_TYPE_RSS_093 RSS 0.93. | |
* @see SIMPLEPIE_TYPE_RSS_094 RSS 0.94. | |
* @see SIMPLEPIE_TYPE_RSS_10 RSS 1.0. | |
* @see SIMPLEPIE_TYPE_RSS_20 RSS 2.0.x. | |
* @see SIMPLEPIE_TYPE_RSS_RDF RDF-based RSS. | |
* @see SIMPLEPIE_TYPE_RSS_SYNDICATION Non-RDF-based RSS (truly intended as syndication format). | |
* @see SIMPLEPIE_TYPE_RSS_ALL Any version of RSS. | |
* @see SIMPLEPIE_TYPE_ATOM_03 Atom 0.3. | |
* @see SIMPLEPIE_TYPE_ATOM_10 Atom 1.0. | |
* @see SIMPLEPIE_TYPE_ATOM_ALL Any version of Atom. | |
* @see SIMPLEPIE_TYPE_ALL Any known/supported feed type. | |
* @return int SIMPLEPIE_TYPE_* constant | |
*/ | |
public function get_type() | |
{ | |
} | |
/** | |
* Get the URL for the feed | |
* | |
* May or may not be different from the URL passed to {@see set_feed_url()}, | |
* depending on whether auto-discovery was used. | |
* | |
* @since Preview Release (previously called `get_feed_url()` since SimplePie 0.8.) | |
* @todo If we have a perm redirect we should return the new URL | |
* @todo When we make the above change, let's support <itunes:new-feed-url> as well | |
* @todo Also, |atom:link|@rel=self | |
* @return string|null | |
*/ | |
public function subscribe_url() | |
{ | |
} | |
/** | |
* Get data for an feed-level element | |
* | |
* This method allows you to get access to ANY element/attribute that is a | |
* sub-element of the opening feed tag. | |
* | |
* The return value is an indexed array of elements matching the given | |
* namespace and tag name. Each element has `attribs`, `data` and `child` | |
* subkeys. For `attribs` and `child`, these contain namespace subkeys. | |
* `attribs` then has one level of associative name => value data (where | |
* `value` is a string) after the namespace. `child` has tag-indexed keys | |
* after the namespace, each member of which is an indexed array matching | |
* this same format. | |
* | |
* For example: | |
* <pre> | |
* // This is probably a bad example because we already support | |
* // <media:content> natively, but it shows you how to parse through | |
* // the nodes. | |
* $group = $item->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'group'); | |
* $content = $group[0]['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content']; | |
* $file = $content[0]['attribs']['']['url']; | |
* echo $file; | |
* </pre> | |
* | |
* @since 1.0 | |
* @see http://simplepie.org/wiki/faq/supported_xml_namespaces | |
* @param string $namespace The URL of the XML namespace of the elements you're trying to access | |
* @param string $tag Tag name | |
* @return array | |
*/ | |
public function get_feed_tags($namespace, $tag) | |
{ | |
} | |
/** | |
* Get data for an channel-level element | |
* | |
* This method allows you to get access to ANY element/attribute in the | |
* channel/header section of the feed. | |
* | |
* See {@see SimplePie::get_feed_tags()} for a description of the return value | |
* | |
* @since 1.0 | |
* @see http://simplepie.org/wiki/faq/supported_xml_namespaces | |
* @param string $namespace The URL of the XML namespace of the elements you're trying to access | |
* @param string $tag Tag name | |
* @return array | |
*/ | |
public function get_channel_tags($namespace, $tag) | |
{ | |
} | |
/** | |
* Get data for an channel-level element | |
* | |
* This method allows you to get access to ANY element/attribute in the | |
* image/logo section of the feed. | |
* | |
* See {@see SimplePie::get_feed_tags()} for a description of the return value | |
* | |
* @since 1.0 | |
* @see http://simplepie.org/wiki/faq/supported_xml_namespaces | |
* @param string $namespace The URL of the XML namespace of the elements you're trying to access | |
* @param string $tag Tag name | |
* @return array | |
*/ | |
public function get_image_tags($namespace, $tag) | |
{ | |
} | |
/** | |
* Get the base URL value from the feed | |
* | |
* Uses `<xml:base>` if available, otherwise uses the first link in the | |
* feed, or failing that, the URL of the feed itself. | |
* | |
* @see get_link | |
* @see subscribe_url | |
* | |
* @param array $element | |
* @return string | |
*/ | |
public function get_base($element = array()) | |
{ | |
} | |
/** | |
* Sanitize feed data | |
* | |
* @access private | |
* @see SimplePie_Sanitize::sanitize() | |
* @param string $data Data to sanitize | |
* @param int $type One of the SIMPLEPIE_CONSTRUCT_* constants | |
* @param string $base Base URL to resolve URLs against | |
* @return string Sanitized data | |
*/ | |
public function sanitize($data, $type, $base = '') | |
{ | |
} | |
/** | |
* Get the title of the feed | |
* | |
* Uses `<atom:title>`, `<title>` or `<dc:title>` | |
* | |
* @since 1.0 (previously called `get_feed_title` since 0.8) | |
* @return string|null | |
*/ | |
public function get_title() | |
{ | |
} | |
/** | |
* Get a category for the feed | |
* | |
* @since Unknown | |
* @param int $key The category that you want to return. Remember that arrays begin with 0, not 1 | |
* @return SimplePie_Category|null | |
*/ | |
public function get_category($key = 0) | |
{ | |
} | |
/** | |
* Get all categories for the feed | |
* | |
* Uses `<atom:category>`, `<category>` or `<dc:subject>` | |
* | |
* @since Unknown | |
* @return array|null List of {@see SimplePie_Category} objects | |
*/ | |
public function get_categories() | |
{ | |
} | |
/** | |
* Get an author for the feed | |
* | |
* @since 1.1 | |
* @param int $key The author that you want to return. Remember that arrays begin with 0, not 1 | |
* @return SimplePie_Author|null | |
*/ | |
public function get_author($key = 0) | |
{ | |
} | |
/** | |
* Get all authors for the feed | |
* | |
* Uses `<atom:author>`, `<author>`, `<dc:creator>` or `<itunes:author>` | |
* | |
* @since 1.1 | |
* @return array|null List of {@see SimplePie_Author} objects | |
*/ | |
public function get_authors() | |
{ | |
} | |
/** | |
* Get a contributor for the feed | |
* | |
* @since 1.1 | |
* @param int $key The contrbutor that you want to return. Remember that arrays begin with 0, not 1 | |
* @return SimplePie_Author|null | |
*/ | |
public function get_contributor($key = 0) | |
{ | |
} | |
/** | |
* Get all contributors for the feed | |
* | |
* Uses `<atom:contributor>` | |
* | |
* @since 1.1 | |
* @return array|null List of {@see SimplePie_Author} objects | |
*/ | |
public function get_contributors() | |
{ | |
} | |
/** | |
* Get a single link for the feed | |
* | |
* @since 1.0 (previously called `get_feed_link` since Preview Release, `get_feed_permalink()` since 0.8) | |
* @param int $key The link that you want to return. Remember that arrays begin with 0, not 1 | |
* @param string $rel The relationship of the link to return | |
* @return string|null Link URL | |
*/ | |
public function get_link($key = 0, $rel = 'alternate') | |
{ | |
} | |
/** | |
* Get the permalink for the item | |
* | |
* Returns the first link available with a relationship of "alternate". | |
* Identical to {@see get_link()} with key 0 | |
* | |
* @see get_link | |
* @since 1.0 (previously called `get_feed_link` since Preview Release, `get_feed_permalink()` since 0.8) | |
* @internal Added for parity between the parent-level and the item/entry-level. | |
* @return string|null Link URL | |
*/ | |
public function get_permalink() | |
{ | |
} | |
/** | |
* Get all links for the feed | |
* | |
* Uses `<atom:link>` or `<link>` | |
* | |
* @since Beta 2 | |
* @param string $rel The relationship of links to return | |
* @return array|null Links found for the feed (strings) | |
*/ | |
public function get_links($rel = 'alternate') | |
{ | |
} | |
public function get_all_discovered_feeds() | |
{ | |
} | |
/** | |
* Get the content for the item | |
* | |
* Uses `<atom:subtitle>`, `<atom:tagline>`, `<description>`, | |
* `<dc:description>`, `<itunes:summary>` or `<itunes:subtitle>` | |
* | |
* @since 1.0 (previously called `get_feed_description()` since 0.8) | |
* @return string|null | |
*/ | |
public function get_description() | |
{ | |
} | |
/** | |
* Get the copyright info for the feed | |
* | |
* Uses `<atom:rights>`, `<atom:copyright>` or `<dc:rights>` | |
* | |
* @since 1.0 (previously called `get_feed_copyright()` since 0.8) | |
* @return string|null | |
*/ | |
public function get_copyright() | |
{ | |
} | |
/** | |
* Get the language for the feed | |
* | |
* Uses `<language>`, `<dc:language>`, or @xml_lang | |
* | |
* @since 1.0 (previously called `get_feed_language()` since 0.8) | |
* @return string|null | |
*/ | |
public function get_language() | |
{ | |
} | |
/** | |
* Get the latitude coordinates for the item | |
* | |
* Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications | |
* | |
* Uses `<geo:lat>` or `<georss:point>` | |
* | |
* @since 1.0 | |
* @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo | |
* @link http://www.georss.org/ GeoRSS | |
* @return string|null | |
*/ | |
public function get_latitude() | |
{ | |
} | |
/** | |
* Get the longitude coordinates for the feed | |
* | |
* Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications | |
* | |
* Uses `<geo:long>`, `<geo:lon>` or `<georss:point>` | |
* | |
* @since 1.0 | |
* @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo | |
* @link http://www.georss.org/ GeoRSS | |
* @return string|null | |
*/ | |
public function get_longitude() | |
{ | |
} | |
/** | |
* Get the feed logo's title | |
* | |
* RSS 0.9.0, 1.0 and 2.0 feeds are allowed to have a "feed logo" title. | |
* | |
* Uses `<image><title>` or `<image><dc:title>` | |
* | |
* @return string|null | |
*/ | |
public function get_image_title() | |
{ | |
} | |
/** | |
* Get the feed logo's URL | |
* | |
* RSS 0.9.0, 2.0, Atom 1.0, and feeds with iTunes RSS tags are allowed to | |
* have a "feed logo" URL. This points directly to the image itself. | |
* | |
* Uses `<itunes:image>`, `<atom:logo>`, `<atom:icon>`, | |
* `<image><title>` or `<image><dc:title>` | |
* | |
* @return string|null | |
*/ | |
public function get_image_url() | |
{ | |
} | |
/** | |
* Get the feed logo's link | |
* | |
* RSS 0.9.0, 1.0 and 2.0 feeds are allowed to have a "feed logo" link. This | |
* points to a human-readable page that the image should link to. | |
* | |
* Uses `<itunes:image>`, `<atom:logo>`, `<atom:icon>`, | |
* `<image><title>` or `<image><dc:title>` | |
* | |
* @return string|null | |
*/ | |
public function get_image_link() | |
{ | |
} | |
/** | |
* Get the feed logo's link | |
* | |
* RSS 2.0 feeds are allowed to have a "feed logo" width. | |
* | |
* Uses `<image><width>` or defaults to 88.0 if no width is specified and | |
* the feed is an RSS 2.0 feed. | |
* | |
* @return int|float|null | |
*/ | |
public function get_image_width() | |
{ | |
} | |
/** | |
* Get the feed logo's height | |
* | |
* RSS 2.0 feeds are allowed to have a "feed logo" height. | |
* | |
* Uses `<image><height>` or defaults to 31.0 if no height is specified and | |
* the feed is an RSS 2.0 feed. | |
* | |
* @return int|float|null | |
*/ | |
public function get_image_height() | |
{ | |
} | |
/** | |
* Get the number of items in the feed | |
* | |
* This is well-suited for {@link http://php.net/for for()} loops with | |
* {@see get_item()} | |
* | |
* @param int $max Maximum value to return. 0 for no limit | |
* @return int Number of items in the feed | |
*/ | |
public function get_item_quantity($max = 0) | |
{ | |
} | |
/** | |
* Get a single item from the feed | |
* | |
* This is better suited for {@link http://php.net/for for()} loops, whereas | |
* {@see get_items()} is better suited for | |
* {@link http://php.net/foreach foreach()} loops. | |
* | |
* @see get_item_quantity() | |
* @since Beta 2 | |
* @param int $key The item that you want to return. Remember that arrays begin with 0, not 1 | |
* @return SimplePie_Item|null | |
*/ | |
public function get_item($key = 0) | |
{ | |
} | |
/** | |
* Get all items from the feed | |
* | |
* This is better suited for {@link http://php.net/for for()} loops, whereas | |
* {@see get_items()} is better suited for | |
* {@link http://php.net/foreach foreach()} loops. | |
* | |
* @see get_item_quantity | |
* @since Beta 2 | |
* @param int $start Index to start at | |
* @param int $end Number of items to return. 0 for all items after `$start` | |
* @return array|null List of {@see SimplePie_Item} objects | |
*/ | |
public function get_items($start = 0, $end = 0) | |
{ | |
} | |
/** | |
* Set the favicon handler | |
* | |
* @deprecated Use your own favicon handling instead | |
*/ | |
public function set_favicon_handler($page = \false, $qs = 'i') | |
{ | |
} | |
/** | |
* Get the favicon for the current feed | |
* | |
* @deprecated Use your own favicon handling instead | |
*/ | |
public function get_favicon() | |
{ | |
} | |
/** | |
* Magic method handler | |
* | |
* @param string $method Method name | |
* @param array $args Arguments to the method | |
* @return mixed | |
*/ | |
public function __call($method, $args) | |
{ | |
} | |
/** | |
* Sorting callback for items | |
* | |
* @access private | |
* @param SimplePie $a | |
* @param SimplePie $b | |
* @return boolean | |
*/ | |
public static function sort_items($a, $b) | |
{ | |
} | |
/** | |
* Merge items from several feeds into one | |
* | |
* If you're merging multiple feeds together, they need to all have dates | |
* for the items or else SimplePie will refuse to sort them. | |
* | |
* @link http://simplepie.org/wiki/tutorial/sort_multiple_feeds_by_time_and_date#if_feeds_require_separate_per-feed_settings | |
* @param array $urls List of SimplePie feed objects to merge | |
* @param int $start Starting item | |
* @param int $end Number of items to return | |
* @param int $limit Maximum number of items per feed | |
* @return array | |
*/ | |
public static function merge_items($urls, $start = 0, $end = 0, $limit = 0) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2009, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* SimplePie class. | |
* | |
* Class for backward compatibility. | |
* | |
* @deprecated Use {@see SimplePie} directly | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie_Core extends \SimplePie | |
{ | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Handles `<media:credit>` as defined in Media RSS | |
* | |
* Used by {@see SimplePie_Enclosure::get_credit()} and {@see SimplePie_Enclosure::get_credits()} | |
* | |
* This class can be overloaded with {@see SimplePie::set_credit_class()} | |
* | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie_Credit | |
{ | |
/** | |
* Credited role | |
* | |
* @var string | |
* @see get_role() | |
*/ | |
var $role; | |
/** | |
* Organizational scheme | |
* | |
* @var string | |
* @see get_scheme() | |
*/ | |
var $scheme; | |
/** | |
* Credited name | |
* | |
* @var string | |
* @see get_name() | |
*/ | |
var $name; | |
/** | |
* Constructor, used to input the data | |
* | |
* For documentation on all the parameters, see the corresponding | |
* properties and their accessors | |
*/ | |
public function __construct($role = \null, $scheme = \null, $name = \null) | |
{ | |
} | |
/** | |
* String-ified version | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Get the role of the person receiving credit | |
* | |
* @return string|null | |
*/ | |
public function get_role() | |
{ | |
} | |
/** | |
* Get the organizational scheme | |
* | |
* @return string|null | |
*/ | |
public function get_scheme() | |
{ | |
} | |
/** | |
* Get the credited person/entity's name | |
* | |
* @return string|null | |
*/ | |
public function get_name() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Decode HTML Entities | |
* | |
* This implements HTML5 as of revision 967 (2007-06-28) | |
* | |
* @deprecated Use DOMDocument instead! | |
* @package SimplePie | |
*/ | |
class SimplePie_Decode_HTML_Entities | |
{ | |
/** | |
* Data to be parsed | |
* | |
* @access private | |
* @var string | |
*/ | |
var $data = ''; | |
/** | |
* Currently consumed bytes | |
* | |
* @access private | |
* @var string | |
*/ | |
var $consumed = ''; | |
/** | |
* Position of the current byte being parsed | |
* | |
* @access private | |
* @var int | |
*/ | |
var $position = 0; | |
/** | |
* Create an instance of the class with the input data | |
* | |
* @access public | |
* @param string $data Input data | |
*/ | |
public function __construct($data) | |
{ | |
} | |
/** | |
* Parse the input data | |
* | |
* @access public | |
* @return string Output data | |
*/ | |
public function parse() | |
{ | |
} | |
/** | |
* Consume the next byte | |
* | |
* @access private | |
* @return mixed The next byte, or false, if there is no more data | |
*/ | |
public function consume() | |
{ | |
} | |
/** | |
* Consume a range of characters | |
* | |
* @access private | |
* @param string $chars Characters to consume | |
* @return mixed A series of characters that match the range, or false | |
*/ | |
public function consume_range($chars) | |
{ | |
} | |
/** | |
* Unconsume one byte | |
* | |
* @access private | |
*/ | |
public function unconsume() | |
{ | |
} | |
/** | |
* Decode an entity | |
* | |
* @access private | |
*/ | |
public function entity() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Handles everything related to enclosures (including Media RSS and iTunes RSS) | |
* | |
* Used by {@see SimplePie_Item::get_enclosure()} and {@see SimplePie_Item::get_enclosures()} | |
* | |
* This class can be overloaded with {@see SimplePie::set_enclosure_class()} | |
* | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie_Enclosure | |
{ | |
/** | |
* @var string | |
* @see get_bitrate() | |
*/ | |
var $bitrate; | |
/** | |
* @var array | |
* @see get_captions() | |
*/ | |
var $captions; | |
/** | |
* @var array | |
* @see get_categories() | |
*/ | |
var $categories; | |
/** | |
* @var int | |
* @see get_channels() | |
*/ | |
var $channels; | |
/** | |
* @var SimplePie_Copyright | |
* @see get_copyright() | |
*/ | |
var $copyright; | |
/** | |
* @var array | |
* @see get_credits() | |
*/ | |
var $credits; | |
/** | |
* @var string | |
* @see get_description() | |
*/ | |
var $description; | |
/** | |
* @var int | |
* @see get_duration() | |
*/ | |
var $duration; | |
/** | |
* @var string | |
* @see get_expression() | |
*/ | |
var $expression; | |
/** | |
* @var string | |
* @see get_framerate() | |
*/ | |
var $framerate; | |
/** | |
* @var string | |
* @see get_handler() | |
*/ | |
var $handler; | |
/** | |
* @var array | |
* @see get_hashes() | |
*/ | |
var $hashes; | |
/** | |
* @var string | |
* @see get_height() | |
*/ | |
var $height; | |
/** | |
* @deprecated | |
* @var null | |
*/ | |
var $javascript; | |
/** | |
* @var array | |
* @see get_keywords() | |
*/ | |
var $keywords; | |
/** | |
* @var string | |
* @see get_language() | |
*/ | |
var $lang; | |
/** | |
* @var string | |
* @see get_length() | |
*/ | |
var $length; | |
/** | |
* @var string | |
* @see get_link() | |
*/ | |
var $link; | |
/** | |
* @var string | |
* @see get_medium() | |
*/ | |
var $medium; | |
/** | |
* @var string | |
* @see get_player() | |
*/ | |
var $player; | |
/** | |
* @var array | |
* @see get_ratings() | |
*/ | |
var $ratings; | |
/** | |
* @var array | |
* @see get_restrictions() | |
*/ | |
var $restrictions; | |
/** | |
* @var string | |
* @see get_sampling_rate() | |
*/ | |
var $samplingrate; | |
/** | |
* @var array | |
* @see get_thumbnails() | |
*/ | |
var $thumbnails; | |
/** | |
* @var string | |
* @see get_title() | |
*/ | |
var $title; | |
/** | |
* @var string | |
* @see get_type() | |
*/ | |
var $type; | |
/** | |
* @var string | |
* @see get_width() | |
*/ | |
var $width; | |
/** | |
* Constructor, used to input the data | |
* | |
* For documentation on all the parameters, see the corresponding | |
* properties and their accessors | |
* | |
* @uses idna_convert If available, this will convert an IDN | |
*/ | |
public function __construct($link = \null, $type = \null, $length = \null, $javascript = \null, $bitrate = \null, $captions = \null, $categories = \null, $channels = \null, $copyright = \null, $credits = \null, $description = \null, $duration = \null, $expression = \null, $framerate = \null, $hashes = \null, $height = \null, $keywords = \null, $lang = \null, $medium = \null, $player = \null, $ratings = \null, $restrictions = \null, $samplingrate = \null, $thumbnails = \null, $title = \null, $width = \null) | |
{ | |
} | |
/** | |
* String-ified version | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Get the bitrate | |
* | |
* @return string|null | |
*/ | |
public function get_bitrate() | |
{ | |
} | |
/** | |
* Get a single caption | |
* | |
* @param int $key | |
* @return SimplePie_Caption|null | |
*/ | |
public function get_caption($key = 0) | |
{ | |
} | |
/** | |
* Get all captions | |
* | |
* @return array|null Array of {@see SimplePie_Caption} objects | |
*/ | |
public function get_captions() | |
{ | |
} | |
/** | |
* Get a single category | |
* | |
* @param int $key | |
* @return SimplePie_Category|null | |
*/ | |
public function get_category($key = 0) | |
{ | |
} | |
/** | |
* Get all categories | |
* | |
* @return array|null Array of {@see SimplePie_Category} objects | |
*/ | |
public function get_categories() | |
{ | |
} | |
/** | |
* Get the number of audio channels | |
* | |
* @return int|null | |
*/ | |
public function get_channels() | |
{ | |
} | |
/** | |
* Get the copyright information | |
* | |
* @return SimplePie_Copyright|null | |
*/ | |
public function get_copyright() | |
{ | |
} | |
/** | |
* Get a single credit | |
* | |
* @param int $key | |
* @return SimplePie_Credit|null | |
*/ | |
public function get_credit($key = 0) | |
{ | |
} | |
/** | |
* Get all credits | |
* | |
* @return array|null Array of {@see SimplePie_Credit} objects | |
*/ | |
public function get_credits() | |
{ | |
} | |
/** | |
* Get the description of the enclosure | |
* | |
* @return string|null | |
*/ | |
public function get_description() | |
{ | |
} | |
/** | |
* Get the duration of the enclosure | |
* | |
* @param string $convert Convert seconds into hh:mm:ss | |
* @return string|int|null 'hh:mm:ss' string if `$convert` was specified, otherwise integer (or null if none found) | |
*/ | |
public function get_duration($convert = \false) | |
{ | |
} | |
/** | |
* Get the expression | |
* | |
* @return string Probably one of 'sample', 'full', 'nonstop', 'clip'. Defaults to 'full' | |
*/ | |
public function get_expression() | |
{ | |
} | |
/** | |
* Get the file extension | |
* | |
* @return string|null | |
*/ | |
public function get_extension() | |
{ | |
} | |
/** | |
* Get the framerate (in frames-per-second) | |
* | |
* @return string|null | |
*/ | |
public function get_framerate() | |
{ | |
} | |
/** | |
* Get the preferred handler | |
* | |
* @return string|null One of 'flash', 'fmedia', 'quicktime', 'wmedia', 'mp3' | |
*/ | |
public function get_handler() | |
{ | |
} | |
/** | |
* Get a single hash | |
* | |
* @link http://www.rssboard.org/media-rss#media-hash | |
* @param int $key | |
* @return string|null Hash as per `media:hash`, prefixed with "$algo:" | |
*/ | |
public function get_hash($key = 0) | |
{ | |
} | |
/** | |
* Get all credits | |
* | |
* @return array|null Array of strings, see {@see get_hash()} | |
*/ | |
public function get_hashes() | |
{ | |
} | |
/** | |
* Get the height | |
* | |
* @return string|null | |
*/ | |
public function get_height() | |
{ | |
} | |
/** | |
* Get the language | |
* | |
* @link http://tools.ietf.org/html/rfc3066 | |
* @return string|null Language code as per RFC 3066 | |
*/ | |
public function get_language() | |
{ | |
} | |
/** | |
* Get a single keyword | |
* | |
* @param int $key | |
* @return string|null | |
*/ | |
public function get_keyword($key = 0) | |
{ | |
} | |
/** | |
* Get all keywords | |
* | |
* @return array|null Array of strings | |
*/ | |
public function get_keywords() | |
{ | |
} | |
/** | |
* Get length | |
* | |
* @return float Length in bytes | |
*/ | |
public function get_length() | |
{ | |
} | |
/** | |
* Get the URL | |
* | |
* @return string|null | |
*/ | |
public function get_link() | |
{ | |
} | |
/** | |
* Get the medium | |
* | |
* @link http://www.rssboard.org/media-rss#media-content | |
* @return string|null Should be one of 'image', 'audio', 'video', 'document', 'executable' | |
*/ | |
public function get_medium() | |
{ | |
} | |
/** | |
* Get the player URL | |
* | |
* Typically the same as {@see get_permalink()} | |
* @return string|null Player URL | |
*/ | |
public function get_player() | |
{ | |
} | |
/** | |
* Get a single rating | |
* | |
* @param int $key | |
* @return SimplePie_Rating|null | |
*/ | |
public function get_rating($key = 0) | |
{ | |
} | |
/** | |
* Get all ratings | |
* | |
* @return array|null Array of {@see SimplePie_Rating} objects | |
*/ | |
public function get_ratings() | |
{ | |
} | |
/** | |
* Get a single restriction | |
* | |
* @param int $key | |
* @return SimplePie_Restriction|null | |
*/ | |
public function get_restriction($key = 0) | |
{ | |
} | |
/** | |
* Get all restrictions | |
* | |
* @return array|null Array of {@see SimplePie_Restriction} objects | |
*/ | |
public function get_restrictions() | |
{ | |
} | |
/** | |
* Get the sampling rate (in kHz) | |
* | |
* @return string|null | |
*/ | |
public function get_sampling_rate() | |
{ | |
} | |
/** | |
* Get the file size (in MiB) | |
* | |
* @return float|null File size in mebibytes (1048 bytes) | |
*/ | |
public function get_size() | |
{ | |
} | |
/** | |
* Get a single thumbnail | |
* | |
* @param int $key | |
* @return string|null Thumbnail URL | |
*/ | |
public function get_thumbnail($key = 0) | |
{ | |
} | |
/** | |
* Get all thumbnails | |
* | |
* @return array|null Array of thumbnail URLs | |
*/ | |
public function get_thumbnails() | |
{ | |
} | |
/** | |
* Get the title | |
* | |
* @return string|null | |
*/ | |
public function get_title() | |
{ | |
} | |
/** | |
* Get mimetype of the enclosure | |
* | |
* @see get_real_type() | |
* @return string|null MIME type | |
*/ | |
public function get_type() | |
{ | |
} | |
/** | |
* Get the width | |
* | |
* @return string|null | |
*/ | |
public function get_width() | |
{ | |
} | |
/** | |
* Embed the enclosure using `<embed>` | |
* | |
* @deprecated Use the second parameter to {@see embed} instead | |
* | |
* @param array|string $options See first paramter to {@see embed} | |
* @return string HTML string to output | |
*/ | |
public function native_embed($options = '') | |
{ | |
} | |
/** | |
* Embed the enclosure using Javascript | |
* | |
* `$options` is an array or comma-separated key:value string, with the | |
* following properties: | |
* | |
* - `alt` (string): Alternate content for when an end-user does not have | |
* the appropriate handler installed or when a file type is | |
* unsupported. Can be any text or HTML. Defaults to blank. | |
* - `altclass` (string): If a file type is unsupported, the end-user will | |
* see the alt text (above) linked directly to the content. That link | |
* will have this value as its class name. Defaults to blank. | |
* - `audio` (string): This is an image that should be used as a | |
* placeholder for audio files before they're loaded (QuickTime-only). | |
* Can be any relative or absolute URL. Defaults to blank. | |
* - `bgcolor` (string): The background color for the media, if not | |
* already transparent. Defaults to `#ffffff`. | |
* - `height` (integer): The height of the embedded media. Accepts any | |
* numeric pixel value (such as `360`) or `auto`. Defaults to `auto`, | |
* and it is recommended that you use this default. | |
* - `loop` (boolean): Do you want the media to loop when its done? | |
* Defaults to `false`. | |
* - `mediaplayer` (string): The location of the included | |
* `mediaplayer.swf` file. This allows for the playback of Flash Video | |
* (`.flv`) files, and is the default handler for non-Odeo MP3's. | |
* Defaults to blank. | |
* - `video` (string): This is an image that should be used as a | |
* placeholder for video files before they're loaded (QuickTime-only). | |
* Can be any relative or absolute URL. Defaults to blank. | |
* - `width` (integer): The width of the embedded media. Accepts any | |
* numeric pixel value (such as `480`) or `auto`. Defaults to `auto`, | |
* and it is recommended that you use this default. | |
* - `widescreen` (boolean): Is the enclosure widescreen or standard? | |
* This applies only to video enclosures, and will automatically resize | |
* the content appropriately. Defaults to `false`, implying 4:3 mode. | |
* | |
* Note: Non-widescreen (4:3) mode with `width` and `height` set to `auto` | |
* will default to 480x360 video resolution. Widescreen (16:9) mode with | |
* `width` and `height` set to `auto` will default to 480x270 video resolution. | |
* | |
* @todo If the dimensions for media:content are defined, use them when width/height are set to 'auto'. | |
* @param array|string $options Comma-separated key:value list, or array | |
* @param bool $native Use `<embed>` | |
* @return string HTML string to output | |
*/ | |
public function embed($options = '', $native = \false) | |
{ | |
} | |
/** | |
* Get the real media type | |
* | |
* Often, feeds lie to us, necessitating a bit of deeper inspection. This | |
* converts types to their canonical representations based on the file | |
* extension | |
* | |
* @see get_type() | |
* @param bool $find_handler Internal use only, use {@see get_handler()} instead | |
* @return string MIME type | |
*/ | |
public function get_real_type($find_handler = \false) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.4-dev | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* General SimplePie exception class | |
* | |
* @package SimplePie | |
*/ | |
class SimplePie_Exception extends \Exception | |
{ | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Used for fetching remote files and reading local files | |
* | |
* Supports HTTP 1.0 via cURL or fsockopen, with spotty HTTP 1.1 support | |
* | |
* This class can be overloaded with {@see SimplePie::set_file_class()} | |
* | |
* @package SimplePie | |
* @subpackage HTTP | |
* @todo Move to properly supporting RFC2616 (HTTP/1.1) | |
*/ | |
class SimplePie_File | |
{ | |
var $url; | |
var $useragent; | |
var $success = \true; | |
var $headers = array(); | |
var $body; | |
var $status_code; | |
var $redirects = 0; | |
var $error; | |
var $method = \SIMPLEPIE_FILE_SOURCE_NONE; | |
public function __construct($url, $timeout = 10, $redirects = 5, $headers = \null, $useragent = \null, $force_fsockopen = \false) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* HTTP Response Parser | |
* | |
* @package SimplePie | |
* @subpackage HTTP | |
*/ | |
class SimplePie_HTTP_Parser | |
{ | |
/** | |
* HTTP Version | |
* | |
* @var float | |
*/ | |
public $http_version = 0.0; | |
/** | |
* Status code | |
* | |
* @var int | |
*/ | |
public $status_code = 0; | |
/** | |
* Reason phrase | |
* | |
* @var string | |
*/ | |
public $reason = ''; | |
/** | |
* Key/value pairs of the headers | |
* | |
* @var array | |
*/ | |
public $headers = array(); | |
/** | |
* Body of the response | |
* | |
* @var string | |
*/ | |
public $body = ''; | |
/** | |
* Current state of the state machine | |
* | |
* @var string | |
*/ | |
protected $state = 'http_version'; | |
/** | |
* Input data | |
* | |
* @var string | |
*/ | |
protected $data = ''; | |
/** | |
* Input data length (to avoid calling strlen() everytime this is needed) | |
* | |
* @var int | |
*/ | |
protected $data_length = 0; | |
/** | |
* Current position of the pointer | |
* | |
* @var int | |
*/ | |
protected $position = 0; | |
/** | |
* Name of the hedaer currently being parsed | |
* | |
* @var string | |
*/ | |
protected $name = ''; | |
/** | |
* Value of the hedaer currently being parsed | |
* | |
* @var string | |
*/ | |
protected $value = ''; | |
/** | |
* Create an instance of the class with the input data | |
* | |
* @param string $data Input data | |
*/ | |
public function __construct($data) | |
{ | |
} | |
/** | |
* Parse the input data | |
* | |
* @return bool true on success, false on failure | |
*/ | |
public function parse() | |
{ | |
} | |
/** | |
* Check whether there is data beyond the pointer | |
* | |
* @return bool true if there is further data, false if not | |
*/ | |
protected function has_data() | |
{ | |
} | |
/** | |
* See if the next character is LWS | |
* | |
* @return bool true if the next character is LWS, false if not | |
*/ | |
protected function is_linear_whitespace() | |
{ | |
} | |
/** | |
* Parse the HTTP version | |
*/ | |
protected function http_version() | |
{ | |
} | |
/** | |
* Parse the status code | |
*/ | |
protected function status() | |
{ | |
} | |
/** | |
* Parse the reason phrase | |
*/ | |
protected function reason() | |
{ | |
} | |
/** | |
* Deal with a new line, shifting data around as needed | |
*/ | |
protected function new_line() | |
{ | |
} | |
/** | |
* Parse a header name | |
*/ | |
protected function name() | |
{ | |
} | |
/** | |
* Parse LWS, replacing consecutive LWS characters with a single space | |
*/ | |
protected function linear_whitespace() | |
{ | |
} | |
/** | |
* See what state to move to while within non-quoted header values | |
*/ | |
protected function value() | |
{ | |
} | |
/** | |
* Parse a header value while outside quotes | |
*/ | |
protected function value_char() | |
{ | |
} | |
/** | |
* See what state to move to while within quoted header values | |
*/ | |
protected function quote() | |
{ | |
} | |
/** | |
* Parse a header value while within quotes | |
*/ | |
protected function quote_char() | |
{ | |
} | |
/** | |
* Parse an escaped character within quotes | |
*/ | |
protected function quote_escaped() | |
{ | |
} | |
/** | |
* Parse the body | |
*/ | |
protected function body() | |
{ | |
} | |
/** | |
* Parsed a "Transfer-Encoding: chunked" body | |
*/ | |
protected function chunked() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* IRI parser/serialiser/normaliser | |
* | |
* @package SimplePie | |
* @subpackage HTTP | |
* @author Geoffrey Sneddon | |
* @author Steve Minutillo | |
* @author Ryan McCue | |
* @copyright 2007-2012 Geoffrey Sneddon, Steve Minutillo, Ryan McCue | |
* @license http://www.opensource.org/licenses/bsd-license.php | |
*/ | |
class SimplePie_IRI | |
{ | |
/** | |
* Scheme | |
* | |
* @var string | |
*/ | |
protected $scheme = \null; | |
/** | |
* User Information | |
* | |
* @var string | |
*/ | |
protected $iuserinfo = \null; | |
/** | |
* ihost | |
* | |
* @var string | |
*/ | |
protected $ihost = \null; | |
/** | |
* Port | |
* | |
* @var string | |
*/ | |
protected $port = \null; | |
/** | |
* ipath | |
* | |
* @var string | |
*/ | |
protected $ipath = ''; | |
/** | |
* iquery | |
* | |
* @var string | |
*/ | |
protected $iquery = \null; | |
/** | |
* ifragment | |
* | |
* @var string | |
*/ | |
protected $ifragment = \null; | |
/** | |
* Normalization database | |
* | |
* Each key is the scheme, each value is an array with each key as the IRI | |
* part and value as the default value for that part. | |
*/ | |
protected $normalization = array('acap' => array('port' => 674), 'dict' => array('port' => 2628), 'file' => array('ihost' => 'localhost'), 'http' => array('port' => 80, 'ipath' => '/'), 'https' => array('port' => 443, 'ipath' => '/')); | |
/** | |
* Return the entire IRI when you try and read the object as a string | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Overload __set() to provide access via properties | |
* | |
* @param string $name Property name | |
* @param mixed $value Property value | |
*/ | |
public function __set($name, $value) | |
{ | |
} | |
/** | |
* Overload __get() to provide access via properties | |
* | |
* @param string $name Property name | |
* @return mixed | |
*/ | |
public function __get($name) | |
{ | |
} | |
/** | |
* Overload __isset() to provide access via properties | |
* | |
* @param string $name Property name | |
* @return bool | |
*/ | |
public function __isset($name) | |
{ | |
} | |
/** | |
* Overload __unset() to provide access via properties | |
* | |
* @param string $name Property name | |
*/ | |
public function __unset($name) | |
{ | |
} | |
/** | |
* Create a new IRI object, from a specified string | |
* | |
* @param string $iri | |
*/ | |
public function __construct($iri = \null) | |
{ | |
} | |
/** | |
* Create a new IRI object by resolving a relative IRI | |
* | |
* Returns false if $base is not absolute, otherwise an IRI. | |
* | |
* @param IRI|string $base (Absolute) Base IRI | |
* @param IRI|string $relative Relative IRI | |
* @return IRI|false | |
*/ | |
public static function absolutize($base, $relative) | |
{ | |
} | |
/** | |
* Parse an IRI into scheme/authority/path/query/fragment segments | |
* | |
* @param string $iri | |
* @return array | |
*/ | |
protected function parse_iri($iri) | |
{ | |
} | |
/** | |
* Remove dot segments from a path | |
* | |
* @param string $input | |
* @return string | |
*/ | |
protected function remove_dot_segments($input) | |
{ | |
} | |
/** | |
* Replace invalid character with percent encoding | |
* | |
* @param string $string Input string | |
* @param string $extra_chars Valid characters not in iunreserved or | |
* iprivate (this is ASCII-only) | |
* @param bool $iprivate Allow iprivate | |
* @return string | |
*/ | |
protected function replace_invalid_with_pct_encoding($string, $extra_chars, $iprivate = \false) | |
{ | |
} | |
/** | |
* Callback function for preg_replace_callback. | |
* | |
* Removes sequences of percent encoded bytes that represent UTF-8 | |
* encoded characters in iunreserved | |
* | |
* @param array $match PCRE match | |
* @return string Replacement | |
*/ | |
protected function remove_iunreserved_percent_encoded($match) | |
{ | |
} | |
protected function scheme_normalization() | |
{ | |
} | |
/** | |
* Check if the object represents a valid IRI. This needs to be done on each | |
* call as some things change depending on another part of the IRI. | |
* | |
* @return bool | |
*/ | |
public function is_valid() | |
{ | |
} | |
/** | |
* Set the entire IRI. Returns true on success, false on failure (if there | |
* are any invalid characters). | |
* | |
* @param string $iri | |
* @return bool | |
*/ | |
public function set_iri($iri) | |
{ | |
} | |
/** | |
* Set the scheme. Returns true on success, false on failure (if there are | |
* any invalid characters). | |
* | |
* @param string $scheme | |
* @return bool | |
*/ | |
public function set_scheme($scheme) | |
{ | |
} | |
/** | |
* Set the authority. Returns true on success, false on failure (if there are | |
* any invalid characters). | |
* | |
* @param string $authority | |
* @return bool | |
*/ | |
public function set_authority($authority) | |
{ | |
} | |
/** | |
* Set the iuserinfo. | |
* | |
* @param string $iuserinfo | |
* @return bool | |
*/ | |
public function set_userinfo($iuserinfo) | |
{ | |
} | |
/** | |
* Set the ihost. Returns true on success, false on failure (if there are | |
* any invalid characters). | |
* | |
* @param string $ihost | |
* @return bool | |
*/ | |
public function set_host($ihost) | |
{ | |
} | |
/** | |
* Set the port. Returns true on success, false on failure (if there are | |
* any invalid characters). | |
* | |
* @param string $port | |
* @return bool | |
*/ | |
public function set_port($port) | |
{ | |
} | |
/** | |
* Set the ipath. | |
* | |
* @param string $ipath | |
* @return bool | |
*/ | |
public function set_path($ipath) | |
{ | |
} | |
/** | |
* Set the iquery. | |
* | |
* @param string $iquery | |
* @return bool | |
*/ | |
public function set_query($iquery) | |
{ | |
} | |
/** | |
* Set the ifragment. | |
* | |
* @param string $ifragment | |
* @return bool | |
*/ | |
public function set_fragment($ifragment) | |
{ | |
} | |
/** | |
* Convert an IRI to a URI (or parts thereof) | |
* | |
* @return string | |
*/ | |
public function to_uri($string) | |
{ | |
} | |
/** | |
* Get the complete IRI | |
* | |
* @return string | |
*/ | |
public function get_iri() | |
{ | |
} | |
/** | |
* Get the complete URI | |
* | |
* @return string | |
*/ | |
public function get_uri() | |
{ | |
} | |
/** | |
* Get the complete iauthority | |
* | |
* @return string | |
*/ | |
protected function get_iauthority() | |
{ | |
} | |
/** | |
* Get the complete authority | |
* | |
* @return string | |
*/ | |
protected function get_authority() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Manages all item-related data | |
* | |
* Used by {@see SimplePie::get_item()} and {@see SimplePie::get_items()} | |
* | |
* This class can be overloaded with {@see SimplePie::set_item_class()} | |
* | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie_Item | |
{ | |
/** | |
* Parent feed | |
* | |
* @access private | |
* @var SimplePie | |
*/ | |
var $feed; | |
/** | |
* Raw data | |
* | |
* @access private | |
* @var array | |
*/ | |
var $data = array(); | |
/** | |
* Registry object | |
* | |
* @see set_registry | |
* @var SimplePie_Registry | |
*/ | |
protected $registry; | |
/** | |
* Create a new item object | |
* | |
* This is usually used by {@see SimplePie::get_items} and | |
* {@see SimplePie::get_item}. Avoid creating this manually. | |
* | |
* @param SimplePie $feed Parent feed | |
* @param array $data Raw data | |
*/ | |
public function __construct($feed, $data) | |
{ | |
} | |
/** | |
* Set the registry handler | |
* | |
* This is usually used by {@see SimplePie_Registry::create} | |
* | |
* @since 1.3 | |
* @param SimplePie_Registry $registry | |
*/ | |
public function set_registry(\SimplePie_Registry $registry) | |
{ | |
} | |
/** | |
* Get a string representation of the item | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Remove items that link back to this before destroying this object | |
*/ | |
public function __destruct() | |
{ | |
} | |
/** | |
* Get data for an item-level element | |
* | |
* This method allows you to get access to ANY element/attribute that is a | |
* sub-element of the item/entry tag. | |
* | |
* See {@see SimplePie::get_feed_tags()} for a description of the return value | |
* | |
* @since 1.0 | |
* @see http://simplepie.org/wiki/faq/supported_xml_namespaces | |
* @param string $namespace The URL of the XML namespace of the elements you're trying to access | |
* @param string $tag Tag name | |
* @return array | |
*/ | |
public function get_item_tags($namespace, $tag) | |
{ | |
} | |
/** | |
* Get the base URL value from the parent feed | |
* | |
* Uses `<xml:base>` | |
* | |
* @param array $element | |
* @return string | |
*/ | |
public function get_base($element = array()) | |
{ | |
} | |
/** | |
* Sanitize feed data | |
* | |
* @access private | |
* @see SimplePie::sanitize() | |
* @param string $data Data to sanitize | |
* @param int $type One of the SIMPLEPIE_CONSTRUCT_* constants | |
* @param string $base Base URL to resolve URLs against | |
* @return string Sanitized data | |
*/ | |
public function sanitize($data, $type, $base = '') | |
{ | |
} | |
/** | |
* Get the parent feed | |
* | |
* Note: this may not work as you think for multifeeds! | |
* | |
* @link http://simplepie.org/faq/typical_multifeed_gotchas#missing_data_from_feed | |
* @since 1.0 | |
* @return SimplePie | |
*/ | |
public function get_feed() | |
{ | |
} | |
/** | |
* Get the unique identifier for the item | |
* | |
* This is usually used when writing code to check for new items in a feed. | |
* | |
* Uses `<atom:id>`, `<guid>`, `<dc:identifier>` or the `about` attribute | |
* for RDF. If none of these are supplied (or `$hash` is true), creates an | |
* MD5 hash based on the permalink and title. If either of those are not | |
* supplied, creates a hash based on the full feed data. | |
* | |
* @since Beta 2 | |
* @param boolean $hash Should we force using a hash instead of the supplied ID? | |
* @return string | |
*/ | |
public function get_id($hash = \false) | |
{ | |
} | |
/** | |
* Get the title of the item | |
* | |
* Uses `<atom:title>`, `<title>` or `<dc:title>` | |
* | |
* @since Beta 2 (previously called `get_item_title` since 0.8) | |
* @return string|null | |
*/ | |
public function get_title() | |
{ | |
} | |
/** | |
* Get the content for the item | |
* | |
* Prefers summaries over full content , but will return full content if a | |
* summary does not exist. | |
* | |
* To prefer full content instead, use {@see get_content} | |
* | |
* Uses `<atom:summary>`, `<description>`, `<dc:description>` or | |
* `<itunes:subtitle>` | |
* | |
* @since 0.8 | |
* @param boolean $description_only Should we avoid falling back to the content? | |
* @return string|null | |
*/ | |
public function get_description($description_only = \false) | |
{ | |
} | |
/** | |
* Get the content for the item | |
* | |
* Prefers full content over summaries, but will return a summary if full | |
* content does not exist. | |
* | |
* To prefer summaries instead, use {@see get_description} | |
* | |
* Uses `<atom:content>` or `<content:encoded>` (RSS 1.0 Content Module) | |
* | |
* @since 1.0 | |
* @param boolean $content_only Should we avoid falling back to the description? | |
* @return string|null | |
*/ | |
public function get_content($content_only = \false) | |
{ | |
} | |
/** | |
* Get a category for the item | |
* | |
* @since Beta 3 (previously called `get_categories()` since Beta 2) | |
* @param int $key The category that you want to return. Remember that arrays begin with 0, not 1 | |
* @return SimplePie_Category|null | |
*/ | |
public function get_category($key = 0) | |
{ | |
} | |
/** | |
* Get all categories for the item | |
* | |
* Uses `<atom:category>`, `<category>` or `<dc:subject>` | |
* | |
* @since Beta 3 | |
* @return array|null List of {@see SimplePie_Category} objects | |
*/ | |
public function get_categories() | |
{ | |
} | |
/** | |
* Get an author for the item | |
* | |
* @since Beta 2 | |
* @param int $key The author that you want to return. Remember that arrays begin with 0, not 1 | |
* @return SimplePie_Author|null | |
*/ | |
public function get_author($key = 0) | |
{ | |
} | |
/** | |
* Get a contributor for the item | |
* | |
* @since 1.1 | |
* @param int $key The contrbutor that you want to return. Remember that arrays begin with 0, not 1 | |
* @return SimplePie_Author|null | |
*/ | |
public function get_contributor($key = 0) | |
{ | |
} | |
/** | |
* Get all contributors for the item | |
* | |
* Uses `<atom:contributor>` | |
* | |
* @since 1.1 | |
* @return array|null List of {@see SimplePie_Author} objects | |
*/ | |
public function get_contributors() | |
{ | |
} | |
/** | |
* Get all authors for the item | |
* | |
* Uses `<atom:author>`, `<author>`, `<dc:creator>` or `<itunes:author>` | |
* | |
* @since Beta 2 | |
* @return array|null List of {@see SimplePie_Author} objects | |
*/ | |
public function get_authors() | |
{ | |
} | |
/** | |
* Get the copyright info for the item | |
* | |
* Uses `<atom:rights>` or `<dc:rights>` | |
* | |
* @since 1.1 | |
* @return string | |
*/ | |
public function get_copyright() | |
{ | |
} | |
/** | |
* Get the posting date/time for the item | |
* | |
* Uses `<atom:published>`, `<atom:updated>`, `<atom:issued>`, | |
* `<atom:modified>`, `<pubDate>` or `<dc:date>` | |
* | |
* Note: obeys PHP's timezone setting. To get a UTC date/time, use | |
* {@see get_gmdate} | |
* | |
* @since Beta 2 (previously called `get_item_date` since 0.8) | |
* | |
* @param string $date_format Supports any PHP date format from {@see http://php.net/date} (empty for the raw data) | |
* @return int|string|null | |
*/ | |
public function get_date($date_format = 'j F Y, g:i a') | |
{ | |
} | |
/** | |
* Get the update date/time for the item | |
* | |
* Uses `<atom:updated>` | |
* | |
* Note: obeys PHP's timezone setting. To get a UTC date/time, use | |
* {@see get_gmdate} | |
* | |
* @param string $date_format Supports any PHP date format from {@see http://php.net/date} (empty for the raw data) | |
* @return int|string|null | |
*/ | |
public function get_updated_date($date_format = 'j F Y, g:i a') | |
{ | |
} | |
/** | |
* Get the localized posting date/time for the item | |
* | |
* Returns the date formatted in the localized language. To display in | |
* languages other than the server's default, you need to change the locale | |
* with {@link http://php.net/setlocale setlocale()}. The available | |
* localizations depend on which ones are installed on your web server. | |
* | |
* @since 1.0 | |
* | |
* @param string $date_format Supports any PHP date format from {@see http://php.net/strftime} (empty for the raw data) | |
* @return int|string|null | |
*/ | |
public function get_local_date($date_format = '%c') | |
{ | |
} | |
/** | |
* Get the posting date/time for the item (UTC time) | |
* | |
* @see get_date | |
* @param string $date_format Supports any PHP date format from {@see http://php.net/date} | |
* @return int|string|null | |
*/ | |
public function get_gmdate($date_format = 'j F Y, g:i a') | |
{ | |
} | |
/** | |
* Get the update date/time for the item (UTC time) | |
* | |
* @see get_updated_date | |
* @param string $date_format Supports any PHP date format from {@see http://php.net/date} | |
* @return int|string|null | |
*/ | |
public function get_updated_gmdate($date_format = 'j F Y, g:i a') | |
{ | |
} | |
/** | |
* Get the permalink for the item | |
* | |
* Returns the first link available with a relationship of "alternate". | |
* Identical to {@see get_link()} with key 0 | |
* | |
* @see get_link | |
* @since 0.8 | |
* @return string|null Permalink URL | |
*/ | |
public function get_permalink() | |
{ | |
} | |
/** | |
* Get a single link for the item | |
* | |
* @since Beta 3 | |
* @param int $key The link that you want to return. Remember that arrays begin with 0, not 1 | |
* @param string $rel The relationship of the link to return | |
* @return string|null Link URL | |
*/ | |
public function get_link($key = 0, $rel = 'alternate') | |
{ | |
} | |
/** | |
* Get all links for the item | |
* | |
* Uses `<atom:link>`, `<link>` or `<guid>` | |
* | |
* @since Beta 2 | |
* @param string $rel The relationship of links to return | |
* @return array|null Links found for the item (strings) | |
*/ | |
public function get_links($rel = 'alternate') | |
{ | |
} | |
/** | |
* Get an enclosure from the item | |
* | |
* Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS. | |
* | |
* @since Beta 2 | |
* @todo Add ability to prefer one type of content over another (in a media group). | |
* @param int $key The enclosure that you want to return. Remember that arrays begin with 0, not 1 | |
* @return SimplePie_Enclosure|null | |
*/ | |
public function get_enclosure($key = 0, $prefer = \null) | |
{ | |
} | |
/** | |
* Get all available enclosures (podcasts, etc.) | |
* | |
* Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS. | |
* | |
* At this point, we're pretty much assuming that all enclosures for an item | |
* are the same content. Anything else is too complicated to | |
* properly support. | |
* | |
* @since Beta 2 | |
* @todo Add support for end-user defined sorting of enclosures by type/handler (so we can prefer the faster-loading FLV over MP4). | |
* @todo If an element exists at a level, but it's value is empty, we should fall back to the value from the parent (if it exists). | |
* @return array|null List of SimplePie_Enclosure items | |
*/ | |
public function get_enclosures() | |
{ | |
} | |
/** | |
* Get the latitude coordinates for the item | |
* | |
* Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications | |
* | |
* Uses `<geo:lat>` or `<georss:point>` | |
* | |
* @since 1.0 | |
* @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo | |
* @link http://www.georss.org/ GeoRSS | |
* @return string|null | |
*/ | |
public function get_latitude() | |
{ | |
} | |
/** | |
* Get the longitude coordinates for the item | |
* | |
* Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications | |
* | |
* Uses `<geo:long>`, `<geo:lon>` or `<georss:point>` | |
* | |
* @since 1.0 | |
* @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo | |
* @link http://www.georss.org/ GeoRSS | |
* @return string|null | |
*/ | |
public function get_longitude() | |
{ | |
} | |
/** | |
* Get the `<atom:source>` for the item | |
* | |
* @since 1.1 | |
* @return SimplePie_Source|null | |
*/ | |
public function get_source() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Used for feed auto-discovery | |
* | |
* | |
* This class can be overloaded with {@see SimplePie::set_locator_class()} | |
* | |
* @package SimplePie | |
*/ | |
class SimplePie_Locator | |
{ | |
var $useragent; | |
var $timeout; | |
var $file; | |
var $local = array(); | |
var $elsewhere = array(); | |
var $cached_entities = array(); | |
var $http_base; | |
var $base; | |
var $base_location = 0; | |
var $checked_feeds = 0; | |
var $max_checked_feeds = 10; | |
protected $registry; | |
public function __construct(\SimplePie_File $file, $timeout = 10, $useragent = \null, $max_checked_feeds = 10) | |
{ | |
} | |
public function set_registry(\SimplePie_Registry $registry) | |
{ | |
} | |
public function find($type = \SIMPLEPIE_LOCATOR_ALL, &$working) | |
{ | |
} | |
public function is_feed($file) | |
{ | |
} | |
public function get_base() | |
{ | |
} | |
public function autodiscovery() | |
{ | |
} | |
protected function search_elements_by_tag($name, &$done, $feeds) | |
{ | |
} | |
public function get_links() | |
{ | |
} | |
public function extension(&$array) | |
{ | |
} | |
public function body(&$array) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Miscellanous utilities | |
* | |
* @package SimplePie | |
*/ | |
class SimplePie_Misc | |
{ | |
public static function time_hms($seconds) | |
{ | |
} | |
public static function absolutize_url($relative, $base) | |
{ | |
} | |
/** | |
* Get a HTML/XML element from a HTML string | |
* | |
* @deprecated Use DOMDocument instead (parsing HTML with regex is bad!) | |
* @param string $realname Element name (including namespace prefix if applicable) | |
* @param string $string HTML document | |
* @return array | |
*/ | |
public static function get_element($realname, $string) | |
{ | |
} | |
public static function element_implode($element) | |
{ | |
} | |
public static function error($message, $level, $file, $line) | |
{ | |
} | |
public static function fix_protocol($url, $http = 1) | |
{ | |
} | |
public static function parse_url($url) | |
{ | |
} | |
public static function compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '') | |
{ | |
} | |
public static function normalize_url($url) | |
{ | |
} | |
public static function percent_encoding_normalization($match) | |
{ | |
} | |
/** | |
* Converts a Windows-1252 encoded string to a UTF-8 encoded string | |
* | |
* @static | |
* @param string $string Windows-1252 encoded string | |
* @return string UTF-8 encoded string | |
*/ | |
public static function windows_1252_to_utf8($string) | |
{ | |
} | |
/** | |
* Change a string from one encoding to another | |
* | |
* @param string $data Raw data in $input encoding | |
* @param string $input Encoding of $data | |
* @param string $output Encoding you want | |
* @return string|boolean False if we can't convert it | |
*/ | |
public static function change_encoding($data, $input, $output) | |
{ | |
} | |
protected static function change_encoding_mbstring($data, $input, $output) | |
{ | |
} | |
protected static function change_encoding_iconv($data, $input, $output) | |
{ | |
} | |
/** | |
* Normalize an encoding name | |
* | |
* This is automatically generated by create.php | |
* | |
* To generate it, run `php create.php` on the command line, and copy the | |
* output to replace this function. | |
* | |
* @param string $charset Character set to standardise | |
* @return string Standardised name | |
*/ | |
public static function encoding($charset) | |
{ | |
} | |
public static function get_curl_version() | |
{ | |
} | |
/** | |
* Strip HTML comments | |
* | |
* @param string $data Data to strip comments from | |
* @return string Comment stripped string | |
*/ | |
public static function strip_comments($data) | |
{ | |
} | |
public static function parse_date($dt) | |
{ | |
} | |
/** | |
* Decode HTML entities | |
* | |
* @deprecated Use DOMDocument instead | |
* @param string $data Input data | |
* @return string Output data | |
*/ | |
public static function entities_decode($data) | |
{ | |
} | |
/** | |
* Remove RFC822 comments | |
* | |
* @param string $data Data to strip comments from | |
* @return string Comment stripped string | |
*/ | |
public static function uncomment_rfc822($string) | |
{ | |
} | |
public static function parse_mime($mime) | |
{ | |
} | |
public static function atom_03_construct_type($attribs) | |
{ | |
} | |
public static function atom_10_construct_type($attribs) | |
{ | |
} | |
public static function atom_10_content_construct_type($attribs) | |
{ | |
} | |
public static function is_isegment_nz_nc($string) | |
{ | |
} | |
public static function space_seperated_tokens($string) | |
{ | |
} | |
/** | |
* Converts a unicode codepoint to a UTF-8 character | |
* | |
* @static | |
* @param int $codepoint Unicode codepoint | |
* @return string UTF-8 character | |
*/ | |
public static function codepoint_to_utf8($codepoint) | |
{ | |
} | |
/** | |
* Similar to parse_str() | |
* | |
* Returns an associative array of name/value pairs, where the value is an | |
* array of values that have used the same name | |
* | |
* @static | |
* @param string $str The input string. | |
* @return array | |
*/ | |
public static function parse_str($str) | |
{ | |
} | |
/** | |
* Detect XML encoding, as per XML 1.0 Appendix F.1 | |
* | |
* @todo Add support for EBCDIC | |
* @param string $data XML data | |
* @param SimplePie_Registry $registry Class registry | |
* @return array Possible encodings | |
*/ | |
public static function xml_encoding($data, $registry) | |
{ | |
} | |
public static function output_javascript() | |
{ | |
} | |
/** | |
* Get the SimplePie build timestamp | |
* | |
* Uses the git index if it exists, otherwise uses the modification time | |
* of the newest file. | |
*/ | |
public static function get_build() | |
{ | |
} | |
/** | |
* Format debugging information | |
*/ | |
public static function debug(&$sp) | |
{ | |
} | |
public static function silence_errors($num, $str) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Class to validate and to work with IPv6 addresses. | |
* | |
* @package SimplePie | |
* @subpackage HTTP | |
* @copyright 2003-2005 The PHP Group | |
* @license http://www.opensource.org/licenses/bsd-license.php | |
* @link http://pear.php.net/package/Net_IPv6 | |
* @author Alexander Merz <alexander.merz@web.de> | |
* @author elfrink at introweb dot nl | |
* @author Josh Peck <jmp at joshpeck dot org> | |
* @author Geoffrey Sneddon <geoffers@gmail.com> | |
*/ | |
class SimplePie_Net_IPv6 | |
{ | |
/** | |
* Uncompresses an IPv6 address | |
* | |
* RFC 4291 allows you to compress concecutive zero pieces in an address to | |
* '::'. This method expects a valid IPv6 address and expands the '::' to | |
* the required number of zero pieces. | |
* | |
* Example: FF01::101 -> FF01:0:0:0:0:0:0:101 | |
* ::1 -> 0:0:0:0:0:0:0:1 | |
* | |
* @author Alexander Merz <alexander.merz@web.de> | |
* @author elfrink at introweb dot nl | |
* @author Josh Peck <jmp at joshpeck dot org> | |
* @copyright 2003-2005 The PHP Group | |
* @license http://www.opensource.org/licenses/bsd-license.php | |
* @param string $ip An IPv6 address | |
* @return string The uncompressed IPv6 address | |
*/ | |
public static function uncompress($ip) | |
{ | |
} | |
/** | |
* Compresses an IPv6 address | |
* | |
* RFC 4291 allows you to compress concecutive zero pieces in an address to | |
* '::'. This method expects a valid IPv6 address and compresses consecutive | |
* zero pieces to '::'. | |
* | |
* Example: FF01:0:0:0:0:0:0:101 -> FF01::101 | |
* 0:0:0:0:0:0:0:1 -> ::1 | |
* | |
* @see uncompress() | |
* @param string $ip An IPv6 address | |
* @return string The compressed IPv6 address | |
*/ | |
public static function compress($ip) | |
{ | |
} | |
/** | |
* Splits an IPv6 address into the IPv6 and IPv4 representation parts | |
* | |
* RFC 4291 allows you to represent the last two parts of an IPv6 address | |
* using the standard IPv4 representation | |
* | |
* Example: 0:0:0:0:0:0:13.1.68.3 | |
* 0:0:0:0:0:FFFF:129.144.52.38 | |
* | |
* @param string $ip An IPv6 address | |
* @return array [0] contains the IPv6 represented part, and [1] the IPv4 represented part | |
*/ | |
private static function split_v6_v4($ip) | |
{ | |
} | |
/** | |
* Checks an IPv6 address | |
* | |
* Checks if the given IP is a valid IPv6 address | |
* | |
* @param string $ip An IPv6 address | |
* @return bool true if $ip is a valid IPv6 address | |
*/ | |
public static function check_ipv6($ip) | |
{ | |
} | |
/** | |
* Checks if the given IP is a valid IPv6 address | |
* | |
* @codeCoverageIgnore | |
* @deprecated Use {@see SimplePie_Net_IPv6::check_ipv6()} instead | |
* @see check_ipv6 | |
* @param string $ip An IPv6 address | |
* @return bool true if $ip is a valid IPv6 address | |
*/ | |
public static function checkIPv6($ip) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Date Parser | |
* | |
* @package SimplePie | |
* @subpackage Parsing | |
*/ | |
class SimplePie_Parse_Date | |
{ | |
/** | |
* Input data | |
* | |
* @access protected | |
* @var string | |
*/ | |
var $date; | |
/** | |
* List of days, calendar day name => ordinal day number in the week | |
* | |
* @access protected | |
* @var array | |
*/ | |
var $day = array( | |
// English | |
'mon' => 1, | |
'monday' => 1, | |
'tue' => 2, | |
'tuesday' => 2, | |
'wed' => 3, | |
'wednesday' => 3, | |
'thu' => 4, | |
'thursday' => 4, | |
'fri' => 5, | |
'friday' => 5, | |
'sat' => 6, | |
'saturday' => 6, | |
'sun' => 7, | |
'sunday' => 7, | |
// Dutch | |
'maandag' => 1, | |
'dinsdag' => 2, | |
'woensdag' => 3, | |
'donderdag' => 4, | |
'vrijdag' => 5, | |
'zaterdag' => 6, | |
'zondag' => 7, | |
// French | |
'lundi' => 1, | |
'mardi' => 2, | |
'mercredi' => 3, | |
'jeudi' => 4, | |
'vendredi' => 5, | |
'samedi' => 6, | |
'dimanche' => 7, | |
// German | |
'montag' => 1, | |
'dienstag' => 2, | |
'mittwoch' => 3, | |
'donnerstag' => 4, | |
'freitag' => 5, | |
'samstag' => 6, | |
'sonnabend' => 6, | |
'sonntag' => 7, | |
// Italian | |
'lunedì' => 1, | |
'martedì' => 2, | |
'mercoledì' => 3, | |
'giovedì' => 4, | |
'venerdì' => 5, | |
'sabato' => 6, | |
'domenica' => 7, | |
// Spanish | |
'lunes' => 1, | |
'martes' => 2, | |
'miércoles' => 3, | |
'jueves' => 4, | |
'viernes' => 5, | |
'sábado' => 6, | |
'domingo' => 7, | |
// Finnish | |
'maanantai' => 1, | |
'tiistai' => 2, | |
'keskiviikko' => 3, | |
'torstai' => 4, | |
'perjantai' => 5, | |
'lauantai' => 6, | |
'sunnuntai' => 7, | |
// Hungarian | |
'hétfő' => 1, | |
'kedd' => 2, | |
'szerda' => 3, | |
'csütörtok' => 4, | |
'péntek' => 5, | |
'szombat' => 6, | |
'vasárnap' => 7, | |
// Greek | |
'Δευ' => 1, | |
'Τρι' => 2, | |
'Τετ' => 3, | |
'Πεμ' => 4, | |
'Παρ' => 5, | |
'Σαβ' => 6, | |
'Κυρ' => 7, | |
); | |
/** | |
* List of months, calendar month name => calendar month number | |
* | |
* @access protected | |
* @var array | |
*/ | |
var $month = array( | |
// English | |
'jan' => 1, | |
'january' => 1, | |
'feb' => 2, | |
'february' => 2, | |
'mar' => 3, | |
'march' => 3, | |
'apr' => 4, | |
'april' => 4, | |
'may' => 5, | |
// No long form of May | |
'jun' => 6, | |
'june' => 6, | |
'jul' => 7, | |
'july' => 7, | |
'aug' => 8, | |
'august' => 8, | |
'sep' => 9, | |
'september' => 8, | |
'oct' => 10, | |
'october' => 10, | |
'nov' => 11, | |
'november' => 11, | |
'dec' => 12, | |
'december' => 12, | |
// Dutch | |
'januari' => 1, | |
'februari' => 2, | |
'maart' => 3, | |
'april' => 4, | |
'mei' => 5, | |
'juni' => 6, | |
'juli' => 7, | |
'augustus' => 8, | |
'september' => 9, | |
'oktober' => 10, | |
'november' => 11, | |
'december' => 12, | |
// French | |
'janvier' => 1, | |
'février' => 2, | |
'mars' => 3, | |
'avril' => 4, | |
'mai' => 5, | |
'juin' => 6, | |
'juillet' => 7, | |
'août' => 8, | |
'septembre' => 9, | |
'octobre' => 10, | |
'novembre' => 11, | |
'décembre' => 12, | |
// German | |
'januar' => 1, | |
'februar' => 2, | |
'märz' => 3, | |
'april' => 4, | |
'mai' => 5, | |
'juni' => 6, | |
'juli' => 7, | |
'august' => 8, | |
'september' => 9, | |
'oktober' => 10, | |
'november' => 11, | |
'dezember' => 12, | |
// Italian | |
'gennaio' => 1, | |
'febbraio' => 2, | |
'marzo' => 3, | |
'aprile' => 4, | |
'maggio' => 5, | |
'giugno' => 6, | |
'luglio' => 7, | |
'agosto' => 8, | |
'settembre' => 9, | |
'ottobre' => 10, | |
'novembre' => 11, | |
'dicembre' => 12, | |
// Spanish | |
'enero' => 1, | |
'febrero' => 2, | |
'marzo' => 3, | |
'abril' => 4, | |
'mayo' => 5, | |
'junio' => 6, | |
'julio' => 7, | |
'agosto' => 8, | |
'septiembre' => 9, | |
'setiembre' => 9, | |
'octubre' => 10, | |
'noviembre' => 11, | |
'diciembre' => 12, | |
// Finnish | |
'tammikuu' => 1, | |
'helmikuu' => 2, | |
'maaliskuu' => 3, | |
'huhtikuu' => 4, | |
'toukokuu' => 5, | |
'kesäkuu' => 6, | |
'heinäkuu' => 7, | |
'elokuu' => 8, | |
'suuskuu' => 9, | |
'lokakuu' => 10, | |
'marras' => 11, | |
'joulukuu' => 12, | |
// Hungarian | |
'január' => 1, | |
'február' => 2, | |
'március' => 3, | |
'április' => 4, | |
'május' => 5, | |
'június' => 6, | |
'július' => 7, | |
'augusztus' => 8, | |
'szeptember' => 9, | |
'október' => 10, | |
'november' => 11, | |
'december' => 12, | |
// Greek | |
'Ιαν' => 1, | |
'Φεβ' => 2, | |
'Μάώ' => 3, | |
'Μαώ' => 3, | |
'Απρ' => 4, | |
'Μάι' => 5, | |
'Μαϊ' => 5, | |
'Μαι' => 5, | |
'Ιούν' => 6, | |
'Ιον' => 6, | |
'Ιούλ' => 7, | |
'Ιολ' => 7, | |
'Αύγ' => 8, | |
'Αυγ' => 8, | |
'Σεπ' => 9, | |
'Οκτ' => 10, | |
'Νοέ' => 11, | |
'Δεκ' => 12, | |
); | |
/** | |
* List of timezones, abbreviation => offset from UTC | |
* | |
* @access protected | |
* @var array | |
*/ | |
var $timezone = array('ACDT' => 37800, 'ACIT' => 28800, 'ACST' => 34200, 'ACT' => -18000, 'ACWDT' => 35100, 'ACWST' => 31500, 'AEDT' => 39600, 'AEST' => 36000, 'AFT' => 16200, 'AKDT' => -28800, 'AKST' => -32400, 'AMDT' => 18000, 'AMT' => -14400, 'ANAST' => 46800, 'ANAT' => 43200, 'ART' => -10800, 'AZOST' => -3600, 'AZST' => 18000, 'AZT' => 14400, 'BIOT' => 21600, 'BIT' => -43200, 'BOT' => -14400, 'BRST' => -7200, 'BRT' => -10800, 'BST' => 3600, 'BTT' => 21600, 'CAST' => 18000, 'CAT' => 7200, 'CCT' => 23400, 'CDT' => -18000, 'CEDT' => 7200, 'CEST' => 7200, 'CET' => 3600, 'CGST' => -7200, 'CGT' => -10800, 'CHADT' => 49500, 'CHAST' => 45900, 'CIST' => -28800, 'CKT' => -36000, 'CLDT' => -10800, 'CLST' => -14400, 'COT' => -18000, 'CST' => -21600, 'CVT' => -3600, 'CXT' => 25200, 'DAVT' => 25200, 'DTAT' => 36000, 'EADT' => -18000, 'EAST' => -21600, 'EAT' => 10800, 'ECT' => -18000, 'EDT' => -14400, 'EEST' => 10800, 'EET' => 7200, 'EGT' => -3600, 'EKST' => 21600, 'EST' => -18000, 'FJT' => 43200, 'FKDT' => -10800, 'FKST' => -14400, 'FNT' => -7200, 'GALT' => -21600, 'GEDT' => 14400, 'GEST' => 10800, 'GFT' => -10800, 'GILT' => 43200, 'GIT' => -32400, 'GST' => 14400, 'GST' => -7200, 'GYT' => -14400, 'HAA' => -10800, 'HAC' => -18000, 'HADT' => -32400, 'HAE' => -14400, 'HAP' => -25200, 'HAR' => -21600, 'HAST' => -36000, 'HAT' => -9000, 'HAY' => -28800, 'HKST' => 28800, 'HMT' => 18000, 'HNA' => -14400, 'HNC' => -21600, 'HNE' => -18000, 'HNP' => -28800, 'HNR' => -25200, 'HNT' => -12600, 'HNY' => -32400, 'IRDT' => 16200, 'IRKST' => 32400, 'IRKT' => 28800, 'IRST' => 12600, 'JFDT' => -10800, 'JFST' => -14400, 'JST' => 32400, 'KGST' => 21600, 'KGT' => 18000, 'KOST' => 39600, 'KOVST' => 28800, 'KOVT' => 25200, 'KRAST' => 28800, 'KRAT' => 25200, 'KST' => 32400, 'LHDT' => 39600, 'LHST' => 37800, 'LINT' => 50400, 'LKT' => 21600, 'MAGST' => 43200, 'MAGT' => 39600, 'MAWT' => 21600, 'MDT' => -21600, 'MESZ' => 7200, 'MEZ' => 3600, 'MHT' => 43200, 'MIT' => -34200, 'MNST' => 32400, 'MSDT' => 14400, 'MSST' => 10800, 'MST' => -25200, 'MUT' => 14400, 'MVT' => 18000, 'MYT' => 28800, 'NCT' => 39600, 'NDT' => -9000, 'NFT' => 41400, 'NMIT' => 36000, 'NOVST' => 25200, 'NOVT' => 21600, 'NPT' => 20700, 'NRT' => 43200, 'NST' => -12600, 'NUT' => -39600, 'NZDT' => 46800, 'NZST' => 43200, 'OMSST' => 25200, 'OMST' => 21600, 'PDT' => -25200, 'PET' => -18000, 'PETST' => 46800, 'PETT' => 43200, 'PGT' => 36000, 'PHOT' => 46800, 'PHT' => 28800, 'PKT' => 18000, 'PMDT' => -7200, 'PMST' => -10800, 'PONT' => 39600, 'PST' => -28800, 'PWT' => 32400, 'PYST' => -10800, 'PYT' => -14400, 'RET' => 14400, 'ROTT' => -10800, 'SAMST' => 18000, 'SAMT' => 14400, 'SAST' => 7200, 'SBT' => 39600, 'SCDT' => 46800, 'SCST' => 43200, 'SCT' => 14400, 'SEST' => 3600, 'SGT' => 28800, 'SIT' => 28800, 'SRT' => -10800, 'SST' => -39600, 'SYST' => 10800, 'SYT' => 7200, 'TFT' => 18000, 'THAT' => -36000, 'TJT' => 18000, 'TKT' => -36000, 'TMT' => 18000, 'TOT' => 46800, 'TPT' => 32400, 'TRUT' => 36000, 'TVT' => 43200, 'TWT' => 28800, 'UYST' => -7200, 'UYT' => -10800, 'UZT' => 18000, 'VET' => -14400, 'VLAST' => 39600, 'VLAT' => 36000, 'VOST' => 21600, 'VUT' => 39600, 'WAST' => 7200, 'WAT' => 3600, 'WDT' => 32400, 'WEST' => 3600, 'WFT' => 43200, 'WIB' => 25200, 'WIT' => 32400, 'WITA' => 28800, 'WKST' => 18000, 'WST' => 28800, 'YAKST' => 36000, 'YAKT' => 32400, 'YAPT' => 36000, 'YEKST' => 21600, 'YEKT' => 18000); | |
/** | |
* Cached PCRE for SimplePie_Parse_Date::$day | |
* | |
* @access protected | |
* @var string | |
*/ | |
var $day_pcre; | |
/** | |
* Cached PCRE for SimplePie_Parse_Date::$month | |
* | |
* @access protected | |
* @var string | |
*/ | |
var $month_pcre; | |
/** | |
* Array of user-added callback methods | |
* | |
* @access private | |
* @var array | |
*/ | |
var $built_in = array(); | |
/** | |
* Array of user-added callback methods | |
* | |
* @access private | |
* @var array | |
*/ | |
var $user = array(); | |
/** | |
* Create new SimplePie_Parse_Date object, and set self::day_pcre, | |
* self::month_pcre, and self::built_in | |
* | |
* @access private | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Get the object | |
* | |
* @access public | |
*/ | |
public static function get() | |
{ | |
} | |
/** | |
* Parse a date | |
* | |
* @final | |
* @access public | |
* @param string $date Date to parse | |
* @return int Timestamp corresponding to date string, or false on failure | |
*/ | |
public function parse($date) | |
{ | |
} | |
/** | |
* Add a callback method to parse a date | |
* | |
* @final | |
* @access public | |
* @param callable $callback | |
*/ | |
public function add_callback($callback) | |
{ | |
} | |
/** | |
* Parse a superset of W3C-DTF (allows hyphens and colons to be omitted, as | |
* well as allowing any of upper or lower case "T", horizontal tabs, or | |
* spaces to be used as the time seperator (including more than one)) | |
* | |
* @access protected | |
* @return int Timestamp | |
*/ | |
public function date_w3cdtf($date) | |
{ | |
} | |
/** | |
* Remove RFC822 comments | |
* | |
* @access protected | |
* @param string $data Data to strip comments from | |
* @return string Comment stripped string | |
*/ | |
public function remove_rfc2822_comments($string) | |
{ | |
} | |
/** | |
* Parse RFC2822's date format | |
* | |
* @access protected | |
* @return int Timestamp | |
*/ | |
public function date_rfc2822($date) | |
{ | |
} | |
/** | |
* Parse RFC850's date format | |
* | |
* @access protected | |
* @return int Timestamp | |
*/ | |
public function date_rfc850($date) | |
{ | |
} | |
/** | |
* Parse C99's asctime()'s date format | |
* | |
* @access protected | |
* @return int Timestamp | |
*/ | |
public function date_asctime($date) | |
{ | |
} | |
/** | |
* Parse dates using strtotime() | |
* | |
* @access protected | |
* @return int Timestamp | |
*/ | |
public function date_strtotime($date) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Parses XML into something sane | |
* | |
* | |
* This class can be overloaded with {@see SimplePie::set_parser_class()} | |
* | |
* @package SimplePie | |
* @subpackage Parsing | |
*/ | |
class SimplePie_Parser | |
{ | |
var $error_code; | |
var $error_string; | |
var $current_line; | |
var $current_column; | |
var $current_byte; | |
var $separator = ' '; | |
var $namespace = array(''); | |
var $element = array(''); | |
var $xml_base = array(''); | |
var $xml_base_explicit = array(\false); | |
var $xml_lang = array(''); | |
var $data = array(); | |
var $datas = array(array()); | |
var $current_xhtml_construct = -1; | |
var $encoding; | |
protected $registry; | |
public function set_registry(\SimplePie_Registry $registry) | |
{ | |
} | |
public function parse(&$data, $encoding) | |
{ | |
} | |
public function get_error_code() | |
{ | |
} | |
public function get_error_string() | |
{ | |
} | |
public function get_current_line() | |
{ | |
} | |
public function get_current_column() | |
{ | |
} | |
public function get_current_byte() | |
{ | |
} | |
public function get_data() | |
{ | |
} | |
public function tag_open($parser, $tag, $attributes) | |
{ | |
} | |
public function cdata($parser, $cdata) | |
{ | |
} | |
public function tag_close($parser, $tag) | |
{ | |
} | |
public function split_ns($string) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Handles `<media:rating>` or `<itunes:explicit>` tags as defined in Media RSS and iTunes RSS respectively | |
* | |
* Used by {@see SimplePie_Enclosure::get_rating()} and {@see SimplePie_Enclosure::get_ratings()} | |
* | |
* This class can be overloaded with {@see SimplePie::set_rating_class()} | |
* | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie_Rating | |
{ | |
/** | |
* Rating scheme | |
* | |
* @var string | |
* @see get_scheme() | |
*/ | |
var $scheme; | |
/** | |
* Rating value | |
* | |
* @var string | |
* @see get_value() | |
*/ | |
var $value; | |
/** | |
* Constructor, used to input the data | |
* | |
* For documentation on all the parameters, see the corresponding | |
* properties and their accessors | |
*/ | |
public function __construct($scheme = \null, $value = \null) | |
{ | |
} | |
/** | |
* String-ified version | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Get the organizational scheme for the rating | |
* | |
* @return string|null | |
*/ | |
public function get_scheme() | |
{ | |
} | |
/** | |
* Get the value of the rating | |
* | |
* @return string|null | |
*/ | |
public function get_value() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Handles creating objects and calling methods | |
* | |
* Access this via {@see SimplePie::get_registry()} | |
* | |
* @package SimplePie | |
*/ | |
class SimplePie_Registry | |
{ | |
/** | |
* Default class mapping | |
* | |
* Overriding classes *must* subclass these. | |
* | |
* @var array | |
*/ | |
protected $default = array('Cache' => 'SimplePie_Cache', 'Locator' => 'SimplePie_Locator', 'Parser' => 'SimplePie_Parser', 'File' => 'SimplePie_File', 'Sanitize' => 'SimplePie_Sanitize', 'Item' => 'SimplePie_Item', 'Author' => 'SimplePie_Author', 'Category' => 'SimplePie_Category', 'Enclosure' => 'SimplePie_Enclosure', 'Caption' => 'SimplePie_Caption', 'Copyright' => 'SimplePie_Copyright', 'Credit' => 'SimplePie_Credit', 'Rating' => 'SimplePie_Rating', 'Restriction' => 'SimplePie_Restriction', 'Content_Type_Sniffer' => 'SimplePie_Content_Type_Sniffer', 'Source' => 'SimplePie_Source', 'Misc' => 'SimplePie_Misc', 'XML_Declaration_Parser' => 'SimplePie_XML_Declaration_Parser', 'Parse_Date' => 'SimplePie_Parse_Date'); | |
/** | |
* Class mapping | |
* | |
* @see register() | |
* @var array | |
*/ | |
protected $classes = array(); | |
/** | |
* Legacy classes | |
* | |
* @see register() | |
* @var array | |
*/ | |
protected $legacy = array(); | |
/** | |
* Constructor | |
* | |
* No-op | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Register a class | |
* | |
* @param string $type See {@see $default} for names | |
* @param string $class Class name, must subclass the corresponding default | |
* @param bool $legacy Whether to enable legacy support for this class | |
* @return bool Successfulness | |
*/ | |
public function register($type, $class, $legacy = \false) | |
{ | |
} | |
/** | |
* Get the class registered for a type | |
* | |
* Where possible, use {@see create()} or {@see call()} instead | |
* | |
* @param string $type | |
* @return string|null | |
*/ | |
public function get_class($type) | |
{ | |
} | |
/** | |
* Create a new instance of a given type | |
* | |
* @param string $type | |
* @param array $parameters Parameters to pass to the constructor | |
* @return object Instance of class | |
*/ | |
public function &create($type, $parameters = array()) | |
{ | |
} | |
/** | |
* Call a static method for a type | |
* | |
* @param string $type | |
* @param string $method | |
* @param array $parameters | |
* @return mixed | |
*/ | |
public function &call($type, $method, $parameters = array()) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Handles `<media:restriction>` as defined in Media RSS | |
* | |
* Used by {@see SimplePie_Enclosure::get_restriction()} and {@see SimplePie_Enclosure::get_restrictions()} | |
* | |
* This class can be overloaded with {@see SimplePie::set_restriction_class()} | |
* | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie_Restriction | |
{ | |
/** | |
* Relationship ('allow'/'deny') | |
* | |
* @var string | |
* @see get_relationship() | |
*/ | |
var $relationship; | |
/** | |
* Type of restriction | |
* | |
* @var string | |
* @see get_type() | |
*/ | |
var $type; | |
/** | |
* Restricted values | |
* | |
* @var string | |
* @see get_value() | |
*/ | |
var $value; | |
/** | |
* Constructor, used to input the data | |
* | |
* For documentation on all the parameters, see the corresponding | |
* properties and their accessors | |
*/ | |
public function __construct($relationship = \null, $type = \null, $value = \null) | |
{ | |
} | |
/** | |
* String-ified version | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
} | |
/** | |
* Get the relationship | |
* | |
* @return string|null Either 'allow' or 'deny' | |
*/ | |
public function get_relationship() | |
{ | |
} | |
/** | |
* Get the type | |
* | |
* @return string|null | |
*/ | |
public function get_type() | |
{ | |
} | |
/** | |
* Get the list of restricted things | |
* | |
* @return string|null | |
*/ | |
public function get_value() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Used for data cleanup and post-processing | |
* | |
* | |
* This class can be overloaded with {@see SimplePie::set_sanitize_class()} | |
* | |
* @package SimplePie | |
* @todo Move to using an actual HTML parser (this will allow tags to be properly stripped, and to switch between HTML and XHTML), this will also make it easier to shorten a string while preserving HTML tags | |
*/ | |
class SimplePie_Sanitize | |
{ | |
// Private vars | |
var $base; | |
// Options | |
var $remove_div = \true; | |
var $image_handler = ''; | |
var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'); | |
var $encode_instead_of_strip = \false; | |
var $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'); | |
var $strip_comments = \false; | |
var $output_encoding = 'UTF-8'; | |
var $enable_cache = \true; | |
var $cache_location = './cache'; | |
var $cache_name_function = 'md5'; | |
var $timeout = 10; | |
var $useragent = ''; | |
var $force_fsockopen = \false; | |
var $replace_url_attributes = \null; | |
public function __construct() | |
{ | |
} | |
public function remove_div($enable = \true) | |
{ | |
} | |
public function set_image_handler($page = \false) | |
{ | |
} | |
public function set_registry(\SimplePie_Registry $registry) | |
{ | |
} | |
public function pass_cache_data($enable_cache = \true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie_Cache') | |
{ | |
} | |
public function pass_file_data($file_class = 'SimplePie_File', $timeout = 10, $useragent = '', $force_fsockopen = \false) | |
{ | |
} | |
public function strip_htmltags($tags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style')) | |
{ | |
} | |
public function encode_instead_of_strip($encode = \false) | |
{ | |
} | |
public function strip_attributes($attribs = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')) | |
{ | |
} | |
public function strip_comments($strip = \false) | |
{ | |
} | |
public function set_output_encoding($encoding = 'UTF-8') | |
{ | |
} | |
/** | |
* Set element/attribute key/value pairs of HTML attributes | |
* containing URLs that need to be resolved relative to the feed | |
* | |
* Defaults to |a|@href, |area|@href, |blockquote|@cite, |del|@cite, | |
* |form|@action, |img|@longdesc, |img|@src, |input|@src, |ins|@cite, | |
* |q|@cite | |
* | |
* @since 1.0 | |
* @param array|null $element_attribute Element/attribute key/value pairs, null for default | |
*/ | |
public function set_url_replacements($element_attribute = \null) | |
{ | |
} | |
public function sanitize($data, $type, $base = '') | |
{ | |
} | |
protected function preprocess($html, $type) | |
{ | |
} | |
public function replace_urls($document, $tag, $attributes) | |
{ | |
} | |
public function do_strip_htmltags($match) | |
{ | |
} | |
protected function strip_tag($tag, $document, $type) | |
{ | |
} | |
protected function strip_attr($attrib, $document) | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Handles `<atom:source>` | |
* | |
* Used by {@see SimplePie_Item::get_source()} | |
* | |
* This class can be overloaded with {@see SimplePie::set_source_class()} | |
* | |
* @package SimplePie | |
* @subpackage API | |
*/ | |
class SimplePie_Source | |
{ | |
var $item; | |
var $data = array(); | |
protected $registry; | |
public function __construct($item, $data) | |
{ | |
} | |
public function set_registry(\SimplePie_Registry $registry) | |
{ | |
} | |
public function __toString() | |
{ | |
} | |
public function get_source_tags($namespace, $tag) | |
{ | |
} | |
public function get_base($element = array()) | |
{ | |
} | |
public function sanitize($data, $type, $base = '') | |
{ | |
} | |
public function get_item() | |
{ | |
} | |
public function get_title() | |
{ | |
} | |
public function get_category($key = 0) | |
{ | |
} | |
public function get_categories() | |
{ | |
} | |
public function get_author($key = 0) | |
{ | |
} | |
public function get_authors() | |
{ | |
} | |
public function get_contributor($key = 0) | |
{ | |
} | |
public function get_contributors() | |
{ | |
} | |
public function get_link($key = 0, $rel = 'alternate') | |
{ | |
} | |
/** | |
* Added for parity between the parent-level and the item/entry-level. | |
*/ | |
public function get_permalink() | |
{ | |
} | |
public function get_links($rel = 'alternate') | |
{ | |
} | |
public function get_description() | |
{ | |
} | |
public function get_copyright() | |
{ | |
} | |
public function get_language() | |
{ | |
} | |
public function get_latitude() | |
{ | |
} | |
public function get_longitude() | |
{ | |
} | |
public function get_image_url() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Parses the XML Declaration | |
* | |
* @package SimplePie | |
* @subpackage Parsing | |
*/ | |
class SimplePie_XML_Declaration_Parser | |
{ | |
/** | |
* XML Version | |
* | |
* @access public | |
* @var string | |
*/ | |
var $version = '1.0'; | |
/** | |
* Encoding | |
* | |
* @access public | |
* @var string | |
*/ | |
var $encoding = 'UTF-8'; | |
/** | |
* Standalone | |
* | |
* @access public | |
* @var bool | |
*/ | |
var $standalone = \false; | |
/** | |
* Current state of the state machine | |
* | |
* @access private | |
* @var string | |
*/ | |
var $state = 'before_version_name'; | |
/** | |
* Input data | |
* | |
* @access private | |
* @var string | |
*/ | |
var $data = ''; | |
/** | |
* Input data length (to avoid calling strlen() everytime this is needed) | |
* | |
* @access private | |
* @var int | |
*/ | |
var $data_length = 0; | |
/** | |
* Current position of the pointer | |
* | |
* @var int | |
* @access private | |
*/ | |
var $position = 0; | |
/** | |
* Create an instance of the class with the input data | |
* | |
* @access public | |
* @param string $data Input data | |
*/ | |
public function __construct($data) | |
{ | |
} | |
/** | |
* Parse the input data | |
* | |
* @access public | |
* @return bool true on success, false on failure | |
*/ | |
public function parse() | |
{ | |
} | |
/** | |
* Check whether there is data beyond the pointer | |
* | |
* @access private | |
* @return bool true if there is further data, false if not | |
*/ | |
public function has_data() | |
{ | |
} | |
/** | |
* Advance past any whitespace | |
* | |
* @return int Number of whitespace characters passed | |
*/ | |
public function skip_whitespace() | |
{ | |
} | |
/** | |
* Read value | |
*/ | |
public function get_value() | |
{ | |
} | |
public function before_version_name() | |
{ | |
} | |
public function version_name() | |
{ | |
} | |
public function version_equals() | |
{ | |
} | |
public function version_value() | |
{ | |
} | |
public function encoding_name() | |
{ | |
} | |
public function encoding_equals() | |
{ | |
} | |
public function encoding_value() | |
{ | |
} | |
public function standalone_name() | |
{ | |
} | |
public function standalone_equals() | |
{ | |
} | |
public function standalone_value() | |
{ | |
} | |
} | |
/** | |
* SimplePie | |
* | |
* A PHP-Based RSS and Atom Feed Framework. | |
* Takes the hard work out of managing a complete RSS/Atom solution. | |
* | |
* Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* * Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* * Neither the name of the SimplePie Team nor the names of its contributors may be used | |
* to endorse or promote products derived from this software without specific prior | |
* written permission. | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS | |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | |
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS | |
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
* POSSIBILITY OF SUCH DAMAGE. | |
* | |
* @package SimplePie | |
* @version 1.3.1 | |
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue | |
* @author Ryan Parman | |
* @author Geoffrey Sneddon | |
* @author Ryan McCue | |
* @link http://simplepie.org/ SimplePie | |
* @license http://www.opensource.org/licenses/bsd-license.php BSD License | |
*/ | |
/** | |
* Decode 'gzip' encoded HTTP data | |
* | |
* @package SimplePie | |
* @subpackage HTTP | |
* @link http://www.gzip.org/format.txt | |
*/ | |
class SimplePie_gzdecode | |
{ | |
/** | |
* Compressed data | |
* | |
* @access private | |
* @var string | |
* @see gzdecode::$data | |
*/ | |
var $compressed_data; | |
/** | |
* Size of compressed data | |
* | |
* @access private | |
* @var int | |
*/ | |
var $compressed_size; | |
/** | |
* Minimum size of a valid gzip string | |
* | |
* @access private | |
* @var int | |
*/ | |
var $min_compressed_size = 18; | |
/** | |
* Current position of pointer | |
* | |
* @access private | |
* @var int | |
*/ | |
var $position = 0; | |
/** | |
* Flags (FLG) | |
* | |
* @access private | |
* @var int | |
*/ | |
var $flags; | |
/** | |
* Uncompressed data | |
* | |
* @access public | |
* @see gzdecode::$compressed_data | |
* @var string | |
*/ | |
var $data; | |
/** | |
* Modified time | |
* | |
* @access public | |
* @var int | |
*/ | |
var $MTIME; | |
/** | |
* Extra Flags | |
* | |
* @access public | |
* @var int | |
*/ | |
var $XFL; | |
/** | |
* Operating System | |
* | |
* @access public | |
* @var int | |
*/ | |
var $OS; | |
/** | |
* Subfield ID 1 | |
* | |
* @access public | |
* @see gzdecode::$extra_field | |
* @see gzdecode::$SI2 | |
* @var string | |
*/ | |
var $SI1; | |
/** | |
* Subfield ID 2 | |
* | |
* @access public | |
* @see gzdecode::$extra_field | |
* @see gzdecode::$SI1 | |
* @var string | |
*/ | |
var $SI2; | |
/** | |
* Extra field content | |
* | |
* @access public | |
* @see gzdecode::$SI1 | |
* @see gzdecode::$SI2 | |
* @var string | |
*/ | |
var $extra_field; | |
/** | |
* Original filename | |
* | |
* @access public | |
* @var string | |
*/ | |
var $filename; | |
/** | |
* Human readable comment | |
* | |
* @access public | |
* @var string | |
*/ | |
var $comment; | |
/** | |
* Don't allow anything to be set | |
* | |
* @param string $name | |
* @param mixed $value | |
*/ | |
public function __set($name, $value) | |
{ | |
} | |
/** | |
* Set the compressed string and related properties | |
* | |
* @param string $data | |
*/ | |
public function __construct($data) | |
{ | |
} | |
/** | |
* Decode the GZIP stream | |
* | |
* @return bool Successfulness | |
*/ | |
public function parse() | |
{ | |
} | |
} | |
/** | |
* General API for generating and formatting diffs - the differences between | |
* two sequences of strings. | |
* | |
* The original PHP version of this code was written by Geoffrey T. Dairiki | |
* <dairiki@dairiki.org>, and is used/adapted with his permission. | |
* | |
* Copyright 2004 Geoffrey T. Dairiki <dairiki@dairiki.org> | |
* Copyright 2004-2010 The Horde Project (http://www.horde.org/) | |
* | |
* See the enclosed file COPYING for license information (LGPL). If you did | |
* not receive this file, see http://opensource.org/licenses/lgpl-license.php. | |
* | |
* @package Text_Diff | |
* @author Geoffrey T. Dairiki <dairiki@dairiki.org> | |
*/ | |
class Text_Diff | |
{ | |
/** | |
* Array of changes. | |
* | |
* @var array | |
*/ | |
var $_edits; | |
/** | |
* Computes diffs between sequences of strings. | |
* | |
* @param string $engine Name of the diffing engine to use. 'auto' | |
* will automatically select the best. | |
* @param array $params Parameters to pass to the diffing engine. | |
* Normally an array of two arrays, each | |
* containing the lines from a file. | |
*/ | |
function __construct($engine, $params) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function Text_Diff($engine, $params) | |
{ | |
} | |
/** | |
* Returns the array of differences. | |
*/ | |
function getDiff() | |
{ | |
} | |
/** | |
* returns the number of new (added) lines in a given diff. | |
* | |
* @since Text_Diff 1.1.0 | |
* | |
* @return integer The number of new lines | |
*/ | |
function countAddedLines() | |
{ | |
} | |
/** | |
* Returns the number of deleted (removed) lines in a given diff. | |
* | |
* @since Text_Diff 1.1.0 | |
* | |
* @return integer The number of deleted lines | |
*/ | |
function countDeletedLines() | |
{ | |
} | |
/** | |
* Computes a reversed diff. | |
* | |
* Example: | |
* <code> | |
* $diff = new Text_Diff($lines1, $lines2); | |
* $rev = $diff->reverse(); | |
* </code> | |
* | |
* @return Text_Diff A Diff object representing the inverse of the | |
* original diff. Note that we purposely don't return a | |
* reference here, since this essentially is a clone() | |
* method. | |
*/ | |
function reverse() | |
{ | |
} | |
/** | |
* Checks for an empty diff. | |
* | |
* @return boolean True if two sequences were identical. | |
*/ | |
function isEmpty() | |
{ | |
} | |
/** | |
* Computes the length of the Longest Common Subsequence (LCS). | |
* | |
* This is mostly for diagnostic purposes. | |
* | |
* @return integer The length of the LCS. | |
*/ | |
function lcs() | |
{ | |
} | |
/** | |
* Gets the original set of lines. | |
* | |
* This reconstructs the $from_lines parameter passed to the constructor. | |
* | |
* @return array The original sequence of strings. | |
*/ | |
function getOriginal() | |
{ | |
} | |
/** | |
* Gets the final set of lines. | |
* | |
* This reconstructs the $to_lines parameter passed to the constructor. | |
* | |
* @return array The sequence of strings. | |
*/ | |
function getFinal() | |
{ | |
} | |
/** | |
* Removes trailing newlines from a line of text. This is meant to be used | |
* with array_walk(). | |
* | |
* @param string $line The line to trim. | |
* @param integer $key The index of the line in the array. Not used. | |
*/ | |
static function trimNewlines(&$line, $key) | |
{ | |
} | |
/** | |
* Determines the location of the system temporary directory. | |
* | |
* @static | |
* | |
* @access protected | |
* | |
* @return string A directory name which can be used for temp files. | |
* Returns false if one could not be found. | |
*/ | |
function _getTempDir() | |
{ | |
} | |
/** | |
* Checks a diff for validity. | |
* | |
* This is here only for debugging purposes. | |
*/ | |
function _check($from_lines, $to_lines) | |
{ | |
} | |
} | |
/** | |
* @package Text_Diff | |
* @author Geoffrey T. Dairiki <dairiki@dairiki.org> | |
*/ | |
class Text_MappedDiff extends \Text_Diff | |
{ | |
/** | |
* Computes a diff between sequences of strings. | |
* | |
* This can be used to compute things like case-insensitve diffs, or diffs | |
* which ignore changes in white-space. | |
* | |
* @param array $from_lines An array of strings. | |
* @param array $to_lines An array of strings. | |
* @param array $mapped_from_lines This array should have the same size | |
* number of elements as $from_lines. The | |
* elements in $mapped_from_lines and | |
* $mapped_to_lines are what is actually | |
* compared when computing the diff. | |
* @param array $mapped_to_lines This array should have the same number | |
* of elements as $to_lines. | |
*/ | |
function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function Text_MappedDiff($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) | |
{ | |
} | |
} | |
/** | |
* @package Text_Diff | |
* @author Geoffrey T. Dairiki <dairiki@dairiki.org> | |
* | |
* @access private | |
*/ | |
class Text_Diff_Op | |
{ | |
var $orig; | |
var $final; | |
function &reverse() | |
{ | |
} | |
function norig() | |
{ | |
} | |
function nfinal() | |
{ | |
} | |
} | |
/** | |
* @package Text_Diff | |
* @author Geoffrey T. Dairiki <dairiki@dairiki.org> | |
* | |
* @access private | |
*/ | |
class Text_Diff_Op_copy extends \Text_Diff_Op | |
{ | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($orig, $final = \false) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function Text_Diff_Op_copy($orig, $final = \false) | |
{ | |
} | |
function &reverse() | |
{ | |
} | |
} | |
/** | |
* @package Text_Diff | |
* @author Geoffrey T. Dairiki <dairiki@dairiki.org> | |
* | |
* @access private | |
*/ | |
class Text_Diff_Op_delete extends \Text_Diff_Op | |
{ | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($lines) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function Text_Diff_Op_delete($lines) | |
{ | |
} | |
function &reverse() | |
{ | |
} | |
} | |
/** | |
* @package Text_Diff | |
* @author Geoffrey T. Dairiki <dairiki@dairiki.org> | |
* | |
* @access private | |
*/ | |
class Text_Diff_Op_add extends \Text_Diff_Op | |
{ | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($lines) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function Text_Diff_Op_add($lines) | |
{ | |
} | |
function &reverse() | |
{ | |
} | |
} | |
/** | |
* @package Text_Diff | |
* @author Geoffrey T. Dairiki <dairiki@dairiki.org> | |
* | |
* @access private | |
*/ | |
class Text_Diff_Op_change extends \Text_Diff_Op | |
{ | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($orig, $final) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function Text_Diff_Op_change($orig, $final) | |
{ | |
} | |
function &reverse() | |
{ | |
} | |
} | |
/** | |
* Class used internally by Text_Diff to actually compute the diffs. | |
* | |
* This class is implemented using native PHP code. | |
* | |
* The algorithm used here is mostly lifted from the perl module | |
* Algorithm::Diff (version 1.06) by Ned Konz, which is available at: | |
* http://www.perl.com/CPAN/authors/id/N/NE/NEDKONZ/Algorithm-Diff-1.06.zip | |
* | |
* More ideas are taken from: http://www.ics.uci.edu/~eppstein/161/960229.html | |
* | |
* Some ideas (and a bit of code) are taken from analyze.c, of GNU | |
* diffutils-2.7, which can be found at: | |
* ftp://gnudist.gnu.org/pub/gnu/diffutils/diffutils-2.7.tar.gz | |
* | |
* Some ideas (subdivision by NCHUNKS > 2, and some optimizations) are from | |
* Geoffrey T. Dairiki <dairiki@dairiki.org>. The original PHP version of this | |
* code was written by him, and is used/adapted with his permission. | |
* | |
* Copyright 2004-2010 The Horde Project (http://www.horde.org/) | |
* | |
* See the enclosed file COPYING for license information (LGPL). If you did | |
* not receive this file, see http://opensource.org/licenses/lgpl-license.php. | |
* | |
* @author Geoffrey T. Dairiki <dairiki@dairiki.org> | |
* @package Text_Diff | |
*/ | |
class Text_Diff_Engine_native | |
{ | |
function diff($from_lines, $to_lines) | |
{ | |
} | |
/** | |
* Divides the Largest Common Subsequence (LCS) of the sequences (XOFF, | |
* XLIM) and (YOFF, YLIM) into NCHUNKS approximately equally sized | |
* segments. | |
* | |
* Returns (LCS, PTS). LCS is the length of the LCS. PTS is an array of | |
* NCHUNKS+1 (X, Y) indexes giving the diving points between sub | |
* sequences. The first sub-sequence is contained in (X0, X1), (Y0, Y1), | |
* the second in (X1, X2), (Y1, Y2) and so on. Note that (X0, Y0) == | |
* (XOFF, YOFF) and (X[NCHUNKS], Y[NCHUNKS]) == (XLIM, YLIM). | |
* | |
* This function assumes that the first lines of the specified portions of | |
* the two files do not match, and likewise that the last lines do not | |
* match. The caller must trim matching lines from the beginning and end | |
* of the portions it is going to specify. | |
*/ | |
function _diag($xoff, $xlim, $yoff, $ylim, $nchunks) | |
{ | |
} | |
function _lcsPos($ypos) | |
{ | |
} | |
/** | |
* Finds LCS of two sequences. | |
* | |
* The results are recorded in the vectors $this->{x,y}changed[], by | |
* storing a 1 in the element for each line that is an insertion or | |
* deletion (ie. is not in the LCS). | |
* | |
* The subsequence of file 0 is (XOFF, XLIM) and likewise for file 1. | |
* | |
* Note that XLIM, YLIM are exclusive bounds. All line numbers are | |
* origin-0 and discarded lines are not counted. | |
*/ | |
function _compareseq($xoff, $xlim, $yoff, $ylim) | |
{ | |
} | |
/** | |
* Adjusts inserts/deletes of identical lines to join changes as much as | |
* possible. | |
* | |
* We do something when a run of changed lines include a line at one end | |
* and has an excluded, identical line at the other. We are free to | |
* choose which identical line is included. `compareseq' usually chooses | |
* the one at the beginning, but usually it is cleaner to consider the | |
* following identical line to be the "change". | |
* | |
* This is extracted verbatim from analyze.c (GNU diffutils-2.7). | |
*/ | |
function _shiftBoundaries($lines, &$changed, $other_changed) | |
{ | |
} | |
} | |
/** | |
* Class used internally by Diff to actually compute the diffs. | |
* | |
* This class uses the Unix `diff` program via shell_exec to compute the | |
* differences between the two input arrays. | |
* | |
* Copyright 2007-2010 The Horde Project (http://www.horde.org/) | |
* | |
* See the enclosed file COPYING for license information (LGPL). If you did | |
* not receive this file, see http://opensource.org/licenses/lgpl-license.php. | |
* | |
* @author Milian Wolff <mail@milianw.de> | |
* @package Text_Diff | |
* @since 0.3.0 | |
*/ | |
class Text_Diff_Engine_shell | |
{ | |
/** | |
* Path to the diff executable | |
* | |
* @var string | |
*/ | |
var $_diffCommand = 'diff'; | |
/** | |
* Returns the array of differences. | |
* | |
* @param array $from_lines lines of text from old file | |
* @param array $to_lines lines of text from new file | |
* | |
* @return array all changes made (array with Text_Diff_Op_* objects) | |
*/ | |
function diff($from_lines, $to_lines) | |
{ | |
} | |
/** | |
* Get lines from either the old or new text | |
* | |
* @access private | |
* | |
* @param array $text_lines Either $from_lines or $to_lines (passed by reference). | |
* @param int $line_no Current line number (passed by reference). | |
* @param int $end Optional end line, when we want to chop more | |
* than one line. | |
* | |
* @return array The chopped lines | |
*/ | |
function _getLines(&$text_lines, &$line_no, $end = \false) | |
{ | |
} | |
} | |
/** | |
* Parses unified or context diffs output from eg. the diff utility. | |
* | |
* Example: | |
* <code> | |
* $patch = file_get_contents('example.patch'); | |
* $diff = new Text_Diff('string', array($patch)); | |
* $renderer = new Text_Diff_Renderer_inline(); | |
* echo $renderer->render($diff); | |
* </code> | |
* | |
* Copyright 2005 Örjan Persson <o@42mm.org> | |
* Copyright 2005-2010 The Horde Project (http://www.horde.org/) | |
* | |
* See the enclosed file COPYING for license information (LGPL). If you did | |
* not receive this file, see http://opensource.org/licenses/lgpl-license.php. | |
* | |
* @author Örjan Persson <o@42mm.org> | |
* @package Text_Diff | |
* @since 0.2.0 | |
*/ | |
class Text_Diff_Engine_string | |
{ | |
/** | |
* Parses a unified or context diff. | |
* | |
* First param contains the whole diff and the second can be used to force | |
* a specific diff type. If the second parameter is 'autodetect', the | |
* diff will be examined to find out which type of diff this is. | |
* | |
* @param string $diff The diff content. | |
* @param string $mode The diff mode of the content in $diff. One of | |
* 'context', 'unified', or 'autodetect'. | |
* | |
* @return array List of all diff operations. | |
*/ | |
function diff($diff, $mode = 'autodetect') | |
{ | |
} | |
/** | |
* Parses an array containing the unified diff. | |
* | |
* @param array $diff Array of lines. | |
* | |
* @return array List of all diff operations. | |
*/ | |
function parseUnifiedDiff($diff) | |
{ | |
} | |
/** | |
* Parses an array containing the context diff. | |
* | |
* @param array $diff Array of lines. | |
* | |
* @return array List of all diff operations. | |
*/ | |
function parseContextDiff(&$diff) | |
{ | |
} | |
} | |
/** | |
* Class used internally by Diff to actually compute the diffs. | |
* | |
* This class uses the xdiff PECL package (http://pecl.php.net/package/xdiff) | |
* to compute the differences between the two input arrays. | |
* | |
* Copyright 2004-2010 The Horde Project (http://www.horde.org/) | |
* | |
* See the enclosed file COPYING for license information (LGPL). If you did | |
* not receive this file, see http://opensource.org/licenses/lgpl-license.php. | |
* | |
* @author Jon Parise <jon@horde.org> | |
* @package Text_Diff | |
*/ | |
class Text_Diff_Engine_xdiff | |
{ | |
/** | |
*/ | |
function diff($from_lines, $to_lines) | |
{ | |
} | |
} | |
/** | |
* A class to render Diffs in different formats. | |
* | |
* This class renders the diff in classic diff format. It is intended that | |
* this class be customized via inheritance, to obtain fancier outputs. | |
* | |
* Copyright 2004-2010 The Horde Project (http://www.horde.org/) | |
* | |
* See the enclosed file COPYING for license information (LGPL). If you did | |
* not receive this file, see http://opensource.org/licenses/lgpl-license.php. | |
* | |
* @package Text_Diff | |
*/ | |
class Text_Diff_Renderer | |
{ | |
/** | |
* Number of leading context "lines" to preserve. | |
* | |
* This should be left at zero for this class, but subclasses may want to | |
* set this to other values. | |
*/ | |
var $_leading_context_lines = 0; | |
/** | |
* Number of trailing context "lines" to preserve. | |
* | |
* This should be left at zero for this class, but subclasses may want to | |
* set this to other values. | |
*/ | |
var $_trailing_context_lines = 0; | |
/** | |
* Constructor. | |
*/ | |
function __construct($params = array()) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function Text_Diff_Renderer($params = array()) | |
{ | |
} | |
/** | |
* Get any renderer parameters. | |
* | |
* @return array All parameters of this renderer object. | |
*/ | |
function getParams() | |
{ | |
} | |
/** | |
* Renders a diff. | |
* | |
* @param Text_Diff $diff A Text_Diff object. | |
* | |
* @return string The formatted output. | |
*/ | |
function render($diff) | |
{ | |
} | |
function _block($xbeg, $xlen, $ybeg, $ylen, &$edits) | |
{ | |
} | |
function _startDiff() | |
{ | |
} | |
function _endDiff() | |
{ | |
} | |
function _blockHeader($xbeg, $xlen, $ybeg, $ylen) | |
{ | |
} | |
function _startBlock($header) | |
{ | |
} | |
function _endBlock() | |
{ | |
} | |
function _lines($lines, $prefix = ' ') | |
{ | |
} | |
function _context($lines) | |
{ | |
} | |
function _added($lines) | |
{ | |
} | |
function _deleted($lines) | |
{ | |
} | |
function _changed($orig, $final) | |
{ | |
} | |
} | |
/** | |
* "Inline" diff renderer. | |
* | |
* This class renders diffs in the Wiki-style "inline" format. | |
* | |
* @author Ciprian Popovici | |
* @package Text_Diff | |
*/ | |
class Text_Diff_Renderer_inline extends \Text_Diff_Renderer | |
{ | |
/** | |
* Number of leading context "lines" to preserve. | |
* | |
* @var integer | |
*/ | |
var $_leading_context_lines = 10000; | |
/** | |
* Number of trailing context "lines" to preserve. | |
* | |
* @var integer | |
*/ | |
var $_trailing_context_lines = 10000; | |
/** | |
* Prefix for inserted text. | |
* | |
* @var string | |
*/ | |
var $_ins_prefix = '<ins>'; | |
/** | |
* Suffix for inserted text. | |
* | |
* @var string | |
*/ | |
var $_ins_suffix = '</ins>'; | |
/** | |
* Prefix for deleted text. | |
* | |
* @var string | |
*/ | |
var $_del_prefix = '<del>'; | |
/** | |
* Suffix for deleted text. | |
* | |
* @var string | |
*/ | |
var $_del_suffix = '</del>'; | |
/** | |
* Header for each change block. | |
* | |
* @var string | |
*/ | |
var $_block_header = ''; | |
/** | |
* Whether to split down to character-level. | |
* | |
* @var boolean | |
*/ | |
var $_split_characters = \false; | |
/** | |
* What are we currently splitting on? Used to recurse to show word-level | |
* or character-level changes. | |
* | |
* @var string | |
*/ | |
var $_split_level = 'lines'; | |
function _blockHeader($xbeg, $xlen, $ybeg, $ylen) | |
{ | |
} | |
function _startBlock($header) | |
{ | |
} | |
function _lines($lines, $prefix = ' ', $encode = \true) | |
{ | |
} | |
function _added($lines) | |
{ | |
} | |
function _deleted($lines, $words = \false) | |
{ | |
} | |
function _changed($orig, $final) | |
{ | |
} | |
function _splitOnWords($string, $newlineEscape = "\n") | |
{ | |
} | |
function _encode(&$string) | |
{ | |
} | |
} | |
/** | |
* Atom Syndication Format PHP Library | |
* | |
* @package AtomLib | |
* @link http://code.google.com/p/phpatomlib/ | |
* | |
* @author Elias Torres <elias@torrez.us> | |
* @version 0.4 | |
* @since 2.3.0 | |
*/ | |
/** | |
* Structure that store common Atom Feed Properties | |
* | |
* @package AtomLib | |
*/ | |
class AtomFeed | |
{ | |
/** | |
* Stores Links | |
* @var array | |
* @access public | |
*/ | |
var $links = array(); | |
/** | |
* Stores Categories | |
* @var array | |
* @access public | |
*/ | |
var $categories = array(); | |
/** | |
* Stores Entries | |
* | |
* @var array | |
* @access public | |
*/ | |
var $entries = array(); | |
} | |
/** | |
* Structure that store Atom Entry Properties | |
* | |
* @package AtomLib | |
*/ | |
class AtomEntry | |
{ | |
/** | |
* Stores Links | |
* @var array | |
* @access public | |
*/ | |
var $links = array(); | |
/** | |
* Stores Categories | |
* @var array | |
* @access public | |
*/ | |
var $categories = array(); | |
} | |
/** | |
* AtomLib Atom Parser API | |
* | |
* @package AtomLib | |
*/ | |
class AtomParser | |
{ | |
var $NS = 'http://www.w3.org/2005/Atom'; | |
var $ATOM_CONTENT_ELEMENTS = array('content', 'summary', 'title', 'subtitle', 'rights'); | |
var $ATOM_SIMPLE_ELEMENTS = array('id', 'updated', 'published', 'draft'); | |
var $debug = \false; | |
var $depth = 0; | |
var $indent = 2; | |
var $in_content; | |
var $ns_contexts = array(); | |
var $ns_decls = array(); | |
var $content_ns_decls = array(); | |
var $content_ns_contexts = array(); | |
var $is_xhtml = \false; | |
var $is_html = \false; | |
var $is_text = \true; | |
var $skipped_div = \false; | |
var $FILE = "php://input"; | |
var $feed; | |
var $current; | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct() | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function AtomParser() | |
{ | |
} | |
/** | |
* Map attributes to key="val" | |
* | |
* @param string $k Key | |
* @param string $v Value | |
* @return string | |
*/ | |
public static function map_attrs($k, $v) | |
{ | |
} | |
/** | |
* Map XML namespace to string. | |
* | |
* @param indexish $p XML Namespace element index | |
* @param array $n Two-element array pair. [ 0 => {namespace}, 1 => {url} ] | |
* @return string 'xmlns="{url}"' or 'xmlns:{namespace}="{url}"' | |
*/ | |
public static function map_xmlns($p, $n) | |
{ | |
} | |
function _p($msg) | |
{ | |
} | |
function error_handler($log_level, $log_text, $error_file, $error_line) | |
{ | |
} | |
function parse() | |
{ | |
} | |
function start_element($parser, $name, $attrs) | |
{ | |
} | |
function end_element($parser, $name) | |
{ | |
} | |
function start_ns($parser, $prefix, $uri) | |
{ | |
} | |
function end_ns($parser, $prefix) | |
{ | |
} | |
function cdata($parser, $data) | |
{ | |
} | |
function _default($parser, $data) | |
{ | |
} | |
function ns_to_prefix($qname, $attr = \false) | |
{ | |
} | |
function is_declared_content_ns($new_mapping) | |
{ | |
} | |
function xml_escape($string) | |
{ | |
} | |
} | |
/** | |
* Core class that implements an object cache. | |
* | |
* The WordPress Object Cache is used to save on trips to the database. The | |
* Object Cache stores all of the cache data to memory and makes the cache | |
* contents available by using a key, which is used to name and later retrieve | |
* the cache contents. | |
* | |
* The Object Cache can be replaced by other caching mechanisms by placing files | |
* in the wp-content folder which is looked at in wp-settings. If that file | |
* exists, then this file will not be included. | |
* | |
* @since 2.0.0 | |
*/ | |
class WP_Object_Cache | |
{ | |
/** | |
* Holds the cached objects. | |
* | |
* @since 2.0.0 | |
* @var array | |
*/ | |
private $cache = array(); | |
/** | |
* The amount of times the cache data was already stored in the cache. | |
* | |
* @since 2.5.0 | |
* @var int | |
*/ | |
public $cache_hits = 0; | |
/** | |
* Amount of times the cache did not have the request in cache. | |
* | |
* @since 2.0.0 | |
* @var int | |
*/ | |
public $cache_misses = 0; | |
/** | |
* List of global cache groups. | |
* | |
* @since 3.0.0 | |
* @var array | |
*/ | |
protected $global_groups = array(); | |
/** | |
* The blog prefix to prepend to keys in non-global groups. | |
* | |
* @since 3.5.0 | |
* @var int | |
*/ | |
private $blog_prefix; | |
/** | |
* Holds the value of is_multisite(). | |
* | |
* @since 3.5.0 | |
* @var bool | |
*/ | |
private $multisite; | |
/** | |
* Makes private properties readable for backward compatibility. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $name Property to get. | |
* @return mixed Property. | |
*/ | |
public function __get($name) | |
{ | |
} | |
/** | |
* Makes private properties settable for backward compatibility. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $name Property to set. | |
* @param mixed $value Property value. | |
* @return mixed Newly-set property. | |
*/ | |
public function __set($name, $value) | |
{ | |
} | |
/** | |
* Makes private properties checkable for backward compatibility. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $name Property to check if set. | |
* @return bool Whether the property is set. | |
*/ | |
public function __isset($name) | |
{ | |
} | |
/** | |
* Makes private properties un-settable for backward compatibility. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $name Property to unset. | |
*/ | |
public function __unset($name) | |
{ | |
} | |
/** | |
* Adds data to the cache if it doesn't already exist. | |
* | |
* @since 2.0.0 | |
* | |
* @uses WP_Object_Cache::_exists() Checks to see if the cache already has data. | |
* @uses WP_Object_Cache::set() Sets the data after the checking the cache | |
* contents existence. | |
* | |
* @param int|string $key What to call the contents in the cache. | |
* @param mixed $data The contents to store in the cache. | |
* @param string $group Optional. Where to group the cache contents. Default 'default'. | |
* @param int $expire Optional. When to expire the cache contents. Default 0 (no expiration). | |
* @return bool False if cache key and group already exist, true on success | |
*/ | |
public function add($key, $data, $group = 'default', $expire = 0) | |
{ | |
} | |
/** | |
* Sets the list of global cache groups. | |
* | |
* @since 3.0.0 | |
* | |
* @param array $groups List of groups that are global. | |
*/ | |
public function add_global_groups($groups) | |
{ | |
} | |
/** | |
* Decrements numeric cache item's value. | |
* | |
* @since 3.3.0 | |
* | |
* @param int|string $key The cache key to decrement. | |
* @param int $offset Optional. The amount by which to decrement the item's value. Default 1. | |
* @param string $group Optional. The group the key is in. Default 'default'. | |
* @return false|int False on failure, the item's new value on success. | |
*/ | |
public function decr($key, $offset = 1, $group = 'default') | |
{ | |
} | |
/** | |
* Removes the contents of the cache key in the group. | |
* | |
* If the cache key does not exist in the group, then nothing will happen. | |
* | |
* @since 2.0.0 | |
* | |
* @param int|string $key What the contents in the cache are called. | |
* @param string $group Optional. Where the cache contents are grouped. Default 'default'. | |
* @param bool $deprecated Optional. Unused. Default false. | |
* @return bool False if the contents weren't deleted and true on success. | |
*/ | |
public function delete($key, $group = 'default', $deprecated = \false) | |
{ | |
} | |
/** | |
* Clears the object cache of all data. | |
* | |
* @since 2.0.0 | |
* | |
* @return true Always returns true. | |
*/ | |
public function flush() | |
{ | |
} | |
/** | |
* Retrieves the cache contents, if it exists. | |
* | |
* The contents will be first attempted to be retrieved by searching by the | |
* key in the cache group. If the cache is hit (success) then the contents | |
* are returned. | |
* | |
* On failure, the number of cache misses will be incremented. | |
* | |
* @since 2.0.0 | |
* | |
* @param int|string $key What the contents in the cache are called. | |
* @param string $group Optional. Where the cache contents are grouped. Default 'default'. | |
* @param bool $force Optional. Unused. Whether to force a refetch rather than relying on the local | |
* cache. Default false. | |
* @param bool $found Optional. Whether the key was found in the cache (passed by reference). | |
* Disambiguates a return of false, a storable value. Default null. | |
* @return false|mixed False on failure to retrieve contents or the cache contents on success. | |
*/ | |
public function get($key, $group = 'default', $force = \false, &$found = \null) | |
{ | |
} | |
/** | |
* Increments numeric cache item's value. | |
* | |
* @since 3.3.0 | |
* | |
* @param int|string $key The cache key to increment | |
* @param int $offset Optional. The amount by which to increment the item's value. Default 1. | |
* @param string $group Optional. The group the key is in. Default 'default'. | |
* @return false|int False on failure, the item's new value on success. | |
*/ | |
public function incr($key, $offset = 1, $group = 'default') | |
{ | |
} | |
/** | |
* Replaces the contents in the cache, if contents already exist. | |
* | |
* @since 2.0.0 | |
* | |
* @see WP_Object_Cache::set() | |
* | |
* @param int|string $key What to call the contents in the cache. | |
* @param mixed $data The contents to store in the cache. | |
* @param string $group Optional. Where to group the cache contents. Default 'default'. | |
* @param int $expire Optional. When to expire the cache contents. Default 0 (no expiration). | |
* @return bool False if not exists, true if contents were replaced. | |
*/ | |
public function replace($key, $data, $group = 'default', $expire = 0) | |
{ | |
} | |
/** | |
* Resets cache keys. | |
* | |
* @since 3.0.0 | |
* | |
* @deprecated 3.5.0 Use switch_to_blog() | |
* @see switch_to_blog() | |
*/ | |
public function reset() | |
{ | |
} | |
/** | |
* Sets the data contents into the cache. | |
* | |
* The cache contents is grouped by the $group parameter followed by the | |
* $key. This allows for duplicate ids in unique groups. Therefore, naming of | |
* the group should be used with care and should follow normal function | |
* naming guidelines outside of core WordPress usage. | |
* | |
* The $expire parameter is not used, because the cache will automatically | |
* expire for each time a page is accessed and PHP finishes. The method is | |
* more for cache plugins which use files. | |
* | |
* @since 2.0.0 | |
* | |
* @param int|string $key What to call the contents in the cache. | |
* @param mixed $data The contents to store in the cache. | |
* @param string $group Optional. Where to group the cache contents. Default 'default'. | |
* @param int $expire Not Used. | |
* @return true Always returns true. | |
*/ | |
public function set($key, $data, $group = 'default', $expire = 0) | |
{ | |
} | |
/** | |
* Echoes the stats of the caching. | |
* | |
* Gives the cache hits, and cache misses. Also prints every cached group, | |
* key and the data. | |
* | |
* @since 2.0.0 | |
*/ | |
public function stats() | |
{ | |
} | |
/** | |
* Switches the internal blog ID. | |
* | |
* This changes the blog ID used to create keys in blog specific groups. | |
* | |
* @since 3.5.0 | |
* | |
* @param int $blog_id Blog ID. | |
*/ | |
public function switch_to_blog($blog_id) | |
{ | |
} | |
/** | |
* Serves as a utility function to determine whether a key exists in the cache. | |
* | |
* @since 3.4.0 | |
* | |
* @param int|string $key Cache key to check for existence. | |
* @param string $group Cache group for the key existence check. | |
* @return bool Whether the key exists in the cache for the given group. | |
*/ | |
protected function _exists($key, $group) | |
{ | |
} | |
/** | |
* Sets up object properties; PHP 5 style constructor. | |
* | |
* @since 2.0.8 | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Saves the object cache before object is completely destroyed. | |
* | |
* Called upon object destruction, which should be when PHP ends. | |
* | |
* @since 2.0.8 | |
* | |
* @return true Always returns true. | |
*/ | |
public function __destruct() | |
{ | |
} | |
} | |
/** | |
* Core class used for managing HTTP transports and making HTTP requests. | |
* | |
* This class is used to consistently make outgoing HTTP requests easy for developers | |
* while still being compatible with the many PHP configurations under which | |
* WordPress runs. | |
* | |
* Debugging includes several actions, which pass different variables for debugging the HTTP API. | |
* | |
* @since 2.7.0 | |
*/ | |
class WP_Http | |
{ | |
// Aliases for HTTP response codes. | |
const HTTP_CONTINUE = 100; | |
const SWITCHING_PROTOCOLS = 101; | |
const PROCESSING = 102; | |
const EARLY_HINTS = 103; | |
const OK = 200; | |
const CREATED = 201; | |
const ACCEPTED = 202; | |
const NON_AUTHORITATIVE_INFORMATION = 203; | |
const NO_CONTENT = 204; | |
const RESET_CONTENT = 205; | |
const PARTIAL_CONTENT = 206; | |
const MULTI_STATUS = 207; | |
const IM_USED = 226; | |
const MULTIPLE_CHOICES = 300; | |
const MOVED_PERMANENTLY = 301; | |
const FOUND = 302; | |
const SEE_OTHER = 303; | |
const NOT_MODIFIED = 304; | |
const USE_PROXY = 305; | |
const RESERVED = 306; | |
const TEMPORARY_REDIRECT = 307; | |
const PERMANENT_REDIRECT = 308; | |
const BAD_REQUEST = 400; | |
const UNAUTHORIZED = 401; | |
const PAYMENT_REQUIRED = 402; | |
const FORBIDDEN = 403; | |
const NOT_FOUND = 404; | |
const METHOD_NOT_ALLOWED = 405; | |
const NOT_ACCEPTABLE = 406; | |
const PROXY_AUTHENTICATION_REQUIRED = 407; | |
const REQUEST_TIMEOUT = 408; | |
const CONFLICT = 409; | |
const GONE = 410; | |
const LENGTH_REQUIRED = 411; | |
const PRECONDITION_FAILED = 412; | |
const REQUEST_ENTITY_TOO_LARGE = 413; | |
const REQUEST_URI_TOO_LONG = 414; | |
const UNSUPPORTED_MEDIA_TYPE = 415; | |
const REQUESTED_RANGE_NOT_SATISFIABLE = 416; | |
const EXPECTATION_FAILED = 417; | |
const IM_A_TEAPOT = 418; | |
const MISDIRECTED_REQUEST = 421; | |
const UNPROCESSABLE_ENTITY = 422; | |
const LOCKED = 423; | |
const FAILED_DEPENDENCY = 424; | |
const UPGRADE_REQUIRED = 426; | |
const PRECONDITION_REQUIRED = 428; | |
const TOO_MANY_REQUESTS = 429; | |
const REQUEST_HEADER_FIELDS_TOO_LARGE = 431; | |
const UNAVAILABLE_FOR_LEGAL_REASONS = 451; | |
const INTERNAL_SERVER_ERROR = 500; | |
const NOT_IMPLEMENTED = 501; | |
const BAD_GATEWAY = 502; | |
const SERVICE_UNAVAILABLE = 503; | |
const GATEWAY_TIMEOUT = 504; | |
const HTTP_VERSION_NOT_SUPPORTED = 505; | |
const VARIANT_ALSO_NEGOTIATES = 506; | |
const INSUFFICIENT_STORAGE = 507; | |
const NOT_EXTENDED = 510; | |
const NETWORK_AUTHENTICATION_REQUIRED = 511; | |
/** | |
* Send an HTTP request to a URI. | |
* | |
* Please note: The only URI that are supported in the HTTP Transport implementation | |
* are the HTTP and HTTPS protocols. | |
* | |
* @since 2.7.0 | |
* | |
* @param string $url The request URL. | |
* @param string|array $args { | |
* Optional. Array or string of HTTP request arguments. | |
* | |
* @type string $method Request method. Accepts 'GET', 'POST', 'HEAD', 'PUT', 'DELETE', | |
* 'TRACE', 'OPTIONS', or 'PATCH'. | |
* Some transports technically allow others, but should not be | |
* assumed. Default 'GET'. | |
* @type int $timeout How long the connection should stay open in seconds. Default 5. | |
* @type int $redirection Number of allowed redirects. Not supported by all transports | |
* Default 5. | |
* @type string $httpversion Version of the HTTP protocol to use. Accepts '1.0' and '1.1'. | |
* Default '1.0'. | |
* @type string $user-agent User-agent value sent. | |
* Default 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ). | |
* @type bool $reject_unsafe_urls Whether to pass URLs through wp_http_validate_url(). | |
* Default false. | |
* @type bool $blocking Whether the calling code requires the result of the request. | |
* If set to false, the request will be sent to the remote server, | |
* and processing returned to the calling code immediately, the caller | |
* will know if the request succeeded or failed, but will not receive | |
* any response from the remote server. Default true. | |
* @type string|array $headers Array or string of headers to send with the request. | |
* Default empty array. | |
* @type array $cookies List of cookies to send with the request. Default empty array. | |
* @type string|array $body Body to send with the request. Default null. | |
* @type bool $compress Whether to compress the $body when sending the request. | |
* Default false. | |
* @type bool $decompress Whether to decompress a compressed response. If set to false and | |
* compressed content is returned in the response anyway, it will | |
* need to be separately decompressed. Default true. | |
* @type bool $sslverify Whether to verify SSL for the request. Default true. | |
* @type string sslcertificates Absolute path to an SSL certificate .crt file. | |
* Default ABSPATH . WPINC . '/certificates/ca-bundle.crt'. | |
* @type bool $stream Whether to stream to a file. If set to true and no filename was | |
* given, it will be droped it in the WP temp dir and its name will | |
* be set using the basename of the URL. Default false. | |
* @type string $filename Filename of the file to write to when streaming. $stream must be | |
* set to true. Default null. | |
* @type int $limit_response_size Size in bytes to limit the response to. Default null. | |
* | |
* } | |
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. | |
* A WP_Error instance upon error. | |
*/ | |
public function request($url, $args = array()) | |
{ | |
} | |
/** | |
* Normalizes cookies for using in Requests. | |
* | |
* @since 4.6.0 | |
* | |
* @param array $cookies Array of cookies to send with the request. | |
* @return Requests_Cookie_Jar Cookie holder object. | |
*/ | |
public static function normalize_cookies($cookies) | |
{ | |
} | |
/** | |
* Match redirect behaviour to browser handling. | |
* | |
* Changes 302 redirects from POST to GET to match browser handling. Per | |
* RFC 7231, user agents can deviate from the strict reading of the | |
* specification for compatibility purposes. | |
* | |
* @since 4.6.0 | |
* | |
* @param string $location URL to redirect to. | |
* @param array $headers Headers for the redirect. | |
* @param string|array $data Body to send with the request. | |
* @param array $options Redirect request options. | |
* @param Requests_Response $original Response object. | |
*/ | |
public static function browser_redirect_compatibility($location, $headers, $data, &$options, $original) | |
{ | |
} | |
/** | |
* Validate redirected URLs. | |
* | |
* @since 4.7.5 | |
* | |
* @throws Requests_Exception On unsuccessful URL validation | |
* @param string $location URL to redirect to. | |
*/ | |
public static function validate_redirects($location) | |
{ | |
} | |
/** | |
* Tests which transports are capable of supporting the request. | |
* | |
* @since 3.2.0 | |
* | |
* @param array $args Request arguments | |
* @param string $url URL to Request | |
* | |
* @return string|false Class name for the first transport that claims to support the request. False if no transport claims to support the request. | |
*/ | |
public function _get_first_available_transport($args, $url = \null) | |
{ | |
} | |
/** | |
* Dispatches a HTTP request to a supporting transport. | |
* | |
* Tests each transport in order to find a transport which matches the request arguments. | |
* Also caches the transport instance to be used later. | |
* | |
* The order for requests is cURL, and then PHP Streams. | |
* | |
* @since 3.2.0 | |
* @deprecated 5.1.0 Use WP_Http::request() | |
* @see WP_Http::request() | |
* | |
* @param string $url URL to Request | |
* @param array $args Request arguments | |
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error | |
*/ | |
private function _dispatch_request($url, $args) | |
{ | |
} | |
/** | |
* Uses the POST HTTP method. | |
* | |
* Used for sending data that is expected to be in the body. | |
* | |
* @since 2.7.0 | |
* | |
* @param string $url The request URL. | |
* @param string|array $args Optional. Override the defaults. | |
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error | |
*/ | |
public function post($url, $args = array()) | |
{ | |
} | |
/** | |
* Uses the GET HTTP method. | |
* | |
* Used for sending data that is expected to be in the body. | |
* | |
* @since 2.7.0 | |
* | |
* @param string $url The request URL. | |
* @param string|array $args Optional. Override the defaults. | |
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error | |
*/ | |
public function get($url, $args = array()) | |
{ | |
} | |
/** | |
* Uses the HEAD HTTP method. | |
* | |
* Used for sending data that is expected to be in the body. | |
* | |
* @since 2.7.0 | |
* | |
* @param string $url The request URL. | |
* @param string|array $args Optional. Override the defaults. | |
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error | |
*/ | |
public function head($url, $args = array()) | |
{ | |
} | |
/** | |
* Parses the responses and splits the parts into headers and body. | |
* | |
* @since 2.7.0 | |
* | |
* @param string $strResponse The full response string | |
* @return array Array with 'headers' and 'body' keys. | |
*/ | |
public static function processResponse($strResponse) | |
{ | |
} | |
/** | |
* Transform header string into an array. | |
* | |
* If an array is given then it is assumed to be raw header data with numeric keys with the | |
* headers as the values. No headers must be passed that were already processed. | |
* | |
* @since 2.7.0 | |
* | |
* @param string|array $headers | |
* @param string $url The URL that was requested | |
* @return array Processed string headers. If duplicate headers are encountered, | |
* Then a numbered array is returned as the value of that header-key. | |
*/ | |
public static function processHeaders($headers, $url = '') | |
{ | |
} | |
/** | |
* Takes the arguments for a ::request() and checks for the cookie array. | |
* | |
* If it's found, then it upgrades any basic name => value pairs to WP_Http_Cookie instances, | |
* which are each parsed into strings and added to the Cookie: header (within the arguments array). | |
* Edits the array by reference. | |
* | |
* @since 2.8.0 | |
* | |
* @param array $r Full array of args passed into ::request() | |
*/ | |
public static function buildCookieHeader(&$r) | |
{ | |
} | |
/** | |
* Decodes chunk transfer-encoding, based off the HTTP 1.1 specification. | |
* | |
* Based off the HTTP http_encoding_dechunk function. | |
* | |
* @link https://tools.ietf.org/html/rfc2616#section-19.4.6 Process for chunked decoding. | |
* | |
* @since 2.7.0 | |
* | |
* @param string $body Body content | |
* @return string Chunked decoded body on success or raw body on failure. | |
*/ | |
public static function chunkTransferDecode($body) | |
{ | |
} | |
/** | |
* Block requests through the proxy. | |
* | |
* Those who are behind a proxy and want to prevent access to certain hosts may do so. This will | |
* prevent plugins from working and core functionality, if you don't include api.wordpress.org. | |
* | |
* You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL as true in your wp-config.php | |
* file and this will only allow localhost and your site to make requests. The constant | |
* WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the | |
* WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow, wildcard domains | |
* are supported, eg *.wordpress.org will allow for all subdomains of wordpress.org to be contacted. | |
* | |
* @since 2.8.0 | |
* @link https://core.trac.wordpress.org/ticket/8927 Allow preventing external requests. | |
* @link https://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_ACCESSIBLE_HOSTS | |
* | |
* @staticvar array|null $accessible_hosts | |
* @staticvar array $wildcard_regex | |
* | |
* @param string $uri URI of url. | |
* @return bool True to block, false to allow. | |
*/ | |
public function block_request($uri) | |
{ | |
} | |
/** | |
* Used as a wrapper for PHP's parse_url() function that handles edgecases in < PHP 5.4.7. | |
* | |
* @deprecated 4.4.0 Use wp_parse_url() | |
* @see wp_parse_url() | |
* | |
* @param string $url The URL to parse. | |
* @return bool|array False on failure; Array of URL components on success; | |
* See parse_url()'s return values. | |
*/ | |
protected static function parse_url($url) | |
{ | |
} | |
/** | |
* Converts a relative URL to an absolute URL relative to a given URL. | |
* | |
* If an Absolute URL is provided, no processing of that URL is done. | |
* | |
* @since 3.4.0 | |
* | |
* @param string $maybe_relative_path The URL which might be relative | |
* @param string $url The URL which $maybe_relative_path is relative to | |
* @return string An Absolute URL, in a failure condition where the URL cannot be parsed, the relative URL will be returned. | |
*/ | |
public static function make_absolute_url($maybe_relative_path, $url) | |
{ | |
} | |
/** | |
* Handles HTTP Redirects and follows them if appropriate. | |
* | |
* @since 3.7.0 | |
* | |
* @param string $url The URL which was requested. | |
* @param array $args The Arguments which were used to make the request. | |
* @param array $response The Response of the HTTP request. | |
* @return false|object False if no redirect is present, a WP_HTTP or WP_Error result otherwise. | |
*/ | |
public static function handle_redirects($url, $args, $response) | |
{ | |
} | |
/** | |
* Determines if a specified string represents an IP address or not. | |
* | |
* This function also detects the type of the IP address, returning either | |
* '4' or '6' to represent a IPv4 and IPv6 address respectively. | |
* This does not verify if the IP is a valid IP, only that it appears to be | |
* an IP address. | |
* | |
* @link http://home.deds.nl/~aeron/regex/ for IPv6 regex | |
* | |
* @since 3.7.0 | |
* | |
* @param string $maybe_ip A suspected IP address | |
* @return integer|bool Upon success, '4' or '6' to represent a IPv4 or IPv6 address, false upon failure | |
*/ | |
public static function is_ip_address($maybe_ip) | |
{ | |
} | |
} | |
/** | |
* Converts to and from JSON format. | |
* | |
* Brief example of use: | |
* | |
* <code> | |
* // create a new instance of Services_JSON | |
* $json = new Services_JSON(); | |
* | |
* // convert a complexe value to JSON notation, and send it to the browser | |
* $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); | |
* $output = $json->encode($value); | |
* | |
* print($output); | |
* // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] | |
* | |
* // accept incoming POST data, assumed to be in JSON notation | |
* $input = file_get_contents('php://input', 1000000); | |
* $value = $json->decode($input); | |
* </code> | |
*/ | |
class Services_JSON | |
{ | |
/** | |
* constructs a new JSON instance | |
* | |
* @param int $use object behavior flags; combine with boolean-OR | |
* | |
* possible values: | |
* - SERVICES_JSON_LOOSE_TYPE: loose typing. | |
* "{...}" syntax creates associative arrays | |
* instead of objects in decode(). | |
* - SERVICES_JSON_SUPPRESS_ERRORS: error suppression. | |
* Values which can't be encoded (e.g. resources) | |
* appear as NULL instead of throwing errors. | |
* By default, a deeply-nested resource will | |
* bubble up with an error, so all return values | |
* from encode() should be checked with isError() | |
* - SERVICES_JSON_USE_TO_JSON: call toJSON when serializing objects | |
* It serializes the return value from the toJSON call rather | |
* than the object itself, toJSON can return associative arrays, | |
* strings or numbers, if you return an object, make sure it does | |
* not have a toJSON method, otherwise an error will occur. | |
*/ | |
function __construct($use = 0) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function Services_JSON($use = 0) | |
{ | |
} | |
// private - cache the mbstring lookup results.. | |
var $_mb_strlen = \false; | |
var $_mb_substr = \false; | |
var $_mb_convert_encoding = \false; | |
/** | |
* convert a string from one UTF-16 char to one UTF-8 char | |
* | |
* Normally should be handled by mb_convert_encoding, but | |
* provides a slower PHP-only method for installations | |
* that lack the multibye string extension. | |
* | |
* @param string $utf16 UTF-16 character | |
* @return string UTF-8 character | |
* @access private | |
*/ | |
function utf162utf8($utf16) | |
{ | |
} | |
/** | |
* convert a string from one UTF-8 char to one UTF-16 char | |
* | |
* Normally should be handled by mb_convert_encoding, but | |
* provides a slower PHP-only method for installations | |
* that lack the multibye string extension. | |
* | |
* @param string $utf8 UTF-8 character | |
* @return string UTF-16 character | |
* @access private | |
*/ | |
function utf82utf16($utf8) | |
{ | |
} | |
/** | |
* encodes an arbitrary variable into JSON format (and sends JSON Header) | |
* | |
* @param mixed $var any number, boolean, string, array, or object to be encoded. | |
* see argument 1 to Services_JSON() above for array-parsing behavior. | |
* if var is a string, note that encode() always expects it | |
* to be in ASCII or UTF-8 format! | |
* | |
* @return mixed JSON string representation of input var or an error if a problem occurs | |
* @access public | |
*/ | |
function encode($var) | |
{ | |
} | |
/** | |
* encodes an arbitrary variable into JSON format without JSON Header - warning - may allow XSS!!!!) | |
* | |
* @param mixed $var any number, boolean, string, array, or object to be encoded. | |
* see argument 1 to Services_JSON() above for array-parsing behavior. | |
* if var is a string, note that encode() always expects it | |
* to be in ASCII or UTF-8 format! | |
* | |
* @return mixed JSON string representation of input var or an error if a problem occurs | |
* @access public | |
*/ | |
function encodeUnsafe($var) | |
{ | |
} | |
/** | |
* PRIVATE CODE that does the work of encodes an arbitrary variable into JSON format | |
* | |
* @param mixed $var any number, boolean, string, array, or object to be encoded. | |
* see argument 1 to Services_JSON() above for array-parsing behavior. | |
* if var is a string, note that encode() always expects it | |
* to be in ASCII or UTF-8 format! | |
* | |
* @return mixed JSON string representation of input var or an error if a problem occurs | |
* @access public | |
*/ | |
function _encode($var) | |
{ | |
} | |
/** | |
* array-walking function for use in generating JSON-formatted name-value pairs | |
* | |
* @param string $name name of key to use | |
* @param mixed $value reference to an array element to be encoded | |
* | |
* @return string JSON-formatted name-value pair, like '"name":value' | |
* @access private | |
*/ | |
function name_value($name, $value) | |
{ | |
} | |
/** | |
* reduce a string by removing leading and trailing comments and whitespace | |
* | |
* @param $str string string value to strip of comments and whitespace | |
* | |
* @return string string value stripped of comments and whitespace | |
* @access private | |
*/ | |
function reduce_string($str) | |
{ | |
} | |
/** | |
* decodes a JSON string into appropriate variable | |
* | |
* @param string $str JSON-formatted string | |
* | |
* @return mixed number, boolean, string, array, or object | |
* corresponding to given JSON input string. | |
* See argument 1 to Services_JSON() above for object-output behavior. | |
* Note that decode() always returns strings | |
* in ASCII or UTF-8 format! | |
* @access public | |
*/ | |
function decode($str) | |
{ | |
} | |
/** | |
* @todo Ultimately, this should just call PEAR::isError() | |
*/ | |
function isError($data, $code = \null) | |
{ | |
} | |
/** | |
* Calculates length of string in bytes | |
* @param string | |
* @return integer length | |
*/ | |
function strlen8($str) | |
{ | |
} | |
/** | |
* Returns part of a string, interpreting $start and $length as number of bytes. | |
* @param string | |
* @param integer start | |
* @param integer length | |
* @return integer length | |
*/ | |
function substr8($string, $start, $length = \false) | |
{ | |
} | |
} | |
/** | |
* API for fetching the HTML to embed remote content based on a provided URL | |
* | |
* Used internally by the WP_Embed class, but is designed to be generic. | |
* | |
* @link https://codex.wordpress.org/oEmbed oEmbed Codex Article | |
* @link http://oembed.com/ oEmbed Homepage | |
* | |
* @package WordPress | |
* @subpackage oEmbed | |
*/ | |
/** | |
* Core class used to implement oEmbed functionality. | |
* | |
* @since 2.9.0 | |
*/ | |
class WP_oEmbed | |
{ | |
/** | |
* A list of oEmbed providers. | |
* | |
* @since 2.9.0 | |
* @var array | |
*/ | |
public $providers = array(); | |
/** | |
* A list of an early oEmbed providers. | |
* | |
* @since 4.0.0 | |
* @var array | |
*/ | |
public static $early_providers = array(); | |
/** | |
* A list of private/protected methods, used for backward compatibility. | |
* | |
* @since 4.2.0 | |
* @var array | |
*/ | |
private $compat_methods = array('_fetch_with_format', '_parse_json', '_parse_xml', '_parse_xml_body'); | |
/** | |
* Constructor. | |
* | |
* @since 2.9.0 | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Exposes private/protected methods for backward compatibility. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $name Method to call. | |
* @param array $arguments Arguments to pass when calling. | |
* @return mixed|bool Return value of the callback, false otherwise. | |
*/ | |
public function __call($name, $arguments) | |
{ | |
} | |
/** | |
* Takes a URL and returns the corresponding oEmbed provider's URL, if there is one. | |
* | |
* @since 4.0.0 | |
* | |
* @see WP_oEmbed::discover() | |
* | |
* @param string $url The URL to the content. | |
* @param string|array $args Optional provider arguments. | |
* @return false|string False on failure, otherwise the oEmbed provider URL. | |
*/ | |
public function get_provider($url, $args = '') | |
{ | |
} | |
/** | |
* Adds an oEmbed provider. | |
* | |
* The provider is added just-in-time when wp_oembed_add_provider() is called before | |
* the {@see 'plugins_loaded'} hook. | |
* | |
* The just-in-time addition is for the benefit of the {@see 'oembed_providers'} filter. | |
* | |
* @since 4.0.0 | |
* | |
* @see wp_oembed_add_provider() | |
* | |
* @param string $format Format of URL that this provider can handle. You can use | |
* asterisks as wildcards. | |
* @param string $provider The URL to the oEmbed provider.. | |
* @param bool $regex Optional. Whether the $format parameter is in a regex format. | |
* Default false. | |
*/ | |
public static function _add_provider_early($format, $provider, $regex = \false) | |
{ | |
} | |
/** | |
* Removes an oEmbed provider. | |
* | |
* The provider is removed just-in-time when wp_oembed_remove_provider() is called before | |
* the {@see 'plugins_loaded'} hook. | |
* | |
* The just-in-time removal is for the benefit of the {@see 'oembed_providers'} filter. | |
* | |
* @since 4.0.0 | |
* | |
* @see wp_oembed_remove_provider() | |
* | |
* @param string $format The format of URL that this provider can handle. You can use | |
* asterisks as wildcards. | |
*/ | |
public static function _remove_provider_early($format) | |
{ | |
} | |
/** | |
* Takes a URL and attempts to return the oEmbed data. | |
* | |
* @see WP_oEmbed::fetch() | |
* | |
* @since 4.8.0 | |
* | |
* @param string $url The URL to the content that should be attempted to be embedded. | |
* @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty. | |
* @return false|object False on failure, otherwise the result in the form of an object. | |
*/ | |
public function get_data($url, $args = '') | |
{ | |
} | |
/** | |
* The do-it-all function that takes a URL and attempts to return the HTML. | |
* | |
* @see WP_oEmbed::fetch() | |
* @see WP_oEmbed::data2html() | |
* | |
* @since 2.9.0 | |
* | |
* @param string $url The URL to the content that should be attempted to be embedded. | |
* @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty. | |
* @return false|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed. | |
*/ | |
public function get_html($url, $args = '') | |
{ | |
} | |
/** | |
* Attempts to discover link tags at the given URL for an oEmbed provider. | |
* | |
* @since 2.9.0 | |
* | |
* @param string $url The URL that should be inspected for discovery `<link>` tags. | |
* @return false|string False on failure, otherwise the oEmbed provider URL. | |
*/ | |
public function discover($url) | |
{ | |
} | |
/** | |
* Connects to a oEmbed provider and returns the result. | |
* | |
* @since 2.9.0 | |
* | |
* @param string $provider The URL to the oEmbed provider. | |
* @param string $url The URL to the content that is desired to be embedded. | |
* @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty. | |
* @return false|object False on failure, otherwise the result in the form of an object. | |
*/ | |
public function fetch($provider, $url, $args = '') | |
{ | |
} | |
/** | |
* Fetches result from an oEmbed provider for a specific format and complete provider URL | |
* | |
* @since 3.0.0 | |
* | |
* @param string $provider_url_with_args URL to the provider with full arguments list (url, maxheight, etc.) | |
* @param string $format Format to use | |
* @return false|object|WP_Error False on failure, otherwise the result in the form of an object. | |
*/ | |
private function _fetch_with_format($provider_url_with_args, $format) | |
{ | |
} | |
/** | |
* Parses a json response body. | |
* | |
* @since 3.0.0 | |
* | |
* @param string $response_body | |
* @return object|false | |
*/ | |
private function _parse_json($response_body) | |
{ | |
} | |
/** | |
* Parses an XML response body. | |
* | |
* @since 3.0.0 | |
* | |
* @param string $response_body | |
* @return object|false | |
*/ | |
private function _parse_xml($response_body) | |
{ | |
} | |
/** | |
* Serves as a helper function for parsing an XML response body. | |
* | |
* @since 3.6.0 | |
* | |
* @param string $response_body | |
* @return stdClass|false | |
*/ | |
private function _parse_xml_body($response_body) | |
{ | |
} | |
/** | |
* Converts a data object from WP_oEmbed::fetch() and returns the HTML. | |
* | |
* @since 2.9.0 | |
* | |
* @param object $data A data object result from an oEmbed provider. | |
* @param string $url The URL to the content that is desired to be embedded. | |
* @return false|string False on error, otherwise the HTML needed to embed. | |
*/ | |
public function data2html($data, $url) | |
{ | |
} | |
/** | |
* Strips any new lines from the HTML. | |
* | |
* @since 2.9.0 as strip_scribd_newlines() | |
* @since 3.0.0 | |
* | |
* @param string $html Existing HTML. | |
* @param object $data Data object from WP_oEmbed::data2html() | |
* @param string $url The original URL passed to oEmbed. | |
* @return string Possibly modified $html | |
*/ | |
public function _strip_newlines($html, $data, $url) | |
{ | |
} | |
} | |
/** | |
* Portable PHP password hashing framework. | |
* @package phpass | |
* @since 2.5.0 | |
* @version 0.3 / WordPress | |
* @link http://www.openwall.com/phpass/ | |
*/ | |
# | |
# Written by Solar Designer <solar at openwall.com> in 2004-2006 and placed in | |
# the public domain. Revised in subsequent years, still public domain. | |
# | |
# There's absolutely no warranty. | |
# | |
# Please be sure to update the Version line if you edit this file in any way. | |
# It is suggested that you leave the main version number intact, but indicate | |
# your project name (after the slash) and add your own revision information. | |
# | |
# Please do not change the "private" password hashing method implemented in | |
# here, thereby making your hashes incompatible. However, if you must, please | |
# change the hash type identifier (the "$P$") to something different. | |
# | |
# Obviously, since this code is in the public domain, the above are not | |
# requirements (there can be none), but merely suggestions. | |
# | |
/** | |
* Portable PHP password hashing framework. | |
* | |
* @package phpass | |
* @version 0.3 / WordPress | |
* @link http://www.openwall.com/phpass/ | |
* @since 2.5.0 | |
*/ | |
class PasswordHash | |
{ | |
var $itoa64; | |
var $iteration_count_log2; | |
var $portable_hashes; | |
var $random_state; | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($iteration_count_log2, $portable_hashes) | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function PasswordHash($iteration_count_log2, $portable_hashes) | |
{ | |
} | |
function get_random_bytes($count) | |
{ | |
} | |
function encode64($input, $count) | |
{ | |
} | |
function gensalt_private($input) | |
{ | |
} | |
function crypt_private($password, $setting) | |
{ | |
} | |
function gensalt_extended($input) | |
{ | |
} | |
function gensalt_blowfish($input) | |
{ | |
} | |
function HashPassword($password) | |
{ | |
} | |
function CheckPassword($password, $stored_hash) | |
{ | |
} | |
} | |
/** | |
* PHPMailer - PHP email creation and transport class. | |
* PHP Version 5 | |
* @package PHPMailer | |
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project | |
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk> | |
* @author Jim Jagielski (jimjag) <jimjag@gmail.com> | |
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net> | |
* @author Brent R. Matzelle (original founder) | |
* @copyright 2012 - 2014 Marcus Bointon | |
* @copyright 2010 - 2012 Jim Jagielski | |
* @copyright 2004 - 2009 Andy Prevost | |
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License | |
* @note This program is distributed in the hope that it will be useful - WITHOUT | |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
* FITNESS FOR A PARTICULAR PURPOSE. | |
*/ | |
/** | |
* PHPMailer - PHP email creation and transport class. | |
* @package PHPMailer | |
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk> | |
* @author Jim Jagielski (jimjag) <jimjag@gmail.com> | |
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net> | |
* @author Brent R. Matzelle (original founder) | |
*/ | |
class PHPMailer | |
{ | |
/** | |
* The PHPMailer Version number. | |
* @var string | |
*/ | |
public $Version = '5.2.22'; | |
/** | |
* Email priority. | |
* Options: null (default), 1 = High, 3 = Normal, 5 = low. | |
* When null, the header is not set at all. | |
* @var integer | |
*/ | |
public $Priority = \null; | |
/** | |
* The character set of the message. | |
* @var string | |
*/ | |
public $CharSet = 'iso-8859-1'; | |
/** | |
* The MIME Content-type of the message. | |
* @var string | |
*/ | |
public $ContentType = 'text/plain'; | |
/** | |
* The message encoding. | |
* Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". | |
* @var string | |
*/ | |
public $Encoding = '8bit'; | |
/** | |
* Holds the most recent mailer error message. | |
* @var string | |
*/ | |
public $ErrorInfo = ''; | |
/** | |
* The From email address for the message. | |
* @var string | |
*/ | |
public $From = 'root@localhost'; | |
/** | |
* The From name of the message. | |
* @var string | |
*/ | |
public $FromName = 'Root User'; | |
/** | |
* The Sender email (Return-Path) of the message. | |
* If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. | |
* @var string | |
*/ | |
public $Sender = ''; | |
/** | |
* The Return-Path of the message. | |
* If empty, it will be set to either From or Sender. | |
* @var string | |
* @deprecated Email senders should never set a return-path header; | |
* it's the receiver's job (RFC5321 section 4.4), so this no longer does anything. | |
* @link https://tools.ietf.org/html/rfc5321#section-4.4 RFC5321 reference | |
*/ | |
public $ReturnPath = ''; | |
/** | |
* The Subject of the message. | |
* @var string | |
*/ | |
public $Subject = ''; | |
/** | |
* An HTML or plain text message body. | |
* If HTML then call isHTML(true). | |
* @var string | |
*/ | |
public $Body = ''; | |
/** | |
* The plain-text message body. | |
* This body can be read by mail clients that do not have HTML email | |
* capability such as mutt & Eudora. | |
* Clients that can read HTML will view the normal Body. | |
* @var string | |
*/ | |
public $AltBody = ''; | |
/** | |
* An iCal message part body. | |
* Only supported in simple alt or alt_inline message types | |
* To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator | |
* @link http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ | |
* @link http://kigkonsult.se/iCalcreator/ | |
* @var string | |
*/ | |
public $Ical = ''; | |
/** | |
* The complete compiled MIME message body. | |
* @access protected | |
* @var string | |
*/ | |
protected $MIMEBody = ''; | |
/** | |
* The complete compiled MIME message headers. | |
* @var string | |
* @access protected | |
*/ | |
protected $MIMEHeader = ''; | |
/** | |
* Extra headers that createHeader() doesn't fold in. | |
* @var string | |
* @access protected | |
*/ | |
protected $mailHeader = ''; | |
/** | |
* Word-wrap the message body to this number of chars. | |
* Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. | |
* @var integer | |
*/ | |
public $WordWrap = 0; | |
/** | |
* Which method to use to send mail. | |
* Options: "mail", "sendmail", or "smtp". | |
* @var string | |
*/ | |
public $Mailer = 'mail'; | |
/** | |
* The path to the sendmail program. | |
* @var string | |
*/ | |
public $Sendmail = '/usr/sbin/sendmail'; | |
/** | |
* Whether mail() uses a fully sendmail-compatible MTA. | |
* One which supports sendmail's "-oi -f" options. | |
* @var boolean | |
*/ | |
public $UseSendmailOptions = \true; | |
/** | |
* Path to PHPMailer plugins. | |
* Useful if the SMTP class is not in the PHP include path. | |
* @var string | |
* @deprecated Should not be needed now there is an autoloader. | |
*/ | |
public $PluginDir = ''; | |
/** | |
* The email address that a reading confirmation should be sent to, also known as read receipt. | |
* @var string | |
*/ | |
public $ConfirmReadingTo = ''; | |
/** | |
* The hostname to use in the Message-ID header and as default HELO string. | |
* If empty, PHPMailer attempts to find one with, in order, | |
* $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value | |
* 'localhost.localdomain'. | |
* @var string | |
*/ | |
public $Hostname = ''; | |
/** | |
* An ID to be used in the Message-ID header. | |
* If empty, a unique id will be generated. | |
* You can set your own, but it must be in the format "<id@domain>", | |
* as defined in RFC5322 section 3.6.4 or it will be ignored. | |
* @see https://tools.ietf.org/html/rfc5322#section-3.6.4 | |
* @var string | |
*/ | |
public $MessageID = ''; | |
/** | |
* The message Date to be used in the Date header. | |
* If empty, the current date will be added. | |
* @var string | |
*/ | |
public $MessageDate = ''; | |
/** | |
* SMTP hosts. | |
* Either a single hostname or multiple semicolon-delimited hostnames. | |
* You can also specify a different port | |
* for each host by using this format: [hostname:port] | |
* (e.g. "smtp1.example.com:25;smtp2.example.com"). | |
* You can also specify encryption type, for example: | |
* (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). | |
* Hosts will be tried in order. | |
* @var string | |
*/ | |
public $Host = 'localhost'; | |
/** | |
* The default SMTP server port. | |
* @var integer | |
* @TODO Why is this needed when the SMTP class takes care of it? | |
*/ | |
public $Port = 25; | |
/** | |
* The SMTP HELO of the message. | |
* Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find | |
* one with the same method described above for $Hostname. | |
* @var string | |
* @see PHPMailer::$Hostname | |
*/ | |
public $Helo = ''; | |
/** | |
* What kind of encryption to use on the SMTP connection. | |
* Options: '', 'ssl' or 'tls' | |
* @var string | |
*/ | |
public $SMTPSecure = ''; | |
/** | |
* Whether to enable TLS encryption automatically if a server supports it, | |
* even if `SMTPSecure` is not set to 'tls'. | |
* Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. | |
* @var boolean | |
*/ | |
public $SMTPAutoTLS = \true; | |
/** | |
* Whether to use SMTP authentication. | |
* Uses the Username and Password properties. | |
* @var boolean | |
* @see PHPMailer::$Username | |
* @see PHPMailer::$Password | |
*/ | |
public $SMTPAuth = \false; | |
/** | |
* Options array passed to stream_context_create when connecting via SMTP. | |
* @var array | |
*/ | |
public $SMTPOptions = array(); | |
/** | |
* SMTP username. | |
* @var string | |
*/ | |
public $Username = ''; | |
/** | |
* SMTP password. | |
* @var string | |
*/ | |
public $Password = ''; | |
/** | |
* SMTP auth type. | |
* Options are CRAM-MD5, LOGIN, PLAIN, attempted in that order if not specified | |
* @var string | |
*/ | |
public $AuthType = ''; | |
/** | |
* SMTP realm. | |
* Used for NTLM auth | |
* @var string | |
*/ | |
public $Realm = ''; | |
/** | |
* SMTP workstation. | |
* Used for NTLM auth | |
* @var string | |
*/ | |
public $Workstation = ''; | |
/** | |
* The SMTP server timeout in seconds. | |
* Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 | |
* @var integer | |
*/ | |
public $Timeout = 300; | |
/** | |
* SMTP class debug output mode. | |
* Debug output level. | |
* Options: | |
* * `0` No output | |
* * `1` Commands | |
* * `2` Data and commands | |
* * `3` As 2 plus connection status | |
* * `4` Low-level data output | |
* @var integer | |
* @see SMTP::$do_debug | |
*/ | |
public $SMTPDebug = 0; | |
/** | |
* How to handle debug output. | |
* Options: | |
* * `echo` Output plain-text as-is, appropriate for CLI | |
* * `html` Output escaped, line breaks converted to `<br>`, appropriate for browser output | |
* * `error_log` Output to error log as configured in php.ini | |
* | |
* Alternatively, you can provide a callable expecting two params: a message string and the debug level: | |
* <code> | |
* $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; | |
* </code> | |
* @var string|callable | |
* @see SMTP::$Debugoutput | |
*/ | |
public $Debugoutput = 'echo'; | |
/** | |
* Whether to keep SMTP connection open after each message. | |
* If this is set to true then to close the connection | |
* requires an explicit call to smtpClose(). | |
* @var boolean | |
*/ | |
public $SMTPKeepAlive = \false; | |
/** | |
* Whether to split multiple to addresses into multiple messages | |
* or send them all in one message. | |
* Only supported in `mail` and `sendmail` transports, not in SMTP. | |
* @var boolean | |
*/ | |
public $SingleTo = \false; | |
/** | |
* Storage for addresses when SingleTo is enabled. | |
* @var array | |
* @TODO This should really not be public | |
*/ | |
public $SingleToArray = array(); | |
/** | |
* Whether to generate VERP addresses on send. | |
* Only applicable when sending via SMTP. | |
* @link https://en.wikipedia.org/wiki/Variable_envelope_return_path | |
* @link http://www.postfix.org/VERP_README.html Postfix VERP info | |
* @var boolean | |
*/ | |
public $do_verp = \false; | |
/** | |
* Whether to allow sending messages with an empty body. | |
* @var boolean | |
*/ | |
public $AllowEmpty = \false; | |
/** | |
* The default line ending. | |
* @note The default remains "\n". We force CRLF where we know | |
* it must be used via self::CRLF. | |
* @var string | |
*/ | |
public $LE = "\n"; | |
/** | |
* DKIM selector. | |
* @var string | |
*/ | |
public $DKIM_selector = ''; | |
/** | |
* DKIM Identity. | |
* Usually the email address used as the source of the email. | |
* @var string | |
*/ | |
public $DKIM_identity = ''; | |
/** | |
* DKIM passphrase. | |
* Used if your key is encrypted. | |
* @var string | |
*/ | |
public $DKIM_passphrase = ''; | |
/** | |
* DKIM signing domain name. | |
* @example 'example.com' | |
* @var string | |
*/ | |
public $DKIM_domain = ''; | |
/** | |
* DKIM private key file path. | |
* @var string | |
*/ | |
public $DKIM_private = ''; | |
/** | |
* DKIM private key string. | |
* If set, takes precedence over `$DKIM_private`. | |
* @var string | |
*/ | |
public $DKIM_private_string = ''; | |
/** | |
* Callback Action function name. | |
* | |
* The function that handles the result of the send email action. | |
* It is called out by send() for each email sent. | |
* | |
* Value can be any php callable: http://www.php.net/is_callable | |
* | |
* Parameters: | |
* boolean $result result of the send action | |
* string $to email address of the recipient | |
* string $cc cc email addresses | |
* string $bcc bcc email addresses | |
* string $subject the subject | |
* string $body the email body | |
* string $from email address of sender | |
* @var string | |
*/ | |
public $action_function = ''; | |
/** | |
* What to put in the X-Mailer header. | |
* Options: An empty string for PHPMailer default, whitespace for none, or a string to use | |
* @var string | |
*/ | |
public $XMailer = ''; | |
/** | |
* Which validator to use by default when validating email addresses. | |
* May be a callable to inject your own validator, but there are several built-in validators. | |
* @see PHPMailer::validateAddress() | |
* @var string|callable | |
* @static | |
*/ | |
public static $validator = 'auto'; | |
/** | |
* An instance of the SMTP sender class. | |
* @var SMTP | |
* @access protected | |
*/ | |
protected $smtp = \null; | |
/** | |
* The array of 'to' names and addresses. | |
* @var array | |
* @access protected | |
*/ | |
protected $to = array(); | |
/** | |
* The array of 'cc' names and addresses. | |
* @var array | |
* @access protected | |
*/ | |
protected $cc = array(); | |
/** | |
* The array of 'bcc' names and addresses. | |
* @var array | |
* @access protected | |
*/ | |
protected $bcc = array(); | |
/** | |
* The array of reply-to names and addresses. | |
* @var array | |
* @access protected | |
*/ | |
protected $ReplyTo = array(); | |
/** | |
* An array of all kinds of addresses. | |
* Includes all of $to, $cc, $bcc | |
* @var array | |
* @access protected | |
* @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc | |
*/ | |
protected $all_recipients = array(); | |
/** | |
* An array of names and addresses queued for validation. | |
* In send(), valid and non duplicate entries are moved to $all_recipients | |
* and one of $to, $cc, or $bcc. | |
* This array is used only for addresses with IDN. | |
* @var array | |
* @access protected | |
* @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc | |
* @see PHPMailer::$all_recipients | |
*/ | |
protected $RecipientsQueue = array(); | |
/** | |
* An array of reply-to names and addresses queued for validation. | |
* In send(), valid and non duplicate entries are moved to $ReplyTo. | |
* This array is used only for addresses with IDN. | |
* @var array | |
* @access protected | |
* @see PHPMailer::$ReplyTo | |
*/ | |
protected $ReplyToQueue = array(); | |
/** | |
* The array of attachments. | |
* @var array | |
* @access protected | |
*/ | |
protected $attachment = array(); | |
/** | |
* The array of custom headers. | |
* @var array | |
* @access protected | |
*/ | |
protected $CustomHeader = array(); | |
/** | |
* The most recent Message-ID (including angular brackets). | |
* @var string | |
* @access protected | |
*/ | |
protected $lastMessageID = ''; | |
/** | |
* The message's MIME type. | |
* @var string | |
* @access protected | |
*/ | |
protected $message_type = ''; | |
/** | |
* The array of MIME boundary strings. | |
* @var array | |
* @access protected | |
*/ | |
protected $boundary = array(); | |
/** | |
* The array of available languages. | |
* @var array | |
* @access protected | |
*/ | |
protected $language = array(); | |
/** | |
* The number of errors encountered. | |
* @var integer | |
* @access protected | |
*/ | |
protected $error_count = 0; | |
/** | |
* The S/MIME certificate file path. | |
* @var string | |
* @access protected | |
*/ | |
protected $sign_cert_file = ''; | |
/** | |
* The S/MIME key file path. | |
* @var string | |
* @access protected | |
*/ | |
protected $sign_key_file = ''; | |
/** | |
* The optional S/MIME extra certificates ("CA Chain") file path. | |
* @var string | |
* @access protected | |
*/ | |
protected $sign_extracerts_file = ''; | |
/** | |
* The S/MIME password for the key. | |
* Used only if the key is encrypted. | |
* @var string | |
* @access protected | |
*/ | |
protected $sign_key_pass = ''; | |
/** | |
* Whether to throw exceptions for errors. | |
* @var boolean | |
* @access protected | |
*/ | |
protected $exceptions = \false; | |
/** | |
* Unique ID used for message ID and boundaries. | |
* @var string | |
* @access protected | |
*/ | |
protected $uniqueid = ''; | |
/** | |
* Error severity: message only, continue processing. | |
*/ | |
const STOP_MESSAGE = 0; | |
/** | |
* Error severity: message, likely ok to continue processing. | |
*/ | |
const STOP_CONTINUE = 1; | |
/** | |
* Error severity: message, plus full stop, critical error reached. | |
*/ | |
const STOP_CRITICAL = 2; | |
/** | |
* SMTP RFC standard line ending. | |
*/ | |
const CRLF = "\r\n"; | |
/** | |
* The maximum line length allowed by RFC 2822 section 2.1.1 | |
* @var integer | |
*/ | |
const MAX_LINE_LENGTH = 998; | |
/** | |
* Constructor. | |
* @param boolean $exceptions Should we throw external exceptions? | |
*/ | |
public function __construct($exceptions = \null) | |
{ | |
} | |
/** | |
* Destructor. | |
*/ | |
public function __destruct() | |
{ | |
} | |
/** | |
* Call mail() in a safe_mode-aware fashion. | |
* Also, unless sendmail_path points to sendmail (or something that | |
* claims to be sendmail), don't pass params (not a perfect fix, | |
* but it will do) | |
* @param string $to To | |
* @param string $subject Subject | |
* @param string $body Message Body | |
* @param string $header Additional Header(s) | |
* @param string $params Params | |
* @access private | |
* @return boolean | |
*/ | |
private function mailPassthru($to, $subject, $body, $header, $params) | |
{ | |
} | |
/** | |
* Output debugging info via user-defined method. | |
* Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug). | |
* @see PHPMailer::$Debugoutput | |
* @see PHPMailer::$SMTPDebug | |
* @param string $str | |
*/ | |
protected function edebug($str) | |
{ | |
} | |
/** | |
* Sets message type to HTML or plain. | |
* @param boolean $isHtml True for HTML mode. | |
* @return void | |
*/ | |
public function isHTML($isHtml = \true) | |
{ | |
} | |
/** | |
* Send messages using SMTP. | |
* @return void | |
*/ | |
public function isSMTP() | |
{ | |
} | |
/** | |
* Send messages using PHP's mail() function. | |
* @return void | |
*/ | |
public function isMail() | |
{ | |
} | |
/** | |
* Send messages using $Sendmail. | |
* @return void | |
*/ | |
public function isSendmail() | |
{ | |
} | |
/** | |
* Send messages using qmail. | |
* @return void | |
*/ | |
public function isQmail() | |
{ | |
} | |
/** | |
* Add a "To" address. | |
* @param string $address The email address to send to | |
* @param string $name | |
* @return boolean true on success, false if address already used or invalid in some way | |
*/ | |
public function addAddress($address, $name = '') | |
{ | |
} | |
/** | |
* Add a "CC" address. | |
* @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. | |
* @param string $address The email address to send to | |
* @param string $name | |
* @return boolean true on success, false if address already used or invalid in some way | |
*/ | |
public function addCC($address, $name = '') | |
{ | |
} | |
/** | |
* Add a "BCC" address. | |
* @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. | |
* @param string $address The email address to send to | |
* @param string $name | |
* @return boolean true on success, false if address already used or invalid in some way | |
*/ | |
public function addBCC($address, $name = '') | |
{ | |
} | |
/** | |
* Add a "Reply-To" address. | |
* @param string $address The email address to reply to | |
* @param string $name | |
* @return boolean true on success, false if address already used or invalid in some way | |
*/ | |
public function addReplyTo($address, $name = '') | |
{ | |
} | |
/** | |
* Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer | |
* can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still | |
* be modified after calling this function), addition of such addresses is delayed until send(). | |
* Addresses that have been added already return false, but do not throw exceptions. | |
* @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' | |
* @param string $address The email address to send, resp. to reply to | |
* @param string $name | |
* @throws phpmailerException | |
* @return boolean true on success, false if address already used or invalid in some way | |
* @access protected | |
*/ | |
protected function addOrEnqueueAnAddress($kind, $address, $name) | |
{ | |
} | |
/** | |
* Add an address to one of the recipient arrays or to the ReplyTo array. | |
* Addresses that have been added already return false, but do not throw exceptions. | |
* @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' | |
* @param string $address The email address to send, resp. to reply to | |
* @param string $name | |
* @throws phpmailerException | |
* @return boolean true on success, false if address already used or invalid in some way | |
* @access protected | |
*/ | |
protected function addAnAddress($kind, $address, $name = '') | |
{ | |
} | |
/** | |
* Parse and validate a string containing one or more RFC822-style comma-separated email addresses | |
* of the form "display name <address>" into an array of name/address pairs. | |
* Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. | |
* Note that quotes in the name part are removed. | |
* @param string $addrstr The address list string | |
* @param bool $useimap Whether to use the IMAP extension to parse the list | |
* @return array | |
* @link http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation | |
*/ | |
public function parseAddresses($addrstr, $useimap = \true) | |
{ | |
} | |
/** | |
* Set the From and FromName properties. | |
* @param string $address | |
* @param string $name | |
* @param boolean $auto Whether to also set the Sender address, defaults to true | |
* @throws phpmailerException | |
* @return boolean | |
*/ | |
public function setFrom($address, $name = '', $auto = \true) | |
{ | |
} | |
/** | |
* Return the Message-ID header of the last email. | |
* Technically this is the value from the last time the headers were created, | |
* but it's also the message ID of the last sent message except in | |
* pathological cases. | |
* @return string | |
*/ | |
public function getLastMessageID() | |
{ | |
} | |
/** | |
* Check that a string looks like an email address. | |
* @param string $address The email address to check | |
* @param string|callable $patternselect A selector for the validation pattern to use : | |
* * `auto` Pick best pattern automatically; | |
* * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; | |
* * `pcre` Use old PCRE implementation; | |
* * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; | |
* * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. | |
* * `noregex` Don't use a regex: super fast, really dumb. | |
* Alternatively you may pass in a callable to inject your own validator, for example: | |
* PHPMailer::validateAddress('user@example.com', function($address) { | |
* return (strpos($address, '@') !== false); | |
* }); | |
* You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. | |
* @return boolean | |
* @static | |
* @access public | |
*/ | |
public static function validateAddress($address, $patternselect = \null) | |
{ | |
} | |
/** | |
* Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the | |
* "intl" and "mbstring" PHP extensions. | |
* @return bool "true" if required functions for IDN support are present | |
*/ | |
public function idnSupported() | |
{ | |
} | |
/** | |
* Converts IDN in given email address to its ASCII form, also known as punycode, if possible. | |
* Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. | |
* This function silently returns unmodified address if: | |
* - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) | |
* - Conversion to punycode is impossible (e.g. required PHP functions are not available) | |
* or fails for any reason (e.g. domain has characters not allowed in an IDN) | |
* @see PHPMailer::$CharSet | |
* @param string $address The email address to convert | |
* @return string The encoded address in ASCII form | |
*/ | |
public function punyencodeAddress($address) | |
{ | |
} | |
/** | |
* Create a message and send it. | |
* Uses the sending method specified by $Mailer. | |
* @throws phpmailerException | |
* @return boolean false on error - See the ErrorInfo property for details of the error. | |
*/ | |
public function send() | |
{ | |
} | |
/** | |
* Prepare a message for sending. | |
* @throws phpmailerException | |
* @return boolean | |
*/ | |
public function preSend() | |
{ | |
} | |
/** | |
* Actually send a message. | |
* Send the email via the selected mechanism | |
* @throws phpmailerException | |
* @return boolean | |
*/ | |
public function postSend() | |
{ | |
} | |
/** | |
* Send mail using the $Sendmail program. | |
* @param string $header The message headers | |
* @param string $body The message body | |
* @see PHPMailer::$Sendmail | |
* @throws phpmailerException | |
* @access protected | |
* @return boolean | |
*/ | |
protected function sendmailSend($header, $body) | |
{ | |
} | |
/** | |
* Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters. | |
* | |
* Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. | |
* @param string $string The string to be validated | |
* @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report | |
* @access protected | |
* @return boolean | |
*/ | |
protected static function isShellSafe($string) | |
{ | |
} | |
/** | |
* Send mail using the PHP mail() function. | |
* @param string $header The message headers | |
* @param string $body The message body | |
* @link http://www.php.net/manual/en/book.mail.php | |
* @throws phpmailerException | |
* @access protected | |
* @return boolean | |
*/ | |
protected function mailSend($header, $body) | |
{ | |
} | |
/** | |
* Get an instance to use for SMTP operations. | |
* Override this function to load your own SMTP implementation | |
* @return SMTP | |
*/ | |
public function getSMTPInstance() | |
{ | |
} | |
/** | |
* Send mail via SMTP. | |
* Returns false if there is a bad MAIL FROM, RCPT, or DATA input. | |
* Uses the PHPMailerSMTP class by default. | |
* @see PHPMailer::getSMTPInstance() to use a different class. | |
* @param string $header The message headers | |
* @param string $body The message body | |
* @throws phpmailerException | |
* @uses SMTP | |
* @access protected | |
* @return boolean | |
*/ | |
protected function smtpSend($header, $body) | |
{ | |
} | |
/** | |
* Initiate a connection to an SMTP server. | |
* Returns false if the operation failed. | |
* @param array $options An array of options compatible with stream_context_create() | |
* @uses SMTP | |
* @access public | |
* @throws phpmailerException | |
* @return boolean | |
*/ | |
public function smtpConnect($options = \null) | |
{ | |
} | |
/** | |
* Close the active SMTP session if one exists. | |
* @return void | |
*/ | |
public function smtpClose() | |
{ | |
} | |
/** | |
* Set the language for error messages. | |
* Returns false if it cannot load the language file. | |
* The default language is English. | |
* @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") | |
* @param string $lang_path Path to the language file directory, with trailing separator (slash) | |
* @return boolean | |
* @access public | |
*/ | |
public function setLanguage($langcode = 'en', $lang_path = '') | |
{ | |
} | |
/** | |
* Get the array of strings for the current language. | |
* @return array | |
*/ | |
public function getTranslations() | |
{ | |
} | |
/** | |
* Create recipient headers. | |
* @access public | |
* @param string $type | |
* @param array $addr An array of recipient, | |
* where each recipient is a 2-element indexed array with element 0 containing an address | |
* and element 1 containing a name, like: | |
* array(array('joe@example.com', 'Joe User'), array('zoe@example.com', 'Zoe User')) | |
* @return string | |
*/ | |
public function addrAppend($type, $addr) | |
{ | |
} | |
/** | |
* Format an address for use in a message header. | |
* @access public | |
* @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name | |
* like array('joe@example.com', 'Joe User') | |
* @return string | |
*/ | |
public function addrFormat($addr) | |
{ | |
} | |
/** | |
* Word-wrap message. | |
* For use with mailers that do not automatically perform wrapping | |
* and for quoted-printable encoded messages. | |
* Original written by philippe. | |
* @param string $message The message to wrap | |
* @param integer $length The line length to wrap to | |
* @param boolean $qp_mode Whether to run in Quoted-Printable mode | |
* @access public | |
* @return string | |
*/ | |
public function wrapText($message, $length, $qp_mode = \false) | |
{ | |
} | |
/** | |
* Find the last character boundary prior to $maxLength in a utf-8 | |
* quoted-printable encoded string. | |
* Original written by Colin Brown. | |
* @access public | |
* @param string $encodedText utf-8 QP text | |
* @param integer $maxLength Find the last character boundary prior to this length | |
* @return integer | |
*/ | |
public function utf8CharBoundary($encodedText, $maxLength) | |
{ | |
} | |
/** | |
* Apply word wrapping to the message body. | |
* Wraps the message body to the number of chars set in the WordWrap property. | |
* You should only do this to plain-text bodies as wrapping HTML tags may break them. | |
* This is called automatically by createBody(), so you don't need to call it yourself. | |
* @access public | |
* @return void | |
*/ | |
public function setWordWrap() | |
{ | |
} | |
/** | |
* Assemble message headers. | |
* @access public | |
* @return string The assembled headers | |
*/ | |
public function createHeader() | |
{ | |
} | |
/** | |
* Get the message MIME type headers. | |
* @access public | |
* @return string | |
*/ | |
public function getMailMIME() | |
{ | |
} | |
/** | |
* Returns the whole MIME message. | |
* Includes complete headers and body. | |
* Only valid post preSend(). | |
* @see PHPMailer::preSend() | |
* @access public | |
* @return string | |
*/ | |
public function getSentMIMEMessage() | |
{ | |
} | |
/** | |
* Create unique ID | |
* @return string | |
*/ | |
protected function generateId() | |
{ | |
} | |
/** | |
* Assemble the message body. | |
* Returns an empty string on failure. | |
* @access public | |
* @throws phpmailerException | |
* @return string The assembled message body | |
*/ | |
public function createBody() | |
{ | |
} | |
/** | |
* Return the start of a message boundary. | |
* @access protected | |
* @param string $boundary | |
* @param string $charSet | |
* @param string $contentType | |
* @param string $encoding | |
* @return string | |
*/ | |
protected function getBoundary($boundary, $charSet, $contentType, $encoding) | |
{ | |
} | |
/** | |
* Return the end of a message boundary. | |
* @access protected | |
* @param string $boundary | |
* @return string | |
*/ | |
protected function endBoundary($boundary) | |
{ | |
} | |
/** | |
* Set the message type. | |
* PHPMailer only supports some preset message types, not arbitrary MIME structures. | |
* @access protected | |
* @return void | |
*/ | |
protected function setMessageType() | |
{ | |
} | |
/** | |
* Format a header line. | |
* @access public | |
* @param string $name | |
* @param string $value | |
* @return string | |
*/ | |
public function headerLine($name, $value) | |
{ | |
} | |
/** | |
* Return a formatted mail line. | |
* @access public | |
* @param string $value | |
* @return string | |
*/ | |
public function textLine($value) | |
{ | |
} | |
/** | |
* Add an attachment from a path on the filesystem. | |
* Never use a user-supplied path to a file! | |
* Returns false if the file could not be found or read. | |
* @param string $path Path to the attachment. | |
* @param string $name Overrides the attachment name. | |
* @param string $encoding File encoding (see $Encoding). | |
* @param string $type File extension (MIME) type. | |
* @param string $disposition Disposition to use | |
* @throws phpmailerException | |
* @return boolean | |
*/ | |
public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') | |
{ | |
} | |
/** | |
* Return the array of attachments. | |
* @return array | |
*/ | |
public function getAttachments() | |
{ | |
} | |
/** | |
* Attach all file, string, and binary attachments to the message. | |
* Returns an empty string on failure. | |
* @access protected | |
* @param string $disposition_type | |
* @param string $boundary | |
* @return string | |
*/ | |
protected function attachAll($disposition_type, $boundary) | |
{ | |
} | |
/** | |
* Encode a file attachment in requested format. | |
* Returns an empty string on failure. | |
* @param string $path The full path to the file | |
* @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' | |
* @throws phpmailerException | |
* @access protected | |
* @return string | |
*/ | |
protected function encodeFile($path, $encoding = 'base64') | |
{ | |
} | |
/** | |
* Encode a string in requested format. | |
* Returns an empty string on failure. | |
* @param string $str The text to encode | |
* @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' | |
* @access public | |
* @return string | |
*/ | |
public function encodeString($str, $encoding = 'base64') | |
{ | |
} | |
/** | |
* Encode a header string optimally. | |
* Picks shortest of Q, B, quoted-printable or none. | |
* @access public | |
* @param string $str | |
* @param string $position | |
* @return string | |
*/ | |
public function encodeHeader($str, $position = 'text') | |
{ | |
} | |
/** | |
* Check if a string contains multi-byte characters. | |
* @access public | |
* @param string $str multi-byte text to wrap encode | |
* @return boolean | |
*/ | |
public function hasMultiBytes($str) | |
{ | |
} | |
/** | |
* Does a string contain any 8-bit chars (in any charset)? | |
* @param string $text | |
* @return boolean | |
*/ | |
public function has8bitChars($text) | |
{ | |
} | |
/** | |
* Encode and wrap long multibyte strings for mail headers | |
* without breaking lines within a character. | |
* Adapted from a function by paravoid | |
* @link http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 | |
* @access public | |
* @param string $str multi-byte text to wrap encode | |
* @param string $linebreak string to use as linefeed/end-of-line | |
* @return string | |
*/ | |
public function base64EncodeWrapMB($str, $linebreak = \null) | |
{ | |
} | |
/** | |
* Encode a string in quoted-printable format. | |
* According to RFC2045 section 6.7. | |
* @access public | |
* @param string $string The text to encode | |
* @param integer $line_max Number of chars allowed on a line before wrapping | |
* @return string | |
* @link http://www.php.net/manual/en/function.quoted-printable-decode.php#89417 Adapted from this comment | |
*/ | |
public function encodeQP($string, $line_max = 76) | |
{ | |
} | |
/** | |
* Backward compatibility wrapper for an old QP encoding function that was removed. | |
* @see PHPMailer::encodeQP() | |
* @access public | |
* @param string $string | |
* @param integer $line_max | |
* @param boolean $space_conv | |
* @return string | |
* @deprecated Use encodeQP instead. | |
*/ | |
public function encodeQPphp($string, $line_max = 76, $space_conv = \false) | |
{ | |
} | |
/** | |
* Encode a string using Q encoding. | |
* @link http://tools.ietf.org/html/rfc2047 | |
* @param string $str the text to encode | |
* @param string $position Where the text is going to be used, see the RFC for what that means | |
* @access public | |
* @return string | |
*/ | |
public function encodeQ($str, $position = 'text') | |
{ | |
} | |
/** | |
* Add a string or binary attachment (non-filesystem). | |
* This method can be used to attach ascii or binary data, | |
* such as a BLOB record from a database. | |
* @param string $string String attachment data. | |
* @param string $filename Name of the attachment. | |
* @param string $encoding File encoding (see $Encoding). | |
* @param string $type File extension (MIME) type. | |
* @param string $disposition Disposition to use | |
* @return void | |
*/ | |
public function addStringAttachment($string, $filename, $encoding = 'base64', $type = '', $disposition = 'attachment') | |
{ | |
} | |
/** | |
* Add an embedded (inline) attachment from a file. | |
* This can include images, sounds, and just about any other document type. | |
* These differ from 'regular' attachments in that they are intended to be | |
* displayed inline with the message, not just attached for download. | |
* This is used in HTML messages that embed the images | |
* the HTML refers to using the $cid value. | |
* Never use a user-supplied path to a file! | |
* @param string $path Path to the attachment. | |
* @param string $cid Content ID of the attachment; Use this to reference | |
* the content when using an embedded image in HTML. | |
* @param string $name Overrides the attachment name. | |
* @param string $encoding File encoding (see $Encoding). | |
* @param string $type File MIME type. | |
* @param string $disposition Disposition to use | |
* @return boolean True on successfully adding an attachment | |
*/ | |
public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline') | |
{ | |
} | |
/** | |
* Add an embedded stringified attachment. | |
* This can include images, sounds, and just about any other document type. | |
* Be sure to set the $type to an image type for images: | |
* JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'. | |
* @param string $string The attachment binary data. | |
* @param string $cid Content ID of the attachment; Use this to reference | |
* the content when using an embedded image in HTML. | |
* @param string $name | |
* @param string $encoding File encoding (see $Encoding). | |
* @param string $type MIME type. | |
* @param string $disposition Disposition to use | |
* @return boolean True on successfully adding an attachment | |
*/ | |
public function addStringEmbeddedImage($string, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline') | |
{ | |
} | |
/** | |
* Check if an inline attachment is present. | |
* @access public | |
* @return boolean | |
*/ | |
public function inlineImageExists() | |
{ | |
} | |
/** | |
* Check if an attachment (non-inline) is present. | |
* @return boolean | |
*/ | |
public function attachmentExists() | |
{ | |
} | |
/** | |
* Check if this message has an alternative body set. | |
* @return boolean | |
*/ | |
public function alternativeExists() | |
{ | |
} | |
/** | |
* Clear queued addresses of given kind. | |
* @access protected | |
* @param string $kind 'to', 'cc', or 'bcc' | |
* @return void | |
*/ | |
public function clearQueuedAddresses($kind) | |
{ | |
} | |
/** | |
* Clear all To recipients. | |
* @return void | |
*/ | |
public function clearAddresses() | |
{ | |
} | |
/** | |
* Clear all CC recipients. | |
* @return void | |
*/ | |
public function clearCCs() | |
{ | |
} | |
/** | |
* Clear all BCC recipients. | |
* @return void | |
*/ | |
public function clearBCCs() | |
{ | |
} | |
/** | |
* Clear all ReplyTo recipients. | |
* @return void | |
*/ | |
public function clearReplyTos() | |
{ | |
} | |
/** | |
* Clear all recipient types. | |
* @return void | |
*/ | |
public function clearAllRecipients() | |
{ | |
} | |
/** | |
* Clear all filesystem, string, and binary attachments. | |
* @return void | |
*/ | |
public function clearAttachments() | |
{ | |
} | |
/** | |
* Clear all custom headers. | |
* @return void | |
*/ | |
public function clearCustomHeaders() | |
{ | |
} | |
/** | |
* Add an error message to the error container. | |
* @access protected | |
* @param string $msg | |
* @return void | |
*/ | |
protected function setError($msg) | |
{ | |
} | |
/** | |
* Return an RFC 822 formatted date. | |
* @access public | |
* @return string | |
* @static | |
*/ | |
public static function rfcDate() | |
{ | |
} | |
/** | |
* Get the server hostname. | |
* Returns 'localhost.localdomain' if unknown. | |
* @access protected | |
* @return string | |
*/ | |
protected function serverHostname() | |
{ | |
} | |
/** | |
* Get an error message in the current language. | |
* @access protected | |
* @param string $key | |
* @return string | |
*/ | |
protected function lang($key) | |
{ | |
} | |
/** | |
* Check if an error occurred. | |
* @access public | |
* @return boolean True if an error did occur. | |
*/ | |
public function isError() | |
{ | |
} | |
/** | |
* Ensure consistent line endings in a string. | |
* Changes every end of line from CRLF, CR or LF to $this->LE. | |
* @access public | |
* @param string $str String to fixEOL | |
* @return string | |
*/ | |
public function fixEOL($str) | |
{ | |
} | |
/** | |
* Add a custom header. | |
* $name value can be overloaded to contain | |
* both header name and value (name:value) | |
* @access public | |
* @param string $name Custom header name | |
* @param string $value Header value | |
* @return void | |
*/ | |
public function addCustomHeader($name, $value = \null) | |
{ | |
} | |
/** | |
* Returns all custom headers. | |
* @return array | |
*/ | |
public function getCustomHeaders() | |
{ | |
} | |
/** | |
* Create a message body from an HTML string. | |
* Automatically inlines images and creates a plain-text version by converting the HTML, | |
* overwriting any existing values in Body and AltBody. | |
* Do not source $message content from user input! | |
* $basedir is prepended when handling relative URLs, e.g. <img src="/images/a.png"> and must not be empty | |
* will look for an image file in $basedir/images/a.png and convert it to inline. | |
* If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email) | |
* If you don't want to apply these transformations to your HTML, just set Body and AltBody directly. | |
* @access public | |
* @param string $message HTML message string | |
* @param string $basedir Absolute path to a base directory to prepend to relative paths to images | |
* @param boolean|callable $advanced Whether to use the internal HTML to text converter | |
* or your own custom converter @see PHPMailer::html2text() | |
* @return string $message The transformed message Body | |
*/ | |
public function msgHTML($message, $basedir = '', $advanced = \false) | |
{ | |
} | |
/** | |
* Convert an HTML string into plain text. | |
* This is used by msgHTML(). | |
* Note - older versions of this function used a bundled advanced converter | |
* which was been removed for license reasons in #232. | |
* Example usage: | |
* <code> | |
* // Use default conversion | |
* $plain = $mail->html2text($html); | |
* // Use your own custom converter | |
* $plain = $mail->html2text($html, function($html) { | |
* $converter = new MyHtml2text($html); | |
* return $converter->get_text(); | |
* }); | |
* </code> | |
* @param string $html The HTML text to convert | |
* @param boolean|callable $advanced Any boolean value to use the internal converter, | |
* or provide your own callable for custom conversion. | |
* @return string | |
*/ | |
public function html2text($html, $advanced = \false) | |
{ | |
} | |
/** | |
* Get the MIME type for a file extension. | |
* @param string $ext File extension | |
* @access public | |
* @return string MIME type of file. | |
* @static | |
*/ | |
public static function _mime_types($ext = '') | |
{ | |
} | |
/** | |
* Map a file name to a MIME type. | |
* Defaults to 'application/octet-stream', i.e.. arbitrary binary data. | |
* @param string $filename A file name or full path, does not need to exist as a file | |
* @return string | |
* @static | |
*/ | |
public static function filenameToType($filename) | |
{ | |
} | |
/** | |
* Multi-byte-safe pathinfo replacement. | |
* Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe. | |
* Works similarly to the one in PHP >= 5.2.0 | |
* @link http://www.php.net/manual/en/function.pathinfo.php#107461 | |
* @param string $path A filename or path, does not need to exist as a file | |
* @param integer|string $options Either a PATHINFO_* constant, | |
* or a string name to return only the specified piece, allows 'filename' to work on PHP < 5.2 | |
* @return string|array | |
* @static | |
*/ | |
public static function mb_pathinfo($path, $options = \null) | |
{ | |
} | |
/** | |
* Set or reset instance properties. | |
* You should avoid this function - it's more verbose, less efficient, more error-prone and | |
* harder to debug than setting properties directly. | |
* Usage Example: | |
* `$mail->set('SMTPSecure', 'tls');` | |
* is the same as: | |
* `$mail->SMTPSecure = 'tls';` | |
* @access public | |
* @param string $name The property name to set | |
* @param mixed $value The value to set the property to | |
* @return boolean | |
* @TODO Should this not be using the __set() magic function? | |
*/ | |
public function set($name, $value = '') | |
{ | |
} | |
/** | |
* Strip newlines to prevent header injection. | |
* @access public | |
* @param string $str | |
* @return string | |
*/ | |
public function secureHeader($str) | |
{ | |
} | |
/** | |
* Normalize line breaks in a string. | |
* Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. | |
* Defaults to CRLF (for message bodies) and preserves consecutive breaks. | |
* @param string $text | |
* @param string $breaktype What kind of line break to use, defaults to CRLF | |
* @return string | |
* @access public | |
* @static | |
*/ | |
public static function normalizeBreaks($text, $breaktype = "\r\n") | |
{ | |
} | |
/** | |
* Set the public and private key files and password for S/MIME signing. | |
* @access public | |
* @param string $cert_filename | |
* @param string $key_filename | |
* @param string $key_pass Password for private key | |
* @param string $extracerts_filename Optional path to chain certificate | |
*/ | |
public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') | |
{ | |
} | |
/** | |
* Quoted-Printable-encode a DKIM header. | |
* @access public | |
* @param string $txt | |
* @return string | |
*/ | |
public function DKIM_QP($txt) | |
{ | |
} | |
/** | |
* Generate a DKIM signature. | |
* @access public | |
* @param string $signHeader | |
* @throws phpmailerException | |
* @return string The DKIM signature value | |
*/ | |
public function DKIM_Sign($signHeader) | |
{ | |
} | |
/** | |
* Generate a DKIM canonicalization header. | |
* @access public | |
* @param string $signHeader Header | |
* @return string | |
*/ | |
public function DKIM_HeaderC($signHeader) | |
{ | |
} | |
/** | |
* Generate a DKIM canonicalization body. | |
* @access public | |
* @param string $body Message Body | |
* @return string | |
*/ | |
public function DKIM_BodyC($body) | |
{ | |
} | |
/** | |
* Create the DKIM header and body in a new message header. | |
* @access public | |
* @param string $headers_line Header lines | |
* @param string $subject Subject | |
* @param string $body Body | |
* @return string | |
*/ | |
public function DKIM_Add($headers_line, $subject, $body) | |
{ | |
} | |
/** | |
* Detect if a string contains a line longer than the maximum line length allowed. | |
* @param string $str | |
* @return boolean | |
* @static | |
*/ | |
public static function hasLineLongerThanMax($str) | |
{ | |
} | |
/** | |
* Allows for public read access to 'to' property. | |
* @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. | |
* @access public | |
* @return array | |
*/ | |
public function getToAddresses() | |
{ | |
} | |
/** | |
* Allows for public read access to 'cc' property. | |
* @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. | |
* @access public | |
* @return array | |
*/ | |
public function getCcAddresses() | |
{ | |
} | |
/** | |
* Allows for public read access to 'bcc' property. | |
* @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. | |
* @access public | |
* @return array | |
*/ | |
public function getBccAddresses() | |
{ | |
} | |
/** | |
* Allows for public read access to 'ReplyTo' property. | |
* @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. | |
* @access public | |
* @return array | |
*/ | |
public function getReplyToAddresses() | |
{ | |
} | |
/** | |
* Allows for public read access to 'all_recipients' property. | |
* @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. | |
* @access public | |
* @return array | |
*/ | |
public function getAllRecipientAddresses() | |
{ | |
} | |
/** | |
* Perform a callback. | |
* @param boolean $isSent | |
* @param array $to | |
* @param array $cc | |
* @param array $bcc | |
* @param string $subject | |
* @param string $body | |
* @param string $from | |
*/ | |
protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from) | |
{ | |
} | |
} | |
/** | |
* PHPMailer exception handler | |
* @package PHPMailer | |
*/ | |
class phpmailerException extends \Exception | |
{ | |
/** | |
* Prettify error message output | |
* @return string | |
*/ | |
public function errorMessage() | |
{ | |
} | |
} | |
/** | |
* mail_fetch/setup.php | |
* | |
* Copyright (c) 1999-2011 CDI (cdi@thewebmasters.net) All Rights Reserved | |
* Modified by Philippe Mingo 2001-2009 mingo@rotedic.com | |
* An RFC 1939 compliant wrapper class for the POP3 protocol. | |
* | |
* Licensed under the GNU GPL. For full terms see the file COPYING. | |
* | |
* POP3 class | |
* | |
* @copyright 1999-2011 The SquirrelMail Project Team | |
* @license http://opensource.org/licenses/gpl-license.php GNU Public License | |
* @package plugins | |
* @subpackage mail_fetch | |
*/ | |
class POP3 | |
{ | |
var $ERROR = ''; | |
// Error string. | |
var $TIMEOUT = 60; | |
// Default timeout before giving up on a | |
// network operation. | |
var $COUNT = -1; | |
// Mailbox msg count | |
var $BUFFER = 512; | |
// Socket buffer for socket fgets() calls. | |
// Per RFC 1939 the returned line a POP3 | |
// server can send is 512 bytes. | |
var $FP = ''; | |
// The connection to the server's | |
// file descriptor | |
var $MAILSERVER = ''; | |
// Set this to hard code the server name | |
var $DEBUG = \FALSE; | |
// set to true to echo pop3 | |
// commands and responses to error_log | |
// this WILL log passwords! | |
var $BANNER = ''; | |
// Holds the banner returned by the | |
// pop server - used for apop() | |
var $ALLOWAPOP = \FALSE; | |
// Allow or disallow apop() | |
// This must be set to true | |
// manually | |
/** | |
* PHP5 constructor. | |
*/ | |
function __construct($server = '', $timeout = '') | |
{ | |
} | |
/** | |
* PHP4 constructor. | |
*/ | |
public function POP3($server = '', $timeout = '') | |
{ | |
} | |
function update_timer() | |
{ | |
} | |
function connect($server, $port = 110) | |
{ | |
} | |
function user($user = "") | |
{ | |
} | |
function pass($pass = "") | |
{ | |
} | |
function apop($login, $pass) | |
{ | |
} | |
function login($login = "", $pass = "") | |
{ | |
} | |
function top($msgNum, $numLines = "0") | |
{ | |
} | |
function pop_list($msgNum = "") | |
{ | |
} | |
function get($msgNum) | |
{ | |
} | |
function last($type = "count") | |
{ | |
} | |
function reset() | |
{ | |
} | |
function send_cmd($cmd = "") | |
{ | |
} | |
function quit() | |
{ | |
} | |
function popstat() | |
{ | |
} | |
function uidl($msgNum = "") | |
{ | |
} | |
function delete($msgNum = "") | |
{ | |
} | |
// ********************************************************* | |
// The following methods are internal to the class. | |
function is_ok($cmd = "") | |
{ | |
} | |
function strip_clf($text = "") | |
{ | |
} | |
function parse_banner($server_text) | |
{ | |
} | |
} | |
/** | |
* Requests for PHP | |
* | |
* Inspired by Requests for Python. | |
* | |
* Based on concepts from SimplePie_File, RequestCore and WP_Http. | |
* | |
* @package Requests | |
*/ | |
/** | |
* Requests for PHP | |
* | |
* Inspired by Requests for Python. | |
* | |
* Based on concepts from SimplePie_File, RequestCore and WP_Http. | |
* | |
* @package Requests | |
*/ | |
class Requests | |
{ | |
/** | |
* POST method | |
* | |
* @var string | |
*/ | |
const POST = 'POST'; | |
/** | |
* PUT method | |
* | |
* @var string | |
*/ | |
const PUT = 'PUT'; | |
/** | |
* GET method | |
* | |
* @var string | |
*/ | |
const GET = 'GET'; | |
/** | |
* HEAD method | |
* | |
* @var string | |
*/ | |
const HEAD = 'HEAD'; | |
/** | |
* DELETE method | |
* | |
* @var string | |
*/ | |
const DELETE = 'DELETE'; | |
/** | |
* OPTIONS method | |
* | |
* @var string | |
*/ | |
const OPTIONS = 'OPTIONS'; | |
/** | |
* TRACE method | |
* | |
* @var string | |
*/ | |
const TRACE = 'TRACE'; | |
/** | |
* PATCH method | |
* | |
* @link https://tools.ietf.org/html/rfc5789 | |
* @var string | |
*/ | |
const PATCH = 'PATCH'; | |
/** | |
* Default size of buffer size to read streams | |
* | |
* @var integer | |
*/ | |
const BUFFER_SIZE = 1160; | |
/** | |
* Current version of Requests | |
* | |
* @var string | |
*/ | |
const VERSION = '1.7'; | |
/** | |
* Registered transport classes | |
* | |
* @var array | |
*/ | |
protected static $transports = array(); | |
/** | |
* Selected transport name | |
* | |
* Use {@see get_transport()} instead | |
* | |
* @var array | |
*/ | |
public static $transport = array(); | |
/** | |
* Default certificate path. | |
* | |
* @see Requests::get_certificate_path() | |
* @see Requests::set_certificate_path() | |
* | |
* @var string | |
*/ | |
protected static $certificate_path; | |
/** | |
* This is a static class, do not instantiate it | |
* | |
* @codeCoverageIgnore | |
*/ | |
private function __construct() | |
{ | |
} | |
/** | |
* Autoloader for Requests | |
* | |
* Register this with {@see register_autoloader()} if you'd like to avoid | |
* having to create your own. | |
* | |
* (You can also use `spl_autoload_register` directly if you'd prefer.) | |
* | |
* @codeCoverageIgnore | |
* | |
* @param string $class Class name to load | |
*/ | |
public static function autoloader($class) | |
{ | |
} | |
/** | |
* Register the built-in autoloader | |
* | |
* @codeCoverageIgnore | |
*/ | |
public static function register_autoloader() | |
{ | |
} | |
/** | |
* Register a transport | |
* | |
* @param string $transport Transport class to add, must support the Requests_Transport interface | |
*/ | |
public static function add_transport($transport) | |
{ | |
} | |
/** | |
* Get a working transport | |
* | |
* @throws Requests_Exception If no valid transport is found (`notransport`) | |
* @return Requests_Transport | |
*/ | |
protected static function get_transport($capabilities = array()) | |
{ | |
} | |
/**#@+ | |
* @see request() | |
* @param string $url | |
* @param array $headers | |
* @param array $options | |
* @return Requests_Response | |
*/ | |
/** | |
* Send a GET request | |
*/ | |
public static function get($url, $headers = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send a HEAD request | |
*/ | |
public static function head($url, $headers = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send a DELETE request | |
*/ | |
public static function delete($url, $headers = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send a TRACE request | |
*/ | |
public static function trace($url, $headers = array(), $options = array()) | |
{ | |
} | |
/**#@-*/ | |
/**#@+ | |
* @see request() | |
* @param string $url | |
* @param array $headers | |
* @param array $data | |
* @param array $options | |
* @return Requests_Response | |
*/ | |
/** | |
* Send a POST request | |
*/ | |
public static function post($url, $headers = array(), $data = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send a PUT request | |
*/ | |
public static function put($url, $headers = array(), $data = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send an OPTIONS request | |
*/ | |
public static function options($url, $headers = array(), $data = array(), $options = array()) | |
{ | |
} | |
/** | |
* Send a PATCH request | |
* | |
* Note: Unlike {@see post} and {@see put}, `$headers` is required, as the | |
* specification recommends that should send an ETag | |
* | |
* @link https://tools.ietf.org/html/rfc5789 | |
*/ | |
public static function patch($url, $headers, $data = array(), $options = array()) | |
{ | |
} | |
/**#@-*/ | |
/** | |
* Main interface for HTTP requests | |
* | |
* This method initiates a request and sends it via a transport before | |
* parsing. | |
* | |
* The `$options` parameter takes an associative array with the following | |
* options: | |
* | |
* - `timeout`: How long should we wait for a response? | |
* Note: for cURL, a minimum of 1 second applies, as DNS resolution | |
* operates at second-resolution only. | |
* (float, seconds with a millisecond precision, default: 10, example: 0.01) | |
* - `connect_timeout`: How long should we wait while trying to connect? | |
* (float, seconds with a millisecond precision, default: 10, example: 0.01) | |
* - `useragent`: Useragent to send to the server | |
* (string, default: php-requests/$version) | |
* - `follow_redirects`: Should we follow 3xx redirects? | |
* (boolean, default: true) | |
* - `redirects`: How many times should we redirect before erroring? | |
* (integer, default: 10) | |
* - `blocking`: Should we block processing on this request? | |
* (boolean, default: true) | |
* - `filename`: File to stream the body to instead. | |
* (string|boolean, default: false) | |
* - `auth`: Authentication handler or array of user/password details to use | |
* for Basic authentication | |
* (Requests_Auth|array|boolean, default: false) | |
* - `proxy`: Proxy details to use for proxy by-passing and authentication | |
* (Requests_Proxy|array|string|boolean, default: false) | |
* - `max_bytes`: Limit for the response body size. | |
* (integer|boolean, default: false) | |
* - `idn`: Enable IDN parsing | |
* (boolean, default: true) | |
* - `transport`: Custom transport. Either a class name, or a | |
* transport object. Defaults to the first working transport from | |
* {@see getTransport()} | |
* (string|Requests_Transport, default: {@see getTransport()}) | |
* - `hooks`: Hooks handler. | |
* (Requests_Hooker, default: new Requests_Hooks()) | |
* - `verify`: Should we verify SSL certificates? Allows passing in a custom | |
* certificate file as a string. (Using true uses the system-wide root | |
* certificate store instead, but this may have different behaviour | |
* across transports.) | |
* (string|boolean, default: library/Requests/Transport/cacert.pem) | |
* - `verifyname`: Should we verify the common name in the SSL certificate? | |
* (boolean: default, true) | |
* - `data_format`: How should we send the `$data` parameter? | |
* (string, one of 'query' or 'body', default: 'query' for | |
* HEAD/GET/DELETE, 'body' for POST/PUT/OPTIONS/PATCH) | |
* | |
* @throws Requests_Exception On invalid URLs (`nonhttp`) | |
* | |
* @param string $url URL to request | |
* @param array $headers Extra headers to send with the request | |
* @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests | |
* @param string $type HTTP request type (use Requests constants) | |
* @param array $options Options for the request (see description for more information) | |
* @return Requests_Response | |
*/ | |
public static function request($url, $headers = array(), $data = array(), $type = self::GET, $options = array()) | |
{ | |
} | |
/** | |
* Send multiple HTTP requests simultaneously | |
* | |
* The `$requests` parameter takes an associative or indexed array of | |
* request fields. The key of each request can be used to match up the | |
* request with the returned data, or with the request passed into your | |
* `multiple.request.complete` callback. | |
* | |
* The request fields value is an associative array with the following keys: | |
* | |
* - `url`: Request URL Same as the `$url` parameter to | |
* {@see Requests::request} | |
* (string, required) | |
* - `headers`: Associative array of header fields. Same as the `$headers` | |
* parameter to {@see Requests::request} | |
* (array, default: `array()`) | |
* - `data`: Associative array of data fields or a string. Same as the | |
* `$data` parameter to {@see Requests::request} | |
* (array|string, default: `array()`) | |
* - `type`: HTTP request type (use Requests constants). Same as the `$type` | |
* parameter to {@see Requests::request} | |
* (string, default: `Requests::GET`) | |
* - `cookies`: Associative array of cookie name to value, or cookie jar. | |
* (array|Requests_Cookie_Jar) | |
* | |
* If the `$options` parameter is specified, individual requests will | |
* inherit options from it. This can be used to use a single hooking system, | |
* or set all the types to `Requests::POST`, for example. | |
* | |
* In addition, the `$options` parameter takes the following global options: | |
* | |
* - `complete`: A callback for when a request is complete. Takes two | |
* parameters, a Requests_Response/Requests_Exception reference, and the | |
* ID from the request array (Note: this can also be overridden on a | |
* per-request basis, although that's a little silly) | |
* (callback) | |
* | |
* @param array $requests Requests data (see description for more information) | |
* @param array $options Global and default options (see {@see Requests::request}) | |
* @return array Responses (either Requests_Response or a Requests_Exception object) | |
*/ | |
public static function request_multiple($requests, $options = array()) | |
{ | |
} | |
/** | |
* Get the default options | |
* | |
* @see Requests::request() for values returned by this method | |
* @param boolean $multirequest Is this a multirequest? | |
* @return array Default option values | |
*/ | |
protected static function get_default_options($multirequest = \false) | |
{ | |
} | |
/** | |
* Get default certificate path. | |
* | |
* @return string Default certificate path. | |
*/ | |
public static function get_certificate_path() | |
{ | |
} | |
/** | |
* Set default certificate path. | |
* | |
* @param string $path Certificate path, pointing to a PEM file. | |
*/ | |
public static function set_certificate_path($path) | |
{ | |
} | |
/** | |
* Set the default values | |
* | |
* @param string $url URL to request | |
* @param array $headers Extra headers to send with the request | |
* @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests | |
* @param string $type HTTP request type | |
* @param array $options Options for the request | |
* @return array $options | |
*/ | |
protected static function set_defaults(&$url, &$headers, &$data, &$type, &$options) | |
{ | |
} | |
/** | |
* HTTP response parser | |
* | |
* @throws Requests_Exception On missing head/body separator (`requests.no_crlf_separator`) | |
* @throws Requests_Exception On missing head/body separator (`noversion`) | |
* @throws Requests_Exception On missing head/body separator (`toomanyredirects`) | |
* | |
* @param string $headers Full response text including headers and body | |
* @param string $url Original request URL | |
* @param array $req_headers Original $headers array passed to {@link request()}, in case we need to follow redirects | |
* @param array $req_data Original $data array passed to {@link request()}, in case we need to follow redirects | |
* @param array $options Original $options array passed to {@link request()}, in case we need to follow redirects | |
* @return Requests_Response | |
*/ | |
protected static function parse_response($headers, $url, $req_headers, $req_data, $options) | |
{ | |
} | |
/** | |
* Callback for `transport.internal.parse_response` | |
* | |
* Internal use only. Converts a raw HTTP response to a Requests_Response | |
* while still executing a multiple request. | |
* | |
* @param string $response Full response text including headers and body (will be overwritten with Response instance) | |
* @param array $request Request data as passed into {@see Requests::request_multiple()} | |
* @return null `$response` is either set to a Requests_Response instance, or a Requests_Exception object | |
*/ | |
public static function parse_multiple(&$response, $request) | |
{ | |
} | |
/** | |
* Decoded a chunked body as per RFC 2616 | |
* | |
* @see https://tools.ietf.org/html/rfc2616#section-3.6.1 | |
* @param string $data Chunked body | |
* @return string Decoded body | |
*/ | |
protected static function decode_chunked($data) | |
{ | |
} | |
// @codeCoverageIgnoreEnd | |
/** | |
* Convert a key => value array to a 'key: value' array for headers | |
* | |
* @param array $array Dictionary of header values | |
* @return array List of headers | |
*/ | |
public static function flatten($array) | |
{ | |
} | |
/** | |
* Convert a key => value array to a 'key: value' array for headers | |
* | |
* @codeCoverageIgnore | |
* @deprecated Misspelling of {@see Requests::flatten} | |
* @param array $array Dictionary of header values | |
* @return array List of headers | |
*/ | |
public static function flattern($array) | |
{ | |
} | |
/** | |
* Decompress an encoded body | |
* | |
* Implements gzip, compress and deflate. Guesses which it is by attempting | |
* to decode. | |
* | |
* @param string $data Compressed data in one of the above formats | |
* @return string Decompressed string | |
*/ | |
public static function decompress($data) | |
{ | |
} | |
/** | |
* Decompression of deflated string while staying compatible with the majority of servers. | |
* | |
* Certain Servers will return deflated data with headers which PHP's gzinflate() | |
* function cannot handle out of the box. The following function has been created from | |
* various snippets on the gzinflate() PHP documentation. | |
* | |
* Warning: Magic numbers within. Due to the potential different formats that the compressed | |
* data may be returned in, some "magic offsets" are needed to ensure proper decompression | |
* takes place. For a simple progmatic way to determine the magic offset in use, see: | |
* https://core.trac.wordpress.org/ticket/18273 | |
* | |
* @since 2.8.1 | |
* @link https://core.trac.wordpress.org/ticket/18273 | |
* @link https://secure.php.net/manual/en/function.gzinflate.php#70875 | |
* @link https://secure.php.net/manual/en/function.gzinflate.php#77336 | |
* | |
* @param string $gzData String to decompress. | |
* @return string|bool False on failure. | |
*/ | |
public static function compatible_gzinflate($gzData) | |
{ | |
} | |
public static function match_domain($host, $reference) | |
{ | |
} | |
} | |
/** | |
* PHPMailer RFC821 SMTP email transport class. | |
* PHP Version 5 | |
* @package PHPMailer | |
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project | |
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk> | |
* @author Jim Jagielski (jimjag) <jimjag@gmail.com> | |
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net> | |
* @author Brent R. Matzelle (original founder) | |
* @copyright 2014 Marcus Bointon | |
* @copyright 2010 - 2012 Jim Jagielski | |
* @copyright 2004 - 2009 Andy Prevost | |
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License | |
* @note This program is distributed in the hope that it will be useful - WITHOUT | |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
* FITNESS FOR A PARTICULAR PURPOSE. | |
*/ | |
/** | |
* PHPMailer RFC821 SMTP email transport class. | |
* Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. | |
* @package PHPMailer | |
* @author Chris Ryan | |
* @author Marcus Bointon <phpmailer@synchromedia.co.uk> | |
*/ | |
class SMTP | |
{ | |
/** | |
* The PHPMailer SMTP version number. | |
* @var string | |
*/ | |
const VERSION = '5.2.22'; | |
/** | |
* SMTP line break constant. | |
* @var string | |
*/ | |
const CRLF = "\r\n"; | |
/** | |
* The SMTP port to use if one is not specified. | |
* @var integer | |
*/ | |
const DEFAULT_SMTP_PORT = 25; | |
/** | |
* The maximum line length allowed by RFC 2822 section 2.1.1 | |
* @var integer | |
*/ | |
const MAX_LINE_LENGTH = 998; | |
/** | |
* Debug level for no output | |
*/ | |
const DEBUG_OFF = 0; | |
/** | |
* Debug level to show client -> server messages | |
*/ | |
const DEBUG_CLIENT = 1; | |
/** | |
* Debug level to show client -> server and server -> client messages | |
*/ | |
const DEBUG_SERVER = 2; | |
/** | |
* Debug level to show connection status, client -> server and server -> client messages | |
*/ | |
const DEBUG_CONNECTION = 3; | |
/** | |
* Debug level to show all messages | |
*/ | |
const DEBUG_LOWLEVEL = 4; | |
/** | |
* The PHPMailer SMTP Version number. | |
* @var string | |
* @deprecated Use the `VERSION` constant instead | |
* @see SMTP::VERSION | |
*/ | |
public $Version = '5.2.22'; | |
/** | |
* SMTP server port number. | |
* @var integer | |
* @deprecated This is only ever used as a default value, so use the `DEFAULT_SMTP_PORT` constant instead | |
* @see SMTP::DEFAULT_SMTP_PORT | |
*/ | |
public $SMTP_PORT = 25; | |
/** | |
* SMTP reply line ending. | |
* @var string | |
* @deprecated Use the `CRLF` constant instead | |
* @see SMTP::CRLF | |
*/ | |
public $CRLF = "\r\n"; | |
/** | |
* Debug output level. | |
* Options: | |
* * self::DEBUG_OFF (`0`) No debug output, default | |
* * self::DEBUG_CLIENT (`1`) Client commands | |
* * self::DEBUG_SERVER (`2`) Client commands and server responses | |
* * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status | |
* * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages | |
* @var integer | |
*/ | |
public $do_debug = self::DEBUG_OFF; | |
/** | |
* How to handle debug output. | |
* Options: | |
* * `echo` Output plain-text as-is, appropriate for CLI | |
* * `html` Output escaped, line breaks converted to `<br>`, appropriate for browser output | |
* * `error_log` Output to error log as configured in php.ini | |
* | |
* Alternatively, you can provide a callable expecting two params: a message string and the debug level: | |
* <code> | |
* $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; | |
* </code> | |
* @var string|callable | |
*/ | |
public $Debugoutput = 'echo'; | |
/** | |
* Whether to use VERP. | |
* @link http://en.wikipedia.org/wiki/Variable_envelope_return_path | |
* @link http://www.postfix.org/VERP_README.html Info on VERP | |
* @var boolean | |
*/ | |
public $do_verp = \false; | |
/** | |
* The timeout value for connection, in seconds. | |
* Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 | |
* This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. | |
* @link http://tools.ietf.org/html/rfc2821#section-4.5.3.2 | |
* @var integer | |
*/ | |
public $Timeout = 300; | |
/** | |
* How long to wait for commands to complete, in seconds. | |
* Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 | |
* @var integer | |
*/ | |
public $Timelimit = 300; | |
/** | |
* @var array patterns to extract smtp transaction id from smtp reply | |
* Only first capture group will be use, use non-capturing group to deal with it | |
* Extend this class to override this property to fulfil your needs. | |
*/ | |
protected $smtp_transaction_id_patterns = array('exim' => '/[0-9]{3} OK id=(.*)/', 'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/', 'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/'); | |
/** | |
* The socket for the server connection. | |
* @var resource | |
*/ | |
protected $smtp_conn; | |
/** | |
* Error information, if any, for the last SMTP command. | |
* @var array | |
*/ | |
protected $error = array('error' => '', 'detail' => '', 'smtp_code' => '', 'smtp_code_ex' => ''); | |
/** | |
* The reply the server sent to us for HELO. | |
* If null, no HELO string has yet been received. | |
* @var string|null | |
*/ | |
protected $helo_rply = \null; | |
/** | |
* The set of SMTP extensions sent in reply to EHLO command. | |
* Indexes of the array are extension names. | |
* Value at index 'HELO' or 'EHLO' (according to command that was sent) | |
* represents the server name. In case of HELO it is the only element of the array. | |
* Other values can be boolean TRUE or an array containing extension options. | |
* If null, no HELO/EHLO string has yet been received. | |
* @var array|null | |
*/ | |
protected $server_caps = \null; | |
/** | |
* The most recent reply received from the server. | |
* @var string | |
*/ | |
protected $last_reply = ''; | |
/** | |
* Output debugging info via a user-selected method. | |
* @see SMTP::$Debugoutput | |
* @see SMTP::$do_debug | |
* @param string $str Debug string to output | |
* @param integer $level The debug level of this message; see DEBUG_* constants | |
* @return void | |
*/ | |
protected function edebug($str, $level = 0) | |
{ | |
} | |
/** | |
* Connect to an SMTP server. | |
* @param string $host SMTP server IP or host name | |
* @param integer $port The port number to connect to | |
* @param integer $timeout How long to wait for the connection to open | |
* @param array $options An array of options for stream_context_create() | |
* @access public | |
* @return boolean | |
*/ | |
public function connect($host, $port = \null, $timeout = 30, $options = array()) | |
{ | |
} | |
/** | |
* Initiate a TLS (encrypted) session. | |
* @access public | |
* @return boolean | |
*/ | |
public function startTLS() | |
{ | |
} | |
/** | |
* Perform SMTP authentication. | |
* Must be run after hello(). | |
* @see hello() | |
* @param string $username The user name | |
* @param string $password The password | |
* @param string $authtype The auth type (PLAIN, LOGIN, CRAM-MD5) | |
* @param string $realm The auth realm for NTLM | |
* @param string $workstation The auth workstation for NTLM | |
* @param null|OAuth $OAuth An optional OAuth instance (@see PHPMailerOAuth) | |
* @return bool True if successfully authenticated.* @access public | |
*/ | |
public function authenticate($username, $password, $authtype = \null, $realm = '', $workstation = '', $OAuth = \null) | |
{ | |
} | |
/** | |
* Calculate an MD5 HMAC hash. | |
* Works like hash_hmac('md5', $data, $key) | |
* in case that function is not available | |
* @param string $data The data to hash | |
* @param string $key The key to hash with | |
* @access protected | |
* @return string | |
*/ | |
protected function hmac($data, $key) | |
{ | |
} | |
/** | |
* Check connection state. | |
* @access public | |
* @return boolean True if connected. | |
*/ | |
public function connected() | |
{ | |
} | |
/** | |
* Close the socket and clean up the state of the class. | |
* Don't use this function without first trying to use QUIT. | |
* @see quit() | |
* @access public | |
* @return void | |
*/ | |
public function close() | |
{ | |
} | |
/** | |
* Send an SMTP DATA command. | |
* Issues a data command and sends the msg_data to the server, | |
* finializing the mail transaction. $msg_data is the message | |
* that is to be send with the headers. Each header needs to be | |
* on a single line followed by a <CRLF> with the message headers | |
* and the message body being separated by and additional <CRLF>. | |
* Implements rfc 821: DATA <CRLF> | |
* @param string $msg_data Message data to send | |
* @access public | |
* @return boolean | |
*/ | |
public function data($msg_data) | |
{ | |
} | |
/** | |
* Send an SMTP HELO or EHLO command. | |
* Used to identify the sending server to the receiving server. | |
* This makes sure that client and server are in a known state. | |
* Implements RFC 821: HELO <SP> <domain> <CRLF> | |
* and RFC 2821 EHLO. | |
* @param string $host The host name or IP to connect to | |
* @access public | |
* @return boolean | |
*/ | |
public function hello($host = '') | |
{ | |
} | |
/** | |
* Send an SMTP HELO or EHLO command. | |
* Low-level implementation used by hello() | |
* @see hello() | |
* @param string $hello The HELO string | |
* @param string $host The hostname to say we are | |
* @access protected | |
* @return boolean | |
*/ | |
protected function sendHello($hello, $host) | |
{ | |
} | |
/** | |
* Parse a reply to HELO/EHLO command to discover server extensions. | |
* In case of HELO, the only parameter that can be discovered is a server name. | |
* @access protected | |
* @param string $type - 'HELO' or 'EHLO' | |
*/ | |
protected function parseHelloFields($type) | |
{ | |
} | |
/** | |
* Send an SMTP MAIL command. | |
* Starts a mail transaction from the email address specified in | |
* $from. Returns true if successful or false otherwise. If True | |
* the mail transaction is started and then one or more recipient | |
* commands may be called followed by a data command. | |
* Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF> | |
* @param string $from Source address of this message | |
* @access public | |
* @return boolean | |
*/ | |
public function mail($from) | |
{ | |
} | |
/** | |
* Send an SMTP QUIT command. | |
* Closes the socket if there is no error or the $close_on_error argument is true. | |
* Implements from rfc 821: QUIT <CRLF> | |
* @param boolean $close_on_error Should the connection close if an error occurs? | |
* @access public | |
* @return boolean | |
*/ | |
public function quit($close_on_error = \true) | |
{ | |
} | |
/** | |
* Send an SMTP RCPT command. | |
* Sets the TO argument to $toaddr. | |
* Returns true if the recipient was accepted false if it was rejected. | |
* Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF> | |
* @param string $address The address the message is being sent to | |
* @access public | |
* @return boolean | |
*/ | |
public function recipient($address) | |
{ | |
} | |
/** | |
* Send an SMTP RSET command. | |
* Abort any transaction that is currently in progress. | |
* Implements rfc 821: RSET <CRLF> | |
* @access public | |
* @return boolean True on success. | |
*/ | |
public function reset() | |
{ | |
} | |
/** | |
* Send a command to an SMTP server and check its return code. | |
* @param string $command The command name - not sent to the server | |
* @param string $commandstring The actual command to send | |
* @param integer|array $expect One or more expected integer success codes | |
* @access protected | |
* @return boolean True on success. | |
*/ | |
protected function sendCommand($command, $commandstring, $expect) | |
{ | |
} | |
/** | |
* Send an SMTP SAML command. | |
* Starts a mail transaction from the email address specified in $from. | |
* Returns true if successful or false otherwise. If True | |
* the mail transaction is started and then one or more recipient | |
* commands may be called followed by a data command. This command | |
* will send the message to the users terminal if they are logged | |
* in and send them an email. | |
* Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF> | |
* @param string $from The address the message is from | |
* @access public | |
* @return boolean | |
*/ | |
public function sendAndMail($from) | |
{ | |
} | |
/** | |
* Send an SMTP VRFY command. | |
* @param string $name The name to verify | |
* @access public | |
* @return boolean | |
*/ | |
public function verify($name) | |
{ | |
} | |
/** | |
* Send an SMTP NOOP command. | |
* Used to keep keep-alives alive, doesn't actually do anything | |
* @access public | |
* @return boolean | |
*/ | |
public function noop() | |
{ | |
} | |
/** | |
* Send an SMTP TURN command. | |
* This is an optional command for SMTP that this class does not support. | |
* This method is here to make the RFC821 Definition complete for this class | |
* and _may_ be implemented in future | |
* Implements from rfc 821: TURN <CRLF> | |
* @access public | |
* @return boolean | |
*/ | |
public function turn() | |
{ | |
} | |
/** | |
* Send raw data to the server. | |
* @param string $data The data to send | |
* @access public | |
* @return integer|boolean The number of bytes sent to the server or false on error | |
*/ | |
public function client_send($data) | |
{ | |
} | |
/** | |
* Get the latest error. | |
* @access public | |
* @return array | |
*/ | |
public function getError() | |
{ | |
} | |
/** | |
* Get SMTP extensions available on the server | |
* @access public | |
* @return array|null | |
*/ | |
public function getServerExtList() | |
{ | |
} | |
/** | |
* A multipurpose method | |
* The method works in three ways, dependent on argument value and current state | |
* 1. HELO/EHLO was not sent - returns null and set up $this->error | |
* 2. HELO was sent | |
* $name = 'HELO': returns server name | |
* $name = 'EHLO': returns boolean false | |
* $name = any string: returns null and set up $this->error | |
* 3. EHLO was sent | |
* $name = 'HELO'|'EHLO': returns server name | |
* $name = any string: if extension $name exists, returns boolean True | |
* or its options. Otherwise returns boolean False | |
* In other words, one can use this method to detect 3 conditions: | |
* - null returned: handshake was not or we don't know about ext (refer to $this->error) | |
* - false returned: the requested feature exactly not exists | |
* - positive value returned: the requested feature exists | |
* @param string $name Name of SMTP extension or 'HELO'|'EHLO' | |
* @return mixed | |
*/ | |
public function getServerExt($name) | |
{ | |
} | |
/** | |
* Get the last reply from the server. | |
* @access public | |
* @return string | |
*/ | |
public function getLastReply() | |
{ | |
} | |
/** | |
* Read the SMTP server's response. | |
* Either before eof or socket timeout occurs on the operation. | |
* With SMTP we can tell if we have more lines to read if the | |
* 4th character is '-' symbol. If it is a space then we don't | |
* need to read anything else. | |
* @access protected | |
* @return string | |
*/ | |
protected function get_lines() | |
{ | |
} | |
/** | |
* Enable or disable VERP address generation. | |
* @param boolean $enabled | |
*/ | |
public function setVerp($enabled = \false) | |
{ | |
} | |
/** | |
* Get VERP address generation mode. | |
* @return boolean | |
*/ | |
public function getVerp() | |
{ | |
} | |
/** | |
* Set error messages and codes. | |
* @param string $message The error message | |
* @param string $detail Further detail on the error | |
* @param string $smtp_code An associated SMTP error code | |
* @param string $smtp_code_ex Extended SMTP code | |
*/ | |
protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '') | |
{ | |
} | |
/** | |
* Set debug output method. | |
* @param string|callable $method The name of the mechanism to use for debugging output, or a callable to handle it. | |
*/ | |
public function setDebugOutput($method = 'echo') | |
{ | |
} | |
/** | |
* Get debug output method. | |
* @return string | |
*/ | |
public function getDebugOutput() | |
{ | |
} | |
/** | |
* Set debug output level. | |
* @param integer $level | |
*/ | |
public function setDebugLevel($level = 0) | |
{ | |
} | |
/** | |
* Get debug output level. | |
* @return integer | |
*/ | |
public function getDebugLevel() | |
{ | |
} | |
/** | |
* Set SMTP timeout. | |
* @param integer $timeout | |
*/ | |
public function setTimeout($timeout = 0) | |
{ | |
} | |
/** | |
* Get SMTP timeout. | |
* @return integer | |
*/ | |
public function getTimeout() | |
{ | |
} | |
/** | |
* Reports an error number and string. | |
* @param integer $errno The error number returned by PHP. | |
* @param string $errmsg The error message returned by PHP. | |
*/ | |
protected function errorHandler($errno, $errmsg) | |
{ | |
} | |
/** | |
* Will return the ID of the last smtp transaction based on a list of patterns provided | |
* in SMTP::$smtp_transaction_id_patterns. | |
* If no reply has been received yet, it will return null. | |
* If no pattern has been matched, it will return false. | |
* @return bool|null|string | |
*/ | |
public function getLastTransactionID() | |
{ | |
} | |
} | |
/************************************************* | |
Snoopy - the PHP net client | |
Author: Monte Ohrt <monte@ispi.net> | |
Copyright (c): 1999-2008 New Digital Group, all rights reserved | |
Version: 1.2.4 | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either | |
* version 2.1 of the License, or (at your option) any later version. | |
* | |
* This library is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
* Lesser General Public License for more details. | |
* | |
* You should have received a copy of the GNU Lesser General Public | |
* License along with this library; if not, write to the Free Software | |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
You may contact the author of Snoopy by e-mail at: | |
monte@ohrt.com | |
The latest version of Snoopy can be obtained from: | |
http://snoopy.sourceforge.net/ | |
*************************************************/ | |
class Snoopy | |
{ | |
/**** Public variables ****/ | |
/* user definable vars */ | |
var $host = "www.php.net"; | |
// host name we are connecting to | |
var $port = 80; | |
// port we are connecting to | |
var $proxy_host = ""; | |
// proxy host to use | |
var $proxy_port = ""; | |
// proxy port to use | |
var $proxy_user = ""; | |
// proxy user to use | |
var $proxy_pass = ""; | |
// proxy password to use | |
var $agent = "Snoopy v1.2.4"; | |
// agent we masquerade as | |
var $referer = ""; | |
// referer info to pass | |
var $cookies = array(); | |
// array of cookies to pass | |
// $cookies["username"]="joe"; | |
var $rawheaders = array(); | |
// array of raw headers to send | |
// $rawheaders["Content-type"]="text/html"; | |
var $maxredirs = 5; | |
// http redirection depth maximum. 0 = disallow | |
var $lastredirectaddr = ""; | |
// contains address of last redirected address | |
var $offsiteok = \true; | |
// allows redirection off-site | |
var $maxframes = 0; | |
// frame content depth maximum. 0 = disallow | |
var $expandlinks = \true; | |
// expand links to fully qualified URLs. | |
// this only applies to fetchlinks() | |
// submitlinks(), and submittext() | |
var $passcookies = \true; | |
// pass set cookies back through redirects | |
// NOTE: this currently does not respect | |
// dates, domains or paths. | |
var $user = ""; | |
// user for http authentication | |
var $pass = ""; | |
// password for http authentication | |
// http accept types | |
var $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; | |
var $results = ""; | |
// where the content is put | |
var $error = ""; | |
// error messages sent here | |
var $response_code = ""; | |
// response code returned from server | |
var $headers = array(); | |
// headers returned from server sent here | |
var $maxlength = 500000; | |
// max return data length (body) | |
var $read_timeout = 0; | |
// timeout on read operations, in seconds | |
// supported only since PHP 4 Beta 4 | |
// set to 0 to disallow timeouts | |
var $timed_out = \false; | |
// if a read operation timed out | |
var $status = 0; | |
// http request status | |
var $temp_dir = "/tmp"; | |
// temporary directory that the webserver | |
// has permission to write to. | |
// under Windows, this should be C:\temp | |
var $curl_path = "/usr/local/bin/curl"; | |
// Snoopy will use cURL for fetching | |
// SSL content if a full system path to | |
// the cURL binary is supplied here. | |
// set to false if you do not have | |
// cURL installed. See http://curl.haxx.se | |
// for details on installing cURL. | |
// Snoopy does *not* use the cURL | |
// library functions built into php, | |
// as these functions are not stable | |
// as of this Snoopy release. | |
/**** Private variables ****/ | |
var $_maxlinelen = 4096; | |
// max line length (headers) | |
var $_httpmethod = "GET"; | |
// default http request method | |
var $_httpversion = "HTTP/1.0"; | |
// default http request version | |
var $_submit_method = "POST"; | |
// default submit method | |
var $_submit_type = "application/x-www-form-urlencoded"; | |
// default submit type | |
var $_mime_boundary = ""; | |
// MIME boundary for multipart/form-data submit type | |
var $_redirectaddr = \false; | |
// will be set if page fetched is a redirect | |
var $_redirectdepth = 0; | |
// increments on an http redirect | |
var $_frameurls = array(); | |
// frame src urls | |
var $_framedepth = 0; | |
// increments on frame depth | |
var $_isproxy = \false; | |
// set if using a proxy server | |
var $_fp_timeout = 30; | |
// timeout for socket connection | |
/*======================================================================*\ | |
Function: fetch | |
Purpose: fetch the contents of a web page | |
(and possibly other protocols in the | |
future like ftp, nntp, gopher, etc.) | |
Input: $URI the location of the page to fetch | |
Output: $this->results the output text from the fetch | |
\*======================================================================*/ | |
function fetch($URI) | |
{ | |
} | |
/*======================================================================*\ | |
Function: submit | |
Purpose: submit an http form | |
Input: $URI the location to post the data | |
$formvars the formvars to use. | |
format: $formvars["var"] = "val"; | |
$formfiles an array of files to submit | |
format: $formfiles["var"] = "/dir/filename.ext"; | |
Output: $this->results the text output from the post | |
\*======================================================================*/ | |
function submit($URI, $formvars = "", $formfiles = "") | |
{ | |
} | |
/*======================================================================*\ | |
Function: fetchlinks | |
Purpose: fetch the links from a web page | |
Input: $URI where you are fetching from | |
Output: $this->results an array of the URLs | |
\*======================================================================*/ | |
function fetchlinks($URI) | |
{ | |
} | |
/*======================================================================*\ | |
Function: fetchform | |
Purpose: fetch the form elements from a web page | |
Input: $URI where you are fetching from | |
Output: $this->results the resulting html form | |
\*======================================================================*/ | |
function fetchform($URI) | |
{ | |
} | |
/*======================================================================*\ | |
Function: fetchtext | |
Purpose: fetch the text from a web page, stripping the links | |
Input: $URI where you are fetching from | |
Output: $this->results the text from the web page | |
\*======================================================================*/ | |
function fetchtext($URI) | |
{ | |
} | |
/*======================================================================*\ | |
Function: submitlinks | |
Purpose: grab links from a form submission | |
Input: $URI where you are submitting from | |
Output: $this->results an array of the links from the post | |
\*======================================================================*/ | |
function submitlinks($URI, $formvars = "", $formfiles = "") | |
{ | |
} | |
/*======================================================================*\ | |
Function: submittext | |
Purpose: grab text from a form submission | |
Input: $URI where you are submitting from | |
Output: $this->results the text from the web page | |
\*======================================================================*/ | |
function submittext($URI, $formvars = "", $formfiles = "") | |
{ | |
} | |
/*======================================================================*\ | |
Function: set_submit_multipart | |
Purpose: Set the form submission content type to | |
multipart/form-data | |
\*======================================================================*/ | |
function set_submit_multipart() | |
{ | |
} | |
/*======================================================================*\ | |
Function: set_submit_normal | |
Purpose: Set the form submission content type to | |
application/x-www-form-urlencoded | |
\*======================================================================*/ | |
function set_submit_normal() | |
{ | |
} | |
/*======================================================================*\ | |
Private functions | |
\*======================================================================*/ | |
/*======================================================================*\ | |
Function: _striplinks | |
Purpose: strip the hyperlinks from an html document | |
Input: $document document to strip. | |
Output: $match an array of the links | |
\*======================================================================*/ | |
function _striplinks($document) | |
{ | |
} | |
/*======================================================================*\ | |
Function: _stripform | |
Purpose: strip the form elements from an html document | |
Input: $document document to strip. | |
Output: $match an array of the links | |
\*======================================================================*/ | |
function _stripform($document) | |
{ | |
} | |
/*======================================================================*\ | |
Function: _striptext | |
Purpose: strip the text from an html document | |
Input: $document document to strip. | |
Output: $text the resulting text | |
\*======================================================================*/ | |
function _striptext($document) | |
{ | |
} | |
/*======================================================================*\ | |
Function: _expandlinks | |
Purpose: expand each link into a fully qualified URL | |
Input: $links the links to qualify | |
$URI the full URI to get the base from | |
Output: $expandedLinks the expanded links | |
\*======================================================================*/ | |
function _expandlinks($links, $URI) | |
{ | |
} | |
/*======================================================================*\ | |
Function: _httprequest | |
Purpose: go get the http data from the server | |
Input: $url the url to fetch | |
$fp the current open file pointer | |
$URI the full URI | |
$body body contents to send if any (POST) | |
Output: | |
\*======================================================================*/ | |
function _httprequest($url, $fp, $URI, $http_method, $content_type = "", $body = "") | |
{ | |
} | |
/*======================================================================*\ | |
Function: _httpsrequest | |
Purpose: go get the https data from the server using curl | |
Input: $url the url to fetch | |
$URI the full URI | |
$body body contents to send if any (POST) | |
Output: | |
\*======================================================================*/ | |
function _httpsrequest($url, $URI, $http_method, $content_type = "", $body = "") | |
{ | |
} | |
/*======================================================================*\ | |
Function: setcookies() | |
Purpose: set cookies for a redirection | |
\*======================================================================*/ | |
function setcookies() | |
{ | |
} | |
/*======================================================================*\ | |
Function: _check_timeout | |
Purpose: checks whether timeout has occurred | |
Input: $fp file pointer | |
\*======================================================================*/ | |
function _check_timeout($fp) | |
{ | |
} | |
/*======================================================================*\ | |
Function: _connect | |
Purpose: make a socket connection | |
Input: $fp file pointer | |
\*======================================================================*/ | |
function _connect(&$fp) | |
{ | |
} | |
/*======================================================================*\ | |
Function: _disconnect | |
Purpose: disconnect a socket connection | |
Input: $fp file pointer | |
\*======================================================================*/ | |
function _disconnect($fp) | |
{ | |
} | |
/*======================================================================*\ | |
Function: _prepare_post_body | |
Purpose: Prepare post body according to encoding type | |
Input: $formvars - form variables | |
$formfiles - form upload files | |
Output: post body | |
\*======================================================================*/ | |
function _prepare_post_body($formvars, $formfiles) | |
{ | |
} | |
} | |
/** | |
* Taxonomy API: Walker_CategoryDropdown class | |
* | |
* @package WordPress | |
* @subpackage Template | |
* @since 4.4.0 | |
*/ | |
/** | |
* Core class used to create an HTML dropdown list of Categories. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker | |
*/ | |
class Walker_CategoryDropdown extends \Walker | |
{ | |
/** | |
* What the class handles. | |
* | |
* @since 2.1.0 | |
* @var string | |
* | |
* @see Walker::$tree_type | |
*/ | |
public $tree_type = 'category'; | |
/** | |
* Database fields to use. | |
* | |
* @since 2.1.0 | |
* @todo Decouple this | |
* @var array | |
* | |
* @see Walker::$db_fields | |
*/ | |
public $db_fields = array('parent' => 'parent', 'id' => 'term_id'); | |
/** | |
* Starts the element output. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker::start_el() | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param object $category Category data object. | |
* @param int $depth Depth of category. Used for padding. | |
* @param array $args Uses 'selected', 'show_count', and 'value_field' keys, if they exist. | |
* See wp_dropdown_categories(). | |
* @param int $id Optional. ID of the current category. Default 0 (unused). | |
*/ | |
public function start_el(&$output, $category, $depth = 0, $args = array(), $id = 0) | |
{ | |
} | |
} | |
/** | |
* Taxonomy API: Walker_Category class | |
* | |
* @package WordPress | |
* @subpackage Template | |
* @since 4.4.0 | |
*/ | |
/** | |
* Core class used to create an HTML list of categories. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker | |
*/ | |
class Walker_Category extends \Walker | |
{ | |
/** | |
* What the class handles. | |
* | |
* @since 2.1.0 | |
* @var string | |
* | |
* @see Walker::$tree_type | |
*/ | |
public $tree_type = 'category'; | |
/** | |
* Database fields to use. | |
* | |
* @since 2.1.0 | |
* @var array | |
* | |
* @see Walker::$db_fields | |
* @todo Decouple this | |
*/ | |
public $db_fields = array('parent' => 'parent', 'id' => 'term_id'); | |
/** | |
* Starts the list before the elements are added. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker::start_lvl() | |
* | |
* @param string $output Used to append additional content. Passed by reference. | |
* @param int $depth Optional. Depth of category. Used for tab indentation. Default 0. | |
* @param array $args Optional. An array of arguments. Will only append content if style argument | |
* value is 'list'. See wp_list_categories(). Default empty array. | |
*/ | |
public function start_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Ends the list of after the elements are added. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker::end_lvl() | |
* | |
* @param string $output Used to append additional content. Passed by reference. | |
* @param int $depth Optional. Depth of category. Used for tab indentation. Default 0. | |
* @param array $args Optional. An array of arguments. Will only append content if style argument | |
* value is 'list'. See wp_list_categories(). Default empty array. | |
*/ | |
public function end_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Starts the element output. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker::start_el() | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param object $category Category data object. | |
* @param int $depth Optional. Depth of category in reference to parents. Default 0. | |
* @param array $args Optional. An array of arguments. See wp_list_categories(). Default empty array. | |
* @param int $id Optional. ID of the current category. Default 0. | |
*/ | |
public function start_el(&$output, $category, $depth = 0, $args = array(), $id = 0) | |
{ | |
} | |
/** | |
* Ends the element output, if needed. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker::end_el() | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param object $page Not used. | |
* @param int $depth Optional. Depth of category. Not used. | |
* @param array $args Optional. An array of arguments. Only uses 'list' for whether should append | |
* to output. See wp_list_categories(). Default empty array. | |
*/ | |
public function end_el(&$output, $page, $depth = 0, $args = array()) | |
{ | |
} | |
} | |
/** | |
* Comment API: Walker_Comment class | |
* | |
* @package WordPress | |
* @subpackage Comments | |
* @since 4.4.0 | |
*/ | |
/** | |
* Core walker class used to create an HTML list of comments. | |
* | |
* @since 2.7.0 | |
* | |
* @see Walker | |
*/ | |
class Walker_Comment extends \Walker | |
{ | |
/** | |
* What the class handles. | |
* | |
* @since 2.7.0 | |
* @var string | |
* | |
* @see Walker::$tree_type | |
*/ | |
public $tree_type = 'comment'; | |
/** | |
* Database fields to use. | |
* | |
* @since 2.7.0 | |
* @var array | |
* | |
* @see Walker::$db_fields | |
* @todo Decouple this | |
*/ | |
public $db_fields = array('parent' => 'comment_parent', 'id' => 'comment_ID'); | |
/** | |
* Starts the list before the elements are added. | |
* | |
* @since 2.7.0 | |
* | |
* @see Walker::start_lvl() | |
* @global int $comment_depth | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Optional. Depth of the current comment. Default 0. | |
* @param array $args Optional. Uses 'style' argument for type of HTML list. Default empty array. | |
*/ | |
public function start_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Ends the list of items after the elements are added. | |
* | |
* @since 2.7.0 | |
* | |
* @see Walker::end_lvl() | |
* @global int $comment_depth | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Optional. Depth of the current comment. Default 0. | |
* @param array $args Optional. Will only append content if style argument value is 'ol' or 'ul'. | |
* Default empty array. | |
*/ | |
public function end_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Traverses elements to create list from elements. | |
* | |
* This function is designed to enhance Walker::display_element() to | |
* display children of higher nesting levels than selected inline on | |
* the highest depth level displayed. This prevents them being orphaned | |
* at the end of the comment list. | |
* | |
* Example: max_depth = 2, with 5 levels of nested content. | |
* 1 | |
* 1.1 | |
* 1.1.1 | |
* 1.1.1.1 | |
* 1.1.1.1.1 | |
* 1.1.2 | |
* 1.1.2.1 | |
* 2 | |
* 2.2 | |
* | |
* @since 2.7.0 | |
* | |
* @see Walker::display_element() | |
* @see wp_list_comments() | |
* | |
* @param WP_Comment $element Comment data object. | |
* @param array $children_elements List of elements to continue traversing. Passed by reference. | |
* @param int $max_depth Max depth to traverse. | |
* @param int $depth Depth of the current element. | |
* @param array $args An array of arguments. | |
* @param string $output Used to append additional content. Passed by reference. | |
*/ | |
public function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output) | |
{ | |
} | |
/** | |
* Starts the element output. | |
* | |
* @since 2.7.0 | |
* | |
* @see Walker::start_el() | |
* @see wp_list_comments() | |
* @global int $comment_depth | |
* @global WP_Comment $comment | |
* | |
* @param string $output Used to append additional content. Passed by reference. | |
* @param WP_Comment $comment Comment data object. | |
* @param int $depth Optional. Depth of the current comment in reference to parents. Default 0. | |
* @param array $args Optional. An array of arguments. Default empty array. | |
* @param int $id Optional. ID of the current comment. Default 0 (unused). | |
*/ | |
public function start_el(&$output, $comment, $depth = 0, $args = array(), $id = 0) | |
{ | |
} | |
/** | |
* Ends the element output, if needed. | |
* | |
* @since 2.7.0 | |
* | |
* @see Walker::end_el() | |
* @see wp_list_comments() | |
* | |
* @param string $output Used to append additional content. Passed by reference. | |
* @param WP_Comment $comment The current comment object. Default current comment. | |
* @param int $depth Optional. Depth of the current comment. Default 0. | |
* @param array $args Optional. An array of arguments. Default empty array. | |
*/ | |
public function end_el(&$output, $comment, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Outputs a pingback comment. | |
* | |
* @since 3.6.0 | |
* | |
* @see wp_list_comments() | |
* | |
* @param WP_Comment $comment The comment object. | |
* @param int $depth Depth of the current comment. | |
* @param array $args An array of arguments. | |
*/ | |
protected function ping($comment, $depth, $args) | |
{ | |
} | |
/** | |
* Outputs a single comment. | |
* | |
* @since 3.6.0 | |
* | |
* @see wp_list_comments() | |
* | |
* @param WP_Comment $comment Comment to display. | |
* @param int $depth Depth of the current comment. | |
* @param array $args An array of arguments. | |
*/ | |
protected function comment($comment, $depth, $args) | |
{ | |
} | |
/** | |
* Outputs a comment in the HTML5 format. | |
* | |
* @since 3.6.0 | |
* | |
* @see wp_list_comments() | |
* | |
* @param WP_Comment $comment Comment to display. | |
* @param int $depth Depth of the current comment. | |
* @param array $args An array of arguments. | |
*/ | |
protected function html5_comment($comment, $depth, $args) | |
{ | |
} | |
} | |
/** | |
* Post API: Walker_PageDropdown class | |
* | |
* @package WordPress | |
* @subpackage Post | |
* @since 4.4.0 | |
*/ | |
/** | |
* Core class used to create an HTML drop-down list of pages. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker | |
*/ | |
class Walker_PageDropdown extends \Walker | |
{ | |
/** | |
* What the class handles. | |
* | |
* @since 2.1.0 | |
* @var string | |
* | |
* @see Walker::$tree_type | |
*/ | |
public $tree_type = 'page'; | |
/** | |
* Database fields to use. | |
* | |
* @since 2.1.0 | |
* @var array | |
* | |
* @see Walker::$db_fields | |
* @todo Decouple this | |
*/ | |
public $db_fields = array('parent' => 'post_parent', 'id' => 'ID'); | |
/** | |
* Starts the element output. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker::start_el() | |
* | |
* @param string $output Used to append additional content. Passed by reference. | |
* @param WP_Post $page Page data object. | |
* @param int $depth Optional. Depth of page in reference to parent pages. Used for padding. | |
* Default 0. | |
* @param array $args Optional. Uses 'selected' argument for selected page to set selected HTML | |
* attribute for option element. Uses 'value_field' argument to fill "value" | |
* attribute. See wp_dropdown_pages(). Default empty array. | |
* @param int $id Optional. ID of the current page. Default 0 (unused). | |
*/ | |
public function start_el(&$output, $page, $depth = 0, $args = array(), $id = 0) | |
{ | |
} | |
} | |
/** | |
* Post API: Walker_Page class | |
* | |
* @package WordPress | |
* @subpackage Template | |
* @since 4.4.0 | |
*/ | |
/** | |
* Core walker class used to create an HTML list of pages. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker | |
*/ | |
class Walker_Page extends \Walker | |
{ | |
/** | |
* What the class handles. | |
* | |
* @since 2.1.0 | |
* @var string | |
* | |
* @see Walker::$tree_type | |
*/ | |
public $tree_type = 'page'; | |
/** | |
* Database fields to use. | |
* | |
* @since 2.1.0 | |
* @var array | |
* | |
* @see Walker::$db_fields | |
* @todo Decouple this. | |
*/ | |
public $db_fields = array('parent' => 'post_parent', 'id' => 'ID'); | |
/** | |
* Outputs the beginning of the current level in the tree before elements are output. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker::start_lvl() | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Optional. Depth of page. Used for padding. Default 0. | |
* @param array $args Optional. Arguments for outputting the next level. | |
* Default empty array. | |
*/ | |
public function start_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Outputs the end of the current level in the tree after elements are output. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker::end_lvl() | |
* | |
* @param string $output Used to append additional content (passed by reference). | |
* @param int $depth Optional. Depth of page. Used for padding. Default 0. | |
* @param array $args Optional. Arguments for outputting the end of the current level. | |
* Default empty array. | |
*/ | |
public function end_lvl(&$output, $depth = 0, $args = array()) | |
{ | |
} | |
/** | |
* Outputs the beginning of the current element in the tree. | |
* | |
* @see Walker::start_el() | |
* @since 2.1.0 | |
* | |
* @param string $output Used to append additional content. Passed by reference. | |
* @param WP_Post $page Page data object. | |
* @param int $depth Optional. Depth of page. Used for padding. Default 0. | |
* @param array $args Optional. Array of arguments. Default empty array. | |
* @param int $current_page Optional. Page ID. Default 0. | |
*/ | |
public function start_el(&$output, $page, $depth = 0, $args = array(), $current_page = 0) | |
{ | |
} | |
/** | |
* Outputs the end of the current element in the tree. | |
* | |
* @since 2.1.0 | |
* | |
* @see Walker::end_el() | |
* | |
* @param string $output Used to append additional content. Passed by reference. | |
* @param WP_Post $page Page data object. Not used. | |
* @param int $depth Optional. Depth of page. Default 0 (unused). | |
* @param array $args Optional. Array of arguments. Default empty array. | |
*/ | |
public function end_el(&$output, $page, $depth = 0, $args = array()) | |
{ | |
} | |
} | |
/** | |
* Toolbar API: WP_Admin_Bar class | |
* | |
* @package WordPress | |
* @subpackage Toolbar | |
* @since 3.1.0 | |
*/ | |
/** | |
* Core class used to implement the Toolbar API. | |
* | |
* @since 3.1.0 | |
*/ | |
class WP_Admin_Bar | |
{ | |
private $nodes = array(); | |
private $bound = \false; | |
public $user; | |
/** | |
* @param string $name | |
* @return string|array|void | |
*/ | |
public function __get($name) | |
{ | |
} | |
/** | |
*/ | |
public function initialize() | |
{ | |
} | |
/** | |
* @param array $node | |
*/ | |
public function add_menu($node) | |
{ | |
} | |
/** | |
* @param string $id | |
*/ | |
public function remove_menu($id) | |
{ | |
} | |
/** | |
* Adds a node to the menu. | |
* | |
* @since 3.1.0 | |
* @since 4.5.0 Added the ability to pass 'lang' and 'dir' meta data. | |
* | |
* @param array $args { | |
* Arguments for adding a node. | |
* | |
* @type string $id ID of the item. | |
* @type string $title Title of the node. | |
* @type string $parent Optional. ID of the parent node. | |
* @type string $href Optional. Link for the item. | |
* @type bool $group Optional. Whether or not the node is a group. Default false. | |
* @type array $meta Meta data including the following keys: 'html', 'class', 'rel', 'lang', 'dir', | |
* 'onclick', 'target', 'title', 'tabindex'. Default empty. | |
* } | |
*/ | |
public function add_node($args) | |
{ | |
} | |
/** | |
* @param array $args | |
*/ | |
protected final function _set_node($args) | |
{ | |
} | |
/** | |
* Gets a node. | |
* | |
* @param string $id | |
* @return object Node. | |
*/ | |
public final function get_node($id) | |
{ | |
} | |
/** | |
* @param string $id | |
* @return object|void | |
*/ | |
protected final function _get_node($id) | |
{ | |
} | |
/** | |
* @return array|void | |
*/ | |
public final function get_nodes() | |
{ | |
} | |
/** | |
* @return array|void | |
*/ | |
protected final function _get_nodes() | |
{ | |
} | |
/** | |
* Add a group to a menu node. | |
* | |
* @since 3.3.0 | |
* | |
* @param array $args { | |
* Array of arguments for adding a group. | |
* | |
* @type string $id ID of the item. | |
* @type string $parent Optional. ID of the parent node. Default 'root'. | |
* @type array $meta Meta data for the group including the following keys: | |
* 'class', 'onclick', 'target', and 'title'. | |
* } | |
*/ | |
public final function add_group($args) | |
{ | |
} | |
/** | |
* Remove a node. | |
* | |
* @param string $id The ID of the item. | |
*/ | |
public function remove_node($id) | |
{ | |
} | |
/** | |
* @param string $id | |
*/ | |
protected final function _unset_node($id) | |
{ | |
} | |
/** | |
*/ | |
public function render() | |
{ | |
} | |
/** | |
* @return object|void | |
*/ | |
protected final function _bind() | |
{ | |
} | |
/** | |
* @global bool $is_IE | |
* @param object $root | |
*/ | |
protected final function _render($root) | |
{ | |
} | |
/** | |
* @param object $node | |
*/ | |
protected final function _render_container($node) | |
{ | |
} | |
/** | |
* @param object $node | |
*/ | |
protected final function _render_group($node) | |
{ | |
} | |
/** | |
* @param object $node | |
*/ | |
protected final function _render_item($node) | |
{ | |
} | |
/** | |
* Renders toolbar items recursively. | |
* | |
* @since 3.1.0 | |
* @deprecated 3.3.0 Use WP_Admin_Bar::_render_item() or WP_Admin_bar::render() instead. | |
* @see WP_Admin_Bar::_render_item() | |
* @see WP_Admin_Bar::render() | |
* | |
* @param string $id Unused. | |
* @param object $node | |
*/ | |
public function recursive_render($id, $node) | |
{ | |
} | |
/** | |
*/ | |
public function add_menus() | |
{ | |
} | |
} | |
/** | |
* Send XML response back to Ajax request. | |
* | |
* @package WordPress | |
* @since 2.1.0 | |
*/ | |
class WP_Ajax_Response | |
{ | |
/** | |
* Store XML responses to send. | |
* | |
* @since 2.1.0 | |
* @var array | |
*/ | |
public $responses = array(); | |
/** | |
* Constructor - Passes args to WP_Ajax_Response::add(). | |
* | |
* @since 2.1.0 | |
* @see WP_Ajax_Response::add() | |
* | |
* @param string|array $args Optional. Will be passed to add() method. | |
*/ | |
public function __construct($args = '') | |
{ | |
} | |
/** | |
* Appends data to an XML response based on given arguments. | |
* | |
* With `$args` defaults, extra data output would be: | |
* | |
* <response action='{$action}_$id'> | |
* <$what id='$id' position='$position'> | |
* <response_data><![CDATA[$data]]></response_data> | |
* </$what> | |
* </response> | |
* | |
* @since 2.1.0 | |
* | |
* @param string|array $args { | |
* Optional. An array or string of XML response arguments. | |
* | |
* @type string $what XML-RPC response type. Used as a child element of `<response>`. | |
* Default 'object' (`<object>`). | |
* @type string|false $action Value to use for the `action` attribute in `<response>`. Will be | |
* appended with `_$id` on output. If false, `$action` will default to | |
* the value of `$_POST['action']`. Default false. | |
* @type int|WP_Error $id The response ID, used as the response type `id` attribute. Also | |
* accepts a `WP_Error` object if the ID does not exist. Default 0. | |
* @type int|false $old_id The previous response ID. Used as the value for the response type | |
* `old_id` attribute. False hides the attribute. Default false. | |
* @type string $position Value of the response type `position` attribute. Accepts 1 (bottom), | |
* -1 (top), html ID (after), or -html ID (before). Default 1 (bottom). | |
* @type string|WP_Error $data The response content/message. Also accepts a WP_Error object if the | |
* ID does not exist. Default empty. | |
* @type array $supplemental An array of extra strings that will be output within a `<supplemental>` | |
* element as CDATA. Default empty array. | |
* } | |
* @return string XML response. | |
*/ | |
public function add($args = '') | |
{ | |
} | |
/** | |
* Display XML formatted responses. | |
* | |
* Sets the content type header to text/xml. | |
* | |
* @since 2.1.0 | |
*/ | |
public function send() | |
{ | |
} | |
} | |
/** | |
* Block Serialization Parser | |
* | |
* @package WordPress | |
*/ | |
/** | |
* Class WP_Block_Parser_Block | |
* | |
* Holds the block structure in memory | |
* | |
* @since 3.8.0 | |
*/ | |
class WP_Block_Parser_Block | |
{ | |
/** | |
* Name of block | |
* | |
* @example "core/paragraph" | |
* | |
* @since 3.8.0 | |
* @var string | |
*/ | |
public $blockName; | |
/** | |
* Optional set of attributes from block comment delimiters | |
* | |
* @example null | |
* @example array( 'columns' => 3 ) | |
* | |
* @since 3.8.0 | |
* @var array|null | |
*/ | |
public $attrs; | |
/** | |
* List of inner blocks (of this same class) | |
* | |
* @since 3.8.0 | |
* @var WP_Block_Parser_Block[] | |
*/ | |
public $innerBlocks; | |
/** | |
* Resultant HTML from inside block comment delimiters | |
* after removing inner blocks | |
* | |
* @example "...Just <!-- wp:test /--> testing..." -> "Just testing..." | |
* | |
* @since 3.8.0 | |
* @var string | |
*/ | |
public $innerHTML; | |
/** | |
* List of string fragments and null markers where inner blocks were found | |
* | |
* @example array( | |
* 'innerHTML' => 'BeforeInnerAfter', | |
* 'innerBlocks' => array( block, block ), | |
* 'innerContent' => array( 'Before', null, 'Inner', null, 'After' ), | |
* ) | |
* | |
* @since 4.2.0 | |
* @var array | |
*/ | |
public $innerContent; | |
/** | |
* Constructor. | |
* | |
* Will populate object properties from the provided arguments. | |
* | |
* @since 3.8.0 | |
* | |
* @param string $name Name of block. | |
* @param array $attrs Optional set of attributes from block comment delimiters. | |
* @param array $innerBlocks List of inner blocks (of this same class). | |
* @param string $innerHTML Resultant HTML from inside block comment delimiters after removing inner blocks. | |
* @param array $innerContent List of string fragments and null markers where inner blocks were found. | |
*/ | |
function __construct($name, $attrs, $innerBlocks, $innerHTML, $innerContent) | |
{ | |
} | |
} | |
/** | |
* Class WP_Block_Parser_Frame | |
* | |
* Holds partial blocks in memory while parsing | |
* | |
* @internal | |
* @since 3.8.0 | |
*/ | |
class WP_Block_Parser_Frame | |
{ | |
/** | |
* Full or partial block | |
* | |
* @since 3.8.0 | |
* @var WP_Block_Parser_Block | |
*/ | |
public $block; | |
/** | |
* Byte offset into document for start of parse token | |
* | |
* @since 3.8.0 | |
* @var int | |
*/ | |
public $token_start; | |
/** | |
* Byte length of entire parse token string | |
* | |
* @since 3.8.0 | |
* @var int | |
*/ | |
public $token_length; | |
/** | |
* Byte offset into document for after parse token ends | |
* (used during reconstruction of stack into parse production) | |
* | |
* @since 3.8.0 | |
* @var int | |
*/ | |
public $prev_offset; | |
/** | |
* Byte offset into document where leading HTML before token starts | |
* | |
* @since 3.8.0 | |
* @var int | |
*/ | |
public $leading_html_start; | |
/** | |
* Constructor | |
* | |
* Will populate object properties from the provided arguments. | |
* | |
* @since 3.8.0 | |
* | |
* @param WP_Block_Parser_Block $block Full or partial block. | |
* @param int $token_start Byte offset into document for start of parse token. | |
* @param int $token_length Byte length of entire parse token string. | |
* @param int $prev_offset Byte offset into document for after parse token ends. | |
* @param int $leading_html_start Byte offset into document where leading HTML before token starts. | |
*/ | |
function __construct($block, $token_start, $token_length, $prev_offset = \null, $leading_html_start = \null) | |
{ | |
} | |
} | |
/** | |
* Class WP_Block_Parser | |
* | |
* Parses a document and constructs a list of parsed block objects | |
* | |
* @since 3.8.0 | |
* @since 4.0.0 returns arrays not objects, all attributes are arrays | |
*/ | |
class WP_Block_Parser | |
{ | |
/** | |
* Input document being parsed | |
* | |
* @example "Pre-text\n<!-- wp:paragraph -->This is inside a block!<!-- /wp:paragraph -->" | |
* | |
* @since 3.8.0 | |
* @var string | |
*/ | |
public $document; | |
/** | |
* Tracks parsing progress through document | |
* | |
* @since 3.8.0 | |
* @var int | |
*/ | |
public $offset; | |
/** | |
* List of parsed blocks | |
* | |
* @since 3.8.0 | |
* @var WP_Block_Parser_Block[] | |
*/ | |
public $output; | |
/** | |
* Stack of partially-parsed structures in memory during parse | |
* | |
* @since 3.8.0 | |
* @var WP_Block_Parser_Frame[] | |
*/ | |
public $stack; | |
/** | |
* Empty associative array, here due to PHP quirks | |
* | |
* @since 4.4.0 | |
* @var array empty associative array | |
*/ | |
public $empty_attrs; | |
/** | |
* Parses a document and returns a list of block structures | |
* | |
* When encountering an invalid parse will return a best-effort | |
* parse. In contrast to the specification parser this does not | |
* return an error on invalid inputs. | |
* | |
* @since 3.8.0 | |
* | |
* @param string $document Input document being parsed. | |
* @return WP_Block_Parser_Block[] | |
*/ | |
function parse($document) | |
{ | |
} | |
/** | |
* Processes the next token from the input document | |
* and returns whether to proceed eating more tokens | |
* | |
* This is the "next step" function that essentially | |
* takes a token as its input and decides what to do | |
* with that token before descending deeper into a | |
* nested block tree or continuing along the document | |
* or breaking out of a level of nesting. | |
* | |
* @internal | |
* @since 3.8.0 | |
* @return bool | |
*/ | |
function proceed() | |
{ | |
} | |
/** | |
* Scans the document from where we last left off | |
* and finds the next valid token to parse if it exists | |
* | |
* Returns the type of the find: kind of find, block information, attributes | |
* | |
* @internal | |
* @since 3.8.0 | |
* @since 4.6.1 fixed a bug in attribute parsing which caused catastrophic backtracking on invalid block comments | |
* @return array | |
*/ | |
function next_token() | |
{ | |
} | |
/** | |
* Returns a new block object for freeform HTML | |
* | |
* @internal | |
* @since 3.9.0 | |
* | |
* @param string $innerHTML HTML content of block. | |
* @return WP_Block_Parser_Block freeform block object. | |
*/ | |
function freeform($innerHTML) | |
{ | |
} | |
/** | |
* Pushes a length of text from the input document | |
* to the output list as a freeform block. | |
* | |
* @internal | |
* @since 3.8.0 | |
* @param null $length how many bytes of document text to output. | |
*/ | |
function add_freeform($length = \null) | |
{ | |
} | |
/** | |
* Given a block structure from memory pushes | |
* a new block to the output list. | |
* | |
* @internal | |
* @since 3.8.0 | |
* @param WP_Block_Parser_Block $block The block to add to the output. | |
* @param int $token_start Byte offset into the document where the first token for the block starts. | |
* @param int $token_length Byte length of entire block from start of opening token to end of closing token. | |
* @param int|null $last_offset Last byte offset into document if continuing form earlier output. | |
*/ | |
function add_inner_block(\WP_Block_Parser_Block $block, $token_start, $token_length, $last_offset = \null) | |
{ | |
} | |
/** | |
* Pushes the top block from the parsing stack to the output list. | |
* | |
* @internal | |
* @since 3.8.0 | |
* @param int|null $end_offset byte offset into document for where we should stop sending text output as HTML. | |
*/ | |
function add_block_from_stack($end_offset = \null) | |
{ | |
} | |
} | |
/** | |
* Blocks API: WP_Block_Type_Registry class | |
* | |
* @package WordPress | |
* @subpackage Blocks | |
* @since 5.0.0 | |
*/ | |
/** | |
* Core class used for interacting with block types. | |
* | |
* @since 5.0.0 | |
*/ | |
final class WP_Block_Type_Registry | |
{ | |
/** | |
* Registered block types, as `$name => $instance` pairs. | |
* | |
* @since 5.0.0 | |
* @var WP_Block_Type[] | |
*/ | |
private $registered_block_types = array(); | |
/** | |
* Container for the main instance of the class. | |
* | |
* @since 5.0.0 | |
* @var WP_Block_Type_Registry|null | |
*/ | |
private static $instance = \null; | |
/** | |
* Registers a block type. | |
* | |
* @since 5.0.0 | |
* | |
* @param string|WP_Block_Type $name Block type name including namespace, or alternatively a | |
* complete WP_Block_Type instance. In case a WP_Block_Type | |
* is provided, the $args parameter will be ignored. | |
* @param array $args { | |
* Optional. Array of block type arguments. Any arguments may be defined, however the | |
* ones described below are supported by default. Default empty array. | |
* | |
* @type callable $render_callback Callback used to render blocks of this block type. | |
* @type array $attributes Block attributes mapping, property name to schema. | |
* } | |
* @return WP_Block_Type|false The registered block type on success, or false on failure. | |
*/ | |
public function register($name, $args = array()) | |
{ | |
} | |
/** | |
* Unregisters a block type. | |
* | |
* @since 5.0.0 | |
* | |
* @param string|WP_Block_Type $name Block type name including namespace, or alternatively a | |
* complete WP_Block_Type instance. | |
* @return WP_Block_Type|false The unregistered block type on success, or false on failure. | |
*/ | |
public function unregister($name) | |
{ | |
} | |
/** | |
* Retrieves a registered block type. | |
* | |
* @since 5.0.0 | |
* | |
* @param string $name Block type name including namespace. | |
* @return WP_Block_Type|null The registered block type, or null if it is not registered. | |
*/ | |
public function get_registered($name) | |
{ | |
} | |
/** | |
* Retrieves all registered block types. | |
* | |
* @since 5.0.0 | |
* | |
* @return WP_Block_Type[] Associative array of `$block_type_name => $block_type` pairs. | |
*/ | |
public function get_all_registered() | |
{ | |
} | |
/** | |
* Checks if a block type is registered. | |
* | |
* @since 5.0.0 | |
* | |
* @param string $name Block type name including namespace. | |
* @return bool True if the block type is registered, false otherwise. | |
*/ | |
public function is_registered($name) | |
{ | |
} | |
/** | |
* Utility method to retrieve the main instance of the class. | |
* | |
* The instance will be created if it does not exist yet. | |
* | |
* @since 5.0.0 | |
* | |
* @return WP_Block_Type_Registry The main instance. | |
*/ | |
public static function get_instance() | |
{ | |
} | |
} | |
/** | |
* Blocks API: WP_Block_Type class | |
* | |
* @package WordPress | |
* @subpackage Blocks | |
* @since 5.0.0 | |
*/ | |
/** | |
* Core class representing a block type. | |
* | |
* @since 5.0.0 | |
* | |
* @see register_block_type() | |
*/ | |
class WP_Block_Type | |
{ | |
/** | |
* Block type key. | |
* | |
* @since 5.0.0 | |
* @var string | |
*/ | |
public $name; | |
/** | |
* Block type render callback. | |
* | |
* @since 5.0.0 | |
* @var callable | |
*/ | |
public $render_callback; | |
/** | |
* Block type attributes property schemas. | |
* | |
* @since 5.0.0 | |
* @var array | |
*/ | |
public $attributes; | |
/** | |
* Block type editor script handle. | |
* | |
* @since 5.0.0 | |
* @var string | |
*/ | |
public $editor_script; | |
/** | |
* Block type front end script handle. | |
* | |
* @since 5.0.0 | |
* @var string | |
*/ | |
public $script; | |
/** | |
* Block type editor style handle. | |
* | |
* @since 5.0.0 | |
* @var string | |
*/ | |
public $editor_style; | |
/** | |
* Block type front end style handle. | |
* | |
* @since 5.0.0 | |
* @var string | |
*/ | |
public $style; | |
/** | |
* Constructor. | |
* | |
* Will populate object properties from the provided arguments. | |
* | |
* @since 5.0.0 | |
* | |
* @see register_block_type() | |
* | |
* @param string $block_type Block type name including namespace. | |
* @param array|string $args Optional. Array or string of arguments for registering a block type. | |
* Default empty array. | |
*/ | |
public function __construct($block_type, $args = array()) | |
{ | |
} | |
/** | |
* Renders the block type output for given attributes. | |
* | |
* @since 5.0.0 | |
* | |
* @param array $attributes Optional. Block attributes. Default empty array. | |
* @param string $content Optional. Block content. Default empty string. | |
* @return string Rendered block type output. | |
*/ | |
public function render($attributes = array(), $content = '') | |
{ | |
} | |
/** | |
* Returns true if the block type is dynamic, or false otherwise. A dynamic | |
* block is one which defers its rendering to occur on-demand at runtime. | |
* | |
* @since 5.0.0 | |
* | |
* @return boolean Whether block type is dynamic. | |
*/ | |
public function is_dynamic() | |
{ | |
} | |
/** | |
* Validates attributes against the current block schema, populating | |
* defaulted and missing values. | |
* | |
* @since 5.0.0 | |
* | |
* @param array $attributes Original block attributes. | |
* @return array Prepared block attributes. | |
*/ | |
public function prepare_attributes_for_render($attributes) | |
{ | |
} | |
/** | |
* Sets block type properties. | |
* | |
* @since 5.0.0 | |
* | |
* @param array|string $args Array or string of arguments for registering a block type. | |
*/ | |
public function set_props($args) | |
{ | |
} | |
/** | |
* Get all available block attributes including possible layout attribute from Columns block. | |
* | |
* @since 5.0.0 | |
* | |
* @return array Array of attributes. | |
*/ | |
public function get_attributes() | |
{ | |
} | |
} | |
/** | |
* Comment API: WP_Comment_Query class | |
* | |
* @package WordPress | |
* @subpackage Comments | |
* @since 4.4.0 | |
*/ | |
/** | |
* Core class used for querying comments. | |
* | |
* @since 3.1.0 | |
* | |
* @see WP_Comment_Query::__construct() for accepted arguments. | |
*/ | |
class WP_Comment_Query | |
{ | |
/** | |
* SQL for database query. | |
* | |
* @since 4.0.1 | |
* @var string | |
*/ | |
public $request; | |
/** | |
* Metadata query container | |
* | |
* @since 3.5.0 | |
* @var object WP_Meta_Query | |
*/ | |
public $meta_query = \false; | |
/** | |
* Metadata query clauses. | |
* | |
* @since 4.4.0 | |
* @var array | |
*/ | |
protected $meta_query_clauses; | |
/** | |
* SQL query clauses. | |
* | |
* @since 4.4.0 | |
* @var array | |
*/ | |
protected $sql_clauses = array('select' => '', 'from' => '', 'where' => array(), 'groupby' => '', 'orderby' => '', 'limits' => ''); | |
/** | |
* SQL WHERE clause. | |
* | |
* Stored after the {@see 'comments_clauses'} filter is run on the compiled WHERE sub-clauses. | |
* | |
* @since 4.4.2 | |
* @var string | |
*/ | |
protected $filtered_where_clause; | |
/** | |
* Date query container | |
* | |
* @since 3.7.0 | |
* @var object WP_Date_Query | |
*/ | |
public $date_query = \false; | |
/** | |
* Query vars set by the user. | |
* | |
* @since 3.1.0 | |
* @var array | |
*/ | |
public $query_vars; | |
/** | |
* Default values for query vars. | |
* | |
* @since 4.2.0 | |
* @var array | |
*/ | |
public $query_var_defaults; | |
/** | |
* List of comments located by the query. | |
* | |
* @since 4.0.0 | |
* @var array | |
*/ | |
public $comments; | |
/** | |
* The amount of found comments for the current query. | |
* | |
* @since 4.4.0 | |
* @var int | |
*/ | |
public $found_comments = 0; | |
/** | |
* The number of pages. | |
* | |
* @since 4.4.0 | |
* @var int | |
*/ | |
public $max_num_pages = 0; | |
/** | |
* Make private/protected methods readable for backward compatibility. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $name Method to call. | |
* @param array $arguments Arguments to pass when calling. | |
* @return mixed|false Return value of the callback, false otherwise. | |
*/ | |
public function __call($name, $arguments) | |
{ | |
} | |
/** | |
* Constructor. | |
* | |
* Sets up the comment query, based on the query vars passed. | |
* | |
* @since 4.2.0 | |
* @since 4.4.0 `$parent__in` and `$parent__not_in` were added. | |
* @since 4.4.0 Order by `comment__in` was added. `$update_comment_meta_cache`, `$no_found_rows`, | |
* `$hierarchical`, and `$update_comment_post_cache` were added. | |
* @since 4.5.0 Introduced the `$author_url` argument. | |
* @since 4.6.0 Introduced the `$cache_domain` argument. | |
* @since 4.9.0 Introduced the `$paged` argument. | |
* | |
* @param string|array $query { | |
* Optional. Array or query string of comment query parameters. Default empty. | |
* | |
* @type string $author_email Comment author email address. Default empty. | |
* @type string $author_url Comment author URL. Default empty. | |
* @type array $author__in Array of author IDs to include comments for. Default empty. | |
* @type array $author__not_in Array of author IDs to exclude comments for. Default empty. | |
* @type array $comment__in Array of comment IDs to include. Default empty. | |
* @type array $comment__not_in Array of comment IDs to exclude. Default empty. | |
* @type bool $count Whether to return a comment count (true) or array of | |
* comment objects (false). Default false. | |
* @type array $date_query Date query clauses to limit comments by. See WP_Date_Query. | |
* Default null. | |
* @type string $fields Comment fields to return. Accepts 'ids' for comment IDs | |
* only or empty for all fields. Default empty. | |
* @type int $ID Currently unused. | |
* @type array $include_unapproved Array of IDs or email addresses of users whose unapproved | |
* comments will be returned by the query regardless of | |
* `$status`. Default empty. | |
* @type int $karma Karma score to retrieve matching comments for. | |
* Default empty. | |
* @type string $meta_key Include comments with a matching comment meta key. | |
* Default empty. | |
* @type string $meta_value Include comments with a matching comment meta value. | |
* Requires `$meta_key` to be set. Default empty. | |
* @type array $meta_query Meta query clauses to limit retrieved comments by. | |
* See WP_Meta_Query. Default empty. | |
* @type int $number Maximum number of comments to retrieve. | |
* Default empty (no limit). | |
* @type int $paged When used with $number, defines the page of results to return. | |
* When used with $offset, $offset takes precedence. Default 1. | |
* @type int $offset Number of comments to offset the query. Used to build | |
* LIMIT clause. Default 0. | |
* @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query. | |
* Default: true. | |
* @type string|array $orderby Comment status or array of statuses. To use 'meta_value' | |
* or 'meta_value_num', `$meta_key` must also be defined. | |
* To sort by a specific `$meta_query` clause, use that | |
* clause's array key. Accepts 'comment_agent', | |
* 'comment_approved', 'comment_author', | |
* 'comment_author_email', 'comment_author_IP', | |
* 'comment_author_url', 'comment_content', 'comment_date', | |
* 'comment_date_gmt', 'comment_ID', 'comment_karma', | |
* 'comment_parent', 'comment_post_ID', 'comment_type', | |
* 'user_id', 'comment__in', 'meta_value', 'meta_value_num', | |
* the value of $meta_key, and the array keys of | |
* `$meta_query`. Also accepts false, an empty array, or | |
* 'none' to disable `ORDER BY` clause. | |
* Default: 'comment_date_gmt'. | |
* @type string $order How to order retrieved comments. Accepts 'ASC', 'DESC'. | |
* Default: 'DESC'. | |
* @type int $parent Parent ID of comment to retrieve children of. | |
* Default empty. | |
* @type array $parent__in Array of parent IDs of comments to retrieve children for. | |
* Default empty. | |
* @type array $parent__not_in Array of parent IDs of comments *not* to retrieve | |
* children for. Default empty. | |
* @type array $post_author__in Array of author IDs to retrieve comments for. | |
* Default empty. | |
* @type array $post_author__not_in Array of author IDs *not* to retrieve comments for. | |
* Default empty. | |
* @type int $post_ID Currently unused. | |
* @type int $post_id Limit results to those affiliated with a given post ID. | |
* Default 0. | |
* @type array $post__in Array of post IDs to include affiliated comments for. | |
* Default empty. | |
* @type array $post__not_in Array of post IDs to exclude affiliated comments for. | |
* Default empty. | |
* @type int $post_author Post author ID to limit results by. Default empty. | |
* @type string|array $post_status Post status or array of post statuses to retrieve | |
* affiliated comments for. Pass 'any' to match any value. | |
* Default empty. | |
* @type string $post_type Post type or array of post types to retrieve affiliated | |
* comments for. Pass 'any' to match any value. Default empty. | |
* @type string $post_name Post name to retrieve affiliated comments for. | |
* Default empty. | |
* @type int $post_parent Post parent ID to retrieve affiliated comments for. | |
* Default empty. | |
* @type string $search Search term(s) to retrieve matching comments for. | |
* Default empty. | |
* @type string|array $status Comment stati to limit results by. Accepts an array | |
* or space/comma-separated list of 'hold' (`comment_status=0`), | |
* 'approve' (`comment_status=1`), 'all', or a custom | |
* comment status. Default 'all'. | |
* @type string|array $type Include comments of a given type, or array of types. | |
* Accepts 'comment', 'pings' (includes 'pingback' and | |
* 'trackback'), or anycustom type string. Default empty. | |
* @type array $type__in Include comments from a given array of comment types. | |
* Default empty. | |
* @type array $type__not_in Exclude comments from a given array of comment types. | |
* Default empty. | |
* @type int $user_id Include comments for a specific user ID. Default empty. | |
* @type bool|string $hierarchical Whether to include comment descendants in the results. | |
* 'threaded' returns a tree, with each comment's children | |
* stored in a `children` property on the `WP_Comment` | |
* object. 'flat' returns a flat array of found comments plus | |
* their children. Pass `false` to leave out descendants. | |
* The parameter is ignored (forced to `false`) when | |
* `$fields` is 'ids' or 'counts'. Accepts 'threaded', | |
* 'flat', or false. Default: false. | |
* @type string $cache_domain Unique cache key to be produced when this query is stored in | |
* an object cache. Default is 'core'. | |
* @type bool $update_comment_meta_cache Whether to prime the metadata cache for found comments. | |
* Default true. | |
* @type bool $update_comment_post_cache Whether to prime the cache for comment posts. | |
* Default false. | |
* } | |
*/ | |
public function __construct($query = '') | |
{ | |
} | |
/** | |
* Parse arguments passed to the comment query with default query parameters. | |
* | |
* @since 4.2.0 Extracted from WP_Comment_Query::query(). | |
* | |
* @param string|array $query WP_Comment_Query arguments. See WP_Comment_Query::__construct() | |
*/ | |
public function parse_query($query = '') | |
{ | |
} | |
/** | |
* Sets up the WordPress query for retrieving comments. | |
* | |
* @since 3.1.0 | |
* @since 4.1.0 Introduced 'comment__in', 'comment__not_in', 'post_author__in', | |
* 'post_author__not_in', 'author__in', 'author__not_in', 'post__in', | |
* 'post__not_in', 'include_unapproved', 'type__in', and 'type__not_in' | |
* arguments to $query_vars. | |
* @since 4.2.0 Moved parsing to WP_Comment_Query::parse_query(). | |
* | |
* @param string|array $query Array or URL query string of parameters. | |
* @return array|int List of comments, or number of comments when 'count' is passed as a query var. | |
*/ | |
public function query($query) | |
{ | |
} | |
/** | |
* Get a list of comments matching the query vars. | |
* | |
* @since 4.2.0 | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @return int|array List of comments or number of found comments if `$count` argument is true. | |
*/ | |
public function get_comments() | |
{ | |
} | |
/** | |
* Used internally to get a list of comment IDs matching the query vars. | |
* | |
* @since 4.4.0 | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @return int|array A single count of comment IDs if a count query. An array of comment IDs if a full query. | |
*/ | |
protected function get_comment_ids() | |
{ | |
} | |
/** | |
* Populates found_comments and max_num_pages properties for the current | |
* query if the limit clause was used. | |
* | |
* @since 4.6.0 | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
*/ | |
private function set_found_comments() | |
{ | |
} | |
/** | |
* Fetch descendants for located comments. | |
* | |
* Instead of calling `get_children()` separately on each child comment, we do a single set of queries to fetch | |
* the descendant trees for all matched top-level comments. | |
* | |
* @since 4.4.0 | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param WP_Comment[] $comments Array of top-level comments whose descendants should be filled in. | |
* @return array | |
*/ | |
protected function fill_descendants($comments) | |
{ | |
} | |
/** | |
* Used internally to generate an SQL string for searching across multiple columns | |
* | |
* @since 3.1.0 | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param string $string | |
* @param array $cols | |
* @return string | |
*/ | |
protected function get_search_sql($string, $cols) | |
{ | |
} | |
/** | |
* Parse and sanitize 'orderby' keys passed to the comment query. | |
* | |
* @since 4.2.0 | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param string $orderby Alias for the field to order by. | |
* @return string|false Value to used in the ORDER clause. False otherwise. | |
*/ | |
protected function parse_orderby($orderby) | |
{ | |
} | |
/** | |
* Parse an 'order' query variable and cast it to ASC or DESC as necessary. | |
* | |
* @since 4.2.0 | |
* | |
* @param string $order The 'order' query variable. | |
* @return string The sanitized 'order' query variable. | |
*/ | |
protected function parse_order($order) | |
{ | |
} | |
} | |
/** | |
* Comment API: WP_Comment class | |
* | |
* @package WordPress | |
* @subpackage Comments | |
* @since 4.4.0 | |
*/ | |
/** | |
* Core class used to organize comments as instantiated objects with defined members. | |
* | |
* @since 4.4.0 | |
*/ | |
final class WP_Comment | |
{ | |
/** | |
* Comment ID. | |
* | |
* @since 4.4.0 | |
* @var int | |
*/ | |
public $comment_ID; | |
/** | |
* ID of the post the comment is associated with. | |
* | |
* @since 4.4.0 | |
* @var int | |
*/ | |
public $comment_post_ID = 0; | |
/** | |
* Comment author name. | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
public $comment_author = ''; | |
/** | |
* Comment author email address. | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
public $comment_author_email = ''; | |
/** | |
* Comment author URL. | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
public $comment_author_url = ''; | |
/** | |
* Comment author IP address (IPv4 format). | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
public $comment_author_IP = ''; | |
/** | |
* Comment date in YYYY-MM-DD HH:MM:SS format. | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
public $comment_date = '0000-00-00 00:00:00'; | |
/** | |
* Comment GMT date in YYYY-MM-DD HH::MM:SS format. | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
public $comment_date_gmt = '0000-00-00 00:00:00'; | |
/** | |
* Comment content. | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
public $comment_content; | |
/** | |
* Comment karma count. | |
* | |
* @since 4.4.0 | |
* @var int | |
*/ | |
public $comment_karma = 0; | |
/** | |
* Comment approval status. | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
public $comment_approved = '1'; | |
/** | |
* Comment author HTTP user agent. | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
public $comment_agent = ''; | |
/** | |
* Comment type. | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
public $comment_type = ''; | |
/** | |
* Parent comment ID. | |
* | |
* @since 4.4.0 | |
* @var int | |
*/ | |
public $comment_parent = 0; | |
/** | |
* Comment author ID. | |
* | |
* @since 4.4.0 | |
* @var int | |
*/ | |
public $user_id = 0; | |
/** | |
* Comment children. | |
* | |
* @since 4.4.0 | |
* @var array | |
*/ | |
protected $children; | |
/** | |
* Whether children have been populated for this comment object. | |
* | |
* @since 4.4.0 | |
* @var bool | |
*/ | |
protected $populated_children = \false; | |
/** | |
* Post fields. | |
* | |
* @since 4.4.0 | |
* @var array | |
*/ | |
protected $post_fields = array('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_content_filtered', 'post_parent', 'guid', 'menu_order', 'post_type', 'post_mime_type', 'comment_count'); | |
/** | |
* Retrieves a WP_Comment instance. | |
* | |
* @since 4.4.0 | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param int $id Comment ID. | |
* @return WP_Comment|false Comment object, otherwise false. | |
*/ | |
public static function get_instance($id) | |
{ | |
} | |
/** | |
* Constructor. | |
* | |
* Populates properties with object vars. | |
* | |
* @since 4.4.0 | |
* | |
* @param WP_Comment $comment Comment object. | |
*/ | |
public function __construct($comment) | |
{ | |
} | |
/** | |
* Convert object to array. | |
* | |
* @since 4.4.0 | |
* | |
* @return array Object as array. | |
*/ | |
public function to_array() | |
{ | |
} | |
/** | |
* Get the children of a comment. | |
* | |
* @since 4.4.0 | |
* | |
* @param array $args { | |
* Array of arguments used to pass to get_comments() and determine format. | |
* | |
* @type string $format Return value format. 'tree' for a hierarchical tree, 'flat' for a flattened array. | |
* Default 'tree'. | |
* @type string $status Comment status to limit results by. Accepts 'hold' (`comment_status=0`), | |
* 'approve' (`comment_status=1`), 'all', or a custom comment status. | |
* Default 'all'. | |
* @type string $hierarchical Whether to include comment descendants in the results. | |
* 'threaded' returns a tree, with each comment's children | |
* stored in a `children` property on the `WP_Comment` object. | |
* 'flat' returns a flat array of found comments plus their children. | |
* Pass `false` to leave out descendants. | |
* The parameter is ignored (forced to `false`) when `$fields` is 'ids' or 'counts'. | |
* Accepts 'threaded', 'flat', or false. Default: 'threaded'. | |
* @type string|array $orderby Comment status or array of statuses. To use 'meta_value' | |
* or 'meta_value_num', `$meta_key` must also be defined. | |
* To sort by a specific `$meta_query` clause, use that | |
* clause's array key. Accepts 'comment_agent', | |
* 'comment_approved', 'comment_author', | |
* 'comment_author_email', 'comment_author_IP', | |
* 'comment_author_url', 'comment_content', 'comment_date', | |
* 'comment_date_gmt', 'comment_ID', 'comment_karma', | |
* 'comment_parent', 'comment_post_ID', 'comment_type', | |
* 'user_id', 'comment__in', 'meta_value', 'meta_value_num', | |
* the value of $meta_key, and the array keys of | |
* `$meta_query`. Also accepts false, an empty array, or | |
* 'none' to disable `ORDER BY` clause. | |
* } | |
* @return array Array of `WP_Comment` objects. | |
*/ | |
public function get_children($args = array()) | |
{ | |
} | |
/** | |
* Add a child to the comment. | |
* | |
* Used by `WP_Comment_Query` when bulk-filling descendants. | |
* | |
* @since 4.4.0 | |
* | |
* @param WP_Comment $child Child comment. | |
*/ | |
public function add_child(\WP_Comment $child) | |
{ | |
} | |
/** | |
* Get a child comment by ID. | |
* | |
* @since 4.4.0 | |
* | |
* @param int $child_id ID of the child. | |
* @return WP_Comment|bool Returns the comment object if found, otherwise false. | |
*/ | |
public function get_child($child_id) | |
{ | |
} | |
/** | |
* Set the 'populated_children' flag. | |
* | |
* This flag is important for ensuring that calling `get_children()` on a childless comment will not trigger | |
* unneeded database queries. | |
* | |
* @since 4.4.0 | |
* | |
* @param bool $set Whether the comment's children have already been populated. | |
*/ | |
public function populated_children($set) | |
{ | |
} | |
/** | |
* Check whether a non-public property is set. | |
* | |
* If `$name` matches a post field, the comment post will be loaded and the post's value checked. | |
* | |
* @since 4.4.0 | |
* | |
* @param string $name Property name. | |
* @return bool | |
*/ | |
public function __isset($name) | |
{ | |
} | |
/** | |
* Magic getter. | |
* | |
* If `$name` matches a post field, the comment post will be loaded and the post's value returned. | |
* | |
* @since 4.4.0 | |
* | |
* @param string $name | |
* @return mixed | |
*/ | |
public function __get($name) | |
{ | |
} | |
} | |
/** | |
* WordPress Customize Control classes | |
* | |
* @package WordPress | |
* @subpackage Customize | |
* @since 3.4.0 | |
*/ | |
/** | |
* Customize Control class. | |
* | |
* @since 3.4.0 | |
*/ | |
class WP_Customize_Control | |
{ | |
/** | |
* Incremented with each new class instantiation, then stored in $instance_number. | |
* | |
* Used when sorting two instances whose priorities are equal. | |
* | |
* @since 4.1.0 | |
* @var int | |
*/ | |
protected static $instance_count = 0; | |
/** | |
* Order in which this instance was created in relation to other instances. | |
* | |
* @since 4.1.0 | |
* @var int | |
*/ | |
public $instance_number; | |
/** | |
* Customizer manager. | |
* | |
* @since 3.4.0 | |
* @var WP_Customize_Manager | |
*/ | |
public $manager; | |
/** | |
* Control ID. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $id; | |
/** | |
* All settings tied to the control. | |
* | |
* @since 3.4.0 | |
* @var array | |
*/ | |
public $settings; | |
/** | |
* The primary setting for the control (if there is one). | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $setting = 'default'; | |
/** | |
* Capability required to use this control. | |
* | |
* Normally this is empty and the capability is derived from the capabilities | |
* of the associated `$settings`. | |
* | |
* @since 4.5.0 | |
* @var string | |
*/ | |
public $capability; | |
/** | |
* Order priority to load the control in Customizer. | |
* | |
* @since 3.4.0 | |
* @var int | |
*/ | |
public $priority = 10; | |
/** | |
* Section the control belongs to. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $section = ''; | |
/** | |
* Label for the control. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $label = ''; | |
/** | |
* Description for the control. | |
* | |
* @since 4.0.0 | |
* @var string | |
*/ | |
public $description = ''; | |
/** | |
* List of choices for 'radio' or 'select' type controls, where values are the keys, and labels are the values. | |
* | |
* @since 3.4.0 | |
* @var array | |
*/ | |
public $choices = array(); | |
/** | |
* List of custom input attributes for control output, where attribute names are the keys and values are the values. | |
* | |
* Not used for 'checkbox', 'radio', 'select', 'textarea', or 'dropdown-pages' control types. | |
* | |
* @since 4.0.0 | |
* @var array | |
*/ | |
public $input_attrs = array(); | |
/** | |
* Show UI for adding new content, currently only used for the dropdown-pages control. | |
* | |
* @since 4.7.0 | |
* @var bool | |
*/ | |
public $allow_addition = \false; | |
/** | |
* @deprecated It is better to just call the json() method | |
* @since 3.4.0 | |
* @var array | |
*/ | |
public $json = array(); | |
/** | |
* Control's Type. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $type = 'text'; | |
/** | |
* Callback. | |
* | |
* @since 4.0.0 | |
* | |
* @see WP_Customize_Control::active() | |
* | |
* @var callable Callback is called with one argument, the instance of | |
* WP_Customize_Control, and returns bool to indicate whether | |
* the control is active (such as it relates to the URL | |
* currently being previewed). | |
*/ | |
public $active_callback = ''; | |
/** | |
* Constructor. | |
* | |
* Supplied `$args` override class property defaults. | |
* | |
* If `$args['settings']` is not defined, use the $id as the setting ID. | |
* | |
* @since 3.4.0 | |
* | |
* @param WP_Customize_Manager $manager Customizer bootstrap instance. | |
* @param string $id Control ID. | |
* @param array $args { | |
* Optional. Arguments to override class property defaults. | |
* | |
* @type int $instance_number Order in which this instance was created in relation | |
* to other instances. | |
* @type WP_Customize_Manager $manager Customizer bootstrap instance. | |
* @type string $id Control ID. | |
* @type array $settings All settings tied to the control. If undefined, `$id` will | |
* be used. | |
* @type string $setting The primary setting for the control (if there is one). | |
* Default 'default'. | |
* @type int $priority Order priority to load the control. Default 10. | |
* @type string $section Section the control belongs to. Default empty. | |
* @type string $label Label for the control. Default empty. | |
* @type string $description Description for the control. Default empty. | |
* @type array $choices List of choices for 'radio' or 'select' type controls, where | |
* values are the keys, and labels are the values. | |
* Default empty array. | |
* @type array $input_attrs List of custom input attributes for control output, where | |
* attribute names are the keys and values are the values. Not | |
* used for 'checkbox', 'radio', 'select', 'textarea', or | |
* 'dropdown-pages' control types. Default empty array. | |
* @type array $json Deprecated. Use WP_Customize_Control::json() instead. | |
* @type string $type Control type. Core controls include 'text', 'checkbox', | |
* 'textarea', 'radio', 'select', and 'dropdown-pages'. Additional | |
* input types such as 'email', 'url', 'number', 'hidden', and | |
* 'date' are supported implicitly. Default 'text'. | |
* } | |
*/ | |
public function __construct($manager, $id, $args = array()) | |
{ | |
} | |
/** | |
* Enqueue control related scripts/styles. | |
* | |
* @since 3.4.0 | |
*/ | |
public function enqueue() | |
{ | |
} | |
/** | |
* Check whether control is active to current Customizer preview. | |
* | |
* @since 4.0.0 | |
* | |
* @return bool Whether the control is active to the current preview. | |
*/ | |
public final function active() | |
{ | |
} | |
/** | |
* Default callback used when invoking WP_Customize_Control::active(). | |
* | |
* Subclasses can override this with their specific logic, or they may | |
* provide an 'active_callback' argument to the constructor. | |
* | |
* @since 4.0.0 | |
* | |
* @return true Always true. | |
*/ | |
public function active_callback() | |
{ | |
} | |
/** | |
* Fetch a setting's value. | |
* Grabs the main setting by default. | |
* | |
* @since 3.4.0 | |
* | |
* @param string $setting_key | |
* @return mixed The requested setting's value, if the setting exists. | |
*/ | |
public final function value($setting_key = 'default') | |
{ | |
} | |
/** | |
* Refresh the parameters passed to the JavaScript via JSON. | |
* | |
* @since 3.4.0 | |
*/ | |
public function to_json() | |
{ | |
} | |
/** | |
* Get the data to export to the client via JSON. | |
* | |
* @since 4.1.0 | |
* | |
* @return array Array of parameters passed to the JavaScript. | |
*/ | |
public function json() | |
{ | |
} | |
/** | |
* Checks if the user can use this control. | |
* | |
* Returns false if the user cannot manipulate one of the associated settings, | |
* or if one of the associated settings does not exist. Also returns false if | |
* the associated section does not exist or if its capability check returns | |
* false. | |
* | |
* @since 3.4.0 | |
* | |
* @return bool False if theme doesn't support the control or user doesn't have the required permissions, otherwise true. | |
*/ | |
public final function check_capabilities() | |
{ | |
} | |
/** | |
* Get the control's content for insertion into the Customizer pane. | |
* | |
* @since 4.1.0 | |
* | |
* @return string Contents of the control. | |
*/ | |
public final function get_content() | |
{ | |
} | |
/** | |
* Check capabilities and render the control. | |
* | |
* @since 3.4.0 | |
* @uses WP_Customize_Control::render() | |
*/ | |
public final function maybe_render() | |
{ | |
} | |
/** | |
* Renders the control wrapper and calls $this->render_content() for the internals. | |
* | |
* @since 3.4.0 | |
*/ | |
protected function render() | |
{ | |
} | |
/** | |
* Get the data link attribute for a setting. | |
* | |
* @since 3.4.0 | |
* @since 4.9.0 Return a `data-customize-setting-key-link` attribute if a setting is not registered for the supplied setting key. | |
* | |
* @param string $setting_key | |
* @return string Data link parameter, a `data-customize-setting-link` attribute if the `$setting_key` refers to a pre-registered setting, | |
* and a `data-customize-setting-key-link` attribute if the setting is not yet registered. | |
*/ | |
public function get_link($setting_key = 'default') | |
{ | |
} | |
/** | |
* Render the data link attribute for the control's input element. | |
* | |
* @since 3.4.0 | |
* @uses WP_Customize_Control::get_link() | |
* | |
* @param string $setting_key | |
*/ | |
public function link($setting_key = 'default') | |
{ | |
} | |
/** | |
* Render the custom attributes for the control's input element. | |
* | |
* @since 4.0.0 | |
*/ | |
public function input_attrs() | |
{ | |
} | |
/** | |
* Render the control's content. | |
* | |
* Allows the content to be overridden without having to rewrite the wrapper in `$this::render()`. | |
* | |
* Supports basic input types `text`, `checkbox`, `textarea`, `radio`, `select` and `dropdown-pages`. | |
* Additional input types such as `email`, `url`, `number`, `hidden` and `date` are supported implicitly. | |
* | |
* Control content can alternately be rendered in JS. See WP_Customize_Control::print_template(). | |
* | |
* @since 3.4.0 | |
*/ | |
protected function render_content() | |
{ | |
} | |
/** | |
* Render the control's JS template. | |
* | |
* This function is only run for control types that have been registered with | |
* WP_Customize_Manager::register_control_type(). | |
* | |
* In the future, this will also print the template for the control's container | |
* element and be override-able. | |
* | |
* @since 4.1.0 | |
*/ | |
public final function print_template() | |
{ | |
} | |
/** | |
* An Underscore (JS) template for this control's content (but not its container). | |
* | |
* Class variables for this control class are available in the `data` JS object; | |
* export custom variables by overriding WP_Customize_Control::to_json(). | |
* | |
* @see WP_Customize_Control::print_template() | |
* | |
* @since 4.1.0 | |
*/ | |
protected function content_template() | |
{ | |
} | |
} | |
/** | |
* WordPress Customize Manager classes | |
* | |
* @package WordPress | |
* @subpackage Customize | |
* @since 3.4.0 | |
*/ | |
/** | |
* Customize Manager class. | |
* | |
* Bootstraps the Customize experience on the server-side. | |
* | |
* Sets up the theme-switching process if a theme other than the active one is | |
* being previewed and customized. | |
* | |
* Serves as a factory for Customize Controls and Settings, and | |
* instantiates default Customize Controls and Settings. | |
* | |
* @since 3.4.0 | |
*/ | |
final class WP_Customize_Manager | |
{ | |
/** | |
* An instance of the theme being previewed. | |
* | |
* @since 3.4.0 | |
* @var WP_Theme | |
*/ | |
protected $theme; | |
/** | |
* The directory name of the previously active theme (within the theme_root). | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
protected $original_stylesheet; | |
/** | |
* Whether this is a Customizer pageload. | |
* | |
* @since 3.4.0 | |
* @var bool | |
*/ | |
protected $previewing = \false; | |
/** | |
* Methods and properties dealing with managing widgets in the Customizer. | |
* | |
* @since 3.9.0 | |
* @var WP_Customize_Widgets | |
*/ | |
public $widgets; | |
/** | |
* Methods and properties dealing with managing nav menus in the Customizer. | |
* | |
* @since 4.3.0 | |
* @var WP_Customize_Nav_Menus | |
*/ | |
public $nav_menus; | |
/** | |
* Methods and properties dealing with selective refresh in the Customizer preview. | |
* | |
* @since 4.5.0 | |
* @var WP_Customize_Selective_Refresh | |
*/ | |
public $selective_refresh; | |
/** | |
* Registered instances of WP_Customize_Setting. | |
* | |
* @since 3.4.0 | |
* @var array | |
*/ | |
protected $settings = array(); | |
/** | |
* Sorted top-level instances of WP_Customize_Panel and WP_Customize_Section. | |
* | |
* @since 4.0.0 | |
* @var array | |
*/ | |
protected $containers = array(); | |
/** | |
* Registered instances of WP_Customize_Panel. | |
* | |
* @since 4.0.0 | |
* @var array | |
*/ | |
protected $panels = array(); | |
/** | |
* List of core components. | |
* | |
* @since 4.5.0 | |
* @var array | |
*/ | |
protected $components = array('widgets', 'nav_menus'); | |
/** | |
* Registered instances of WP_Customize_Section. | |
* | |
* @since 3.4.0 | |
* @var array | |
*/ | |
protected $sections = array(); | |
/** | |
* Registered instances of WP_Customize_Control. | |
* | |
* @since 3.4.0 | |
* @var array | |
*/ | |
protected $controls = array(); | |
/** | |
* Panel types that may be rendered from JS templates. | |
* | |
* @since 4.3.0 | |
* @var array | |
*/ | |
protected $registered_panel_types = array(); | |
/** | |
* Section types that may be rendered from JS templates. | |
* | |
* @since 4.3.0 | |
* @var array | |
*/ | |
protected $registered_section_types = array(); | |
/** | |
* Control types that may be rendered from JS templates. | |
* | |
* @since 4.1.0 | |
* @var array | |
*/ | |
protected $registered_control_types = array(); | |
/** | |
* Initial URL being previewed. | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
protected $preview_url; | |
/** | |
* URL to link the user to when closing the Customizer. | |
* | |
* @since 4.4.0 | |
* @var string | |
*/ | |
protected $return_url; | |
/** | |
* Mapping of 'panel', 'section', 'control' to the ID which should be autofocused. | |
* | |
* @since 4.4.0 | |
* @var array | |
*/ | |
protected $autofocus = array(); | |
/** | |
* Messenger channel. | |
* | |
* @since 4.7.0 | |
* @var string | |
*/ | |
protected $messenger_channel; | |
/** | |
* Whether the autosave revision of the changeset should be loaded. | |
* | |
* @since 4.9.0 | |
* @var bool | |
*/ | |
protected $autosaved = \false; | |
/** | |
* Whether the changeset branching is allowed. | |
* | |
* @since 4.9.0 | |
* @var bool | |
*/ | |
protected $branching = \true; | |
/** | |
* Whether settings should be previewed. | |
* | |
* @since 4.9.0 | |
* @var bool | |
*/ | |
protected $settings_previewed = \true; | |
/** | |
* Whether a starter content changeset was saved. | |
* | |
* @since 4.9.0 | |
* @var bool | |
*/ | |
protected $saved_starter_content_changeset = \false; | |
/** | |
* Unsanitized values for Customize Settings parsed from $_POST['customized']. | |
* | |
* @var array | |
*/ | |
private $_post_values; | |
/** | |
* Changeset UUID. | |
* | |
* @since 4.7.0 | |
* @var string | |
*/ | |
private $_changeset_uuid; | |
/** | |
* Changeset post ID. | |
* | |
* @since 4.7.0 | |
* @var int|false | |
*/ | |
private $_changeset_post_id; | |
/** | |
* Changeset data loaded from a customize_changeset post. | |
* | |
* @since 4.7.0 | |
* @var array | |
*/ | |
private $_changeset_data; | |
/** | |
* Constructor. | |
* | |
* @since 3.4.0 | |
* @since 4.7.0 Added `$args` parameter. | |
* | |
* @param array $args { | |
* Args. | |
* | |
* @type null|string|false $changeset_uuid Changeset UUID, the `post_name` for the customize_changeset post containing the customized state. | |
* Defaults to `null` resulting in a UUID to be immediately generated. If `false` is provided, then | |
* then the changeset UUID will be determined during `after_setup_theme`: when the | |
* `customize_changeset_branching` filter returns false, then the default UUID will be that | |
* of the most recent `customize_changeset` post that has a status other than 'auto-draft', | |
* 'publish', or 'trash'. Otherwise, if changeset branching is enabled, then a random UUID will be used. | |
* @type string $theme Theme to be previewed (for theme switch). Defaults to customize_theme or theme query params. | |
* @type string $messenger_channel Messenger channel. Defaults to customize_messenger_channel query param. | |
* @type bool $settings_previewed If settings should be previewed. Defaults to true. | |
* @type bool $branching If changeset branching is allowed; otherwise, changesets are linear. Defaults to true. | |
* @type bool $autosaved If data from a changeset's autosaved revision should be loaded if it exists. Defaults to false. | |
* } | |
*/ | |
public function __construct($args = array()) | |
{ | |
} | |
/** | |
* Return true if it's an Ajax request. | |
* | |
* @since 3.4.0 | |
* @since 4.2.0 Added `$action` param. | |
* | |
* @param string|null $action Whether the supplied Ajax action is being run. | |
* @return bool True if it's an Ajax request, false otherwise. | |
*/ | |
public function doing_ajax($action = \null) | |
{ | |
} | |
/** | |
* Custom wp_die wrapper. Returns either the standard message for UI | |
* or the Ajax message. | |
* | |
* @since 3.4.0 | |
* | |
* @param mixed $ajax_message Ajax return | |
* @param mixed $message UI message | |
*/ | |
protected function wp_die($ajax_message, $message = \null) | |
{ | |
} | |
/** | |
* Return the Ajax wp_die() handler if it's a customized request. | |
* | |
* @since 3.4.0 | |
* @deprecated 4.7.0 | |
* | |
* @return callable Die handler. | |
*/ | |
public function wp_die_handler() | |
{ | |
} | |
/** | |
* Start preview and customize theme. | |
* | |
* Check if customize query variable exist. Init filters to filter the current theme. | |
* | |
* @since 3.4.0 | |
* | |
* @global string $pagenow | |
*/ | |
public function setup_theme() | |
{ | |
} | |
/** | |
* Establish the loaded changeset. | |
* | |
* This method runs right at after_setup_theme and applies the 'customize_changeset_branching' filter to determine | |
* whether concurrent changesets are allowed. Then if the Customizer is not initialized with a `changeset_uuid` param, | |
* this method will determine which UUID should be used. If changeset branching is disabled, then the most saved | |
* changeset will be loaded by default. Otherwise, if there are no existing saved changesets or if changeset branching is | |
* enabled, then a new UUID will be generated. | |
* | |
* @since 4.9.0 | |
* @global string $pagenow | |
*/ | |
public function establish_loaded_changeset() | |
{ | |
} | |
/** | |
* Callback to validate a theme once it is loaded | |
* | |
* @since 3.4.0 | |
*/ | |
public function after_setup_theme() | |
{ | |
} | |
/** | |
* If the theme to be previewed isn't the active theme, add filter callbacks | |
* to swap it out at runtime. | |
* | |
* @since 3.4.0 | |
*/ | |
public function start_previewing_theme() | |
{ | |
} | |
/** | |
* Stop previewing the selected theme. | |
* | |
* Removes filters to change the current theme. | |
* | |
* @since 3.4.0 | |
*/ | |
public function stop_previewing_theme() | |
{ | |
} | |
/** | |
* Gets whether settings are or will be previewed. | |
* | |
* @since 4.9.0 | |
* @see WP_Customize_Setting::preview() | |
* | |
* @return bool | |
*/ | |
public function settings_previewed() | |
{ | |
} | |
/** | |
* Gets whether data from a changeset's autosaved revision should be loaded if it exists. | |
* | |
* @since 4.9.0 | |
* @see WP_Customize_Manager::changeset_data() | |
* | |
* @return bool Is using autosaved changeset revision. | |
*/ | |
public function autosaved() | |
{ | |
} | |
/** | |
* Whether the changeset branching is allowed. | |
* | |
* @since 4.9.0 | |
* @see WP_Customize_Manager::establish_loaded_changeset() | |
* | |
* @return bool Is changeset branching. | |
*/ | |
public function branching() | |
{ | |
} | |
/** | |
* Get the changeset UUID. | |
* | |
* @since 4.7.0 | |
* @see WP_Customize_Manager::establish_loaded_changeset() | |
* | |
* @return string UUID. | |
*/ | |
public function changeset_uuid() | |
{ | |
} | |
/** | |
* Get the theme being customized. | |
* | |
* @since 3.4.0 | |
* | |
* @return WP_Theme | |
*/ | |
public function theme() | |
{ | |
} | |
/** | |
* Get the registered settings. | |
* | |
* @since 3.4.0 | |
* | |
* @return array | |
*/ | |
public function settings() | |
{ | |
} | |
/** | |
* Get the registered controls. | |
* | |
* @since 3.4.0 | |
* | |
* @return array | |
*/ | |
public function controls() | |
{ | |
} | |
/** | |
* Get the registered containers. | |
* | |
* @since 4.0.0 | |
* | |
* @return array | |
*/ | |
public function containers() | |
{ | |
} | |
/** | |
* Get the registered sections. | |
* | |
* @since 3.4.0 | |
* | |
* @return array | |
*/ | |
public function sections() | |
{ | |
} | |
/** | |
* Get the registered panels. | |
* | |
* @since 4.0.0 | |
* | |
* @return array Panels. | |
*/ | |
public function panels() | |
{ | |
} | |
/** | |
* Checks if the current theme is active. | |
* | |
* @since 3.4.0 | |
* | |
* @return bool | |
*/ | |
public function is_theme_active() | |
{ | |
} | |
/** | |
* Register styles/scripts and initialize the preview of each setting | |
* | |
* @since 3.4.0 | |
*/ | |
public function wp_loaded() | |
{ | |
} | |
/** | |
* Prevents Ajax requests from following redirects when previewing a theme | |
* by issuing a 200 response instead of a 30x. | |
* | |
* Instead, the JS will sniff out the location header. | |
* | |
* @since 3.4.0 | |
* @deprecated 4.7.0 | |
* | |
* @param int $status Status. | |
* @return int | |
*/ | |
public function wp_redirect_status($status) | |
{ | |
} | |
/** | |
* Find the changeset post ID for a given changeset UUID. | |
* | |
* @since 4.7.0 | |
* | |
* @param string $uuid Changeset UUID. | |
* @return int|null Returns post ID on success and null on failure. | |
*/ | |
public function find_changeset_post_id($uuid) | |
{ | |
} | |
/** | |
* Get changeset posts. | |
* | |
* @since 4.9.0 | |
* | |
* @param array $args { | |
* Args to pass into `get_posts()` to query changesets. | |
* | |
* @type int $posts_per_page Number of posts to return. Defaults to -1 (all posts). | |
* @type int $author Post author. Defaults to current user. | |
* @type string $post_status Status of changeset. Defaults to 'auto-draft'. | |
* @type bool $exclude_restore_dismissed Whether to exclude changeset auto-drafts that have been dismissed. Defaults to true. | |
* } | |
* @return WP_Post[] Auto-draft changesets. | |
*/ | |
protected function get_changeset_posts($args = array()) | |
{ | |
} | |
/** | |
* Dismiss all of the current user's auto-drafts (other than the present one). | |
* | |
* @since 4.9.0 | |
* @return int The number of auto-drafts that were dismissed. | |
*/ | |
protected function dismiss_user_auto_draft_changesets() | |
{ | |
} | |
/** | |
* Get the changeset post id for the loaded changeset. | |
* | |
* @since 4.7.0 | |
* | |
* @return int|null Post ID on success or null if there is no post yet saved. | |
*/ | |
public function changeset_post_id() | |
{ | |
} | |
/** | |
* Get the data stored in a changeset post. | |
* | |
* @since 4.7.0 | |
* | |
* @param int $post_id Changeset post ID. | |
* @return array|WP_Error Changeset data or WP_Error on error. | |
*/ | |
protected function get_changeset_post_data($post_id) | |
{ | |
} | |
/** | |
* Get changeset data. | |
* | |
* @since 4.7.0 | |
* @since 4.9.0 This will return the changeset's data with a user's autosave revision merged on top, if one exists and $autosaved is true. | |
* | |
* @return array Changeset data. | |
*/ | |
public function changeset_data() | |
{ | |
} | |
/** | |
* Starter content setting IDs. | |
* | |
* @since 4.7.0 | |
* @var array | |
*/ | |
protected $pending_starter_content_settings_ids = array(); | |
/** | |
* Import theme starter content into the customized state. | |
* | |
* @since 4.7.0 | |
* | |
* @param array $starter_content Starter content. Defaults to `get_theme_starter_content()`. | |
*/ | |
function import_theme_starter_content($starter_content = array()) | |
{ | |
} | |
/** | |
* Prepare starter content attachments. | |
* | |
* Ensure that the attachments are valid and that they have slugs and file name/path. | |
* | |
* @since 4.7.0 | |
* | |
* @param array $attachments Attachments. | |
* @return array Prepared attachments. | |
*/ | |
protected function prepare_starter_content_attachments($attachments) | |
{ | |
} | |
/** | |
* Save starter content changeset. | |
* | |
* @since 4.7.0 | |
*/ | |
public function _save_starter_content_changeset() | |
{ | |
} | |
/** | |
* Get dirty pre-sanitized setting values in the current customized state. | |
* | |
* The returned array consists of a merge of three sources: | |
* 1. If the theme is not currently active, then the base array is any stashed | |
* theme mods that were modified previously but never published. | |
* 2. The values from the current changeset, if it exists. | |
* 3. If the user can customize, the values parsed from the incoming | |
* `$_POST['customized']` JSON data. | |
* 4. Any programmatically-set post values via `WP_Customize_Manager::set_post_value()`. | |
* | |
* The name "unsanitized_post_values" is a carry-over from when the customized | |
* state was exclusively sourced from `$_POST['customized']`. Nevertheless, | |
* the value returned will come from the current changeset post and from the | |
* incoming post data. | |
* | |
* @since 4.1.1 | |
* @since 4.7.0 Added `$args` parameter and merging with changeset values and stashed theme mods. | |
* | |
* @param array $args { | |
* Args. | |
* | |
* @type bool $exclude_changeset Whether the changeset values should also be excluded. Defaults to false. | |
* @type bool $exclude_post_data Whether the post input values should also be excluded. Defaults to false when lacking the customize capability. | |
* } | |
* @return array | |
*/ | |
public function unsanitized_post_values($args = array()) | |
{ | |
} | |
/** | |
* Returns the sanitized value for a given setting from the current customized state. | |
* | |
* The name "post_value" is a carry-over from when the customized state was exclusively | |
* sourced from `$_POST['customized']`. Nevertheless, the value returned will come | |
* from the current changeset post and from the incoming post data. | |
* | |
* @since 3.4.0 | |
* @since 4.1.1 Introduced the `$default` parameter. | |
* @since 4.6.0 `$default` is now returned early when the setting post value is invalid. | |
* | |
* @see WP_REST_Server::dispatch() | |
* @see WP_REST_Request::sanitize_params() | |
* @see WP_REST_Request::has_valid_params() | |
* | |
* @param WP_Customize_Setting $setting A WP_Customize_Setting derived object. | |
* @param mixed $default Value returned $setting has no post value (added in 4.2.0) | |
* or the post value is invalid (added in 4.6.0). | |
* @return string|mixed $post_value Sanitized value or the $default provided. | |
*/ | |
public function post_value($setting, $default = \null) | |
{ | |
} | |
/** | |
* Override a setting's value in the current customized state. | |
* | |
* The name "post_value" is a carry-over from when the customized state was | |
* exclusively sourced from `$_POST['customized']`. | |
* | |
* @since 4.2.0 | |
* | |
* @param string $setting_id ID for the WP_Customize_Setting instance. | |
* @param mixed $value Post value. | |
*/ | |
public function set_post_value($setting_id, $value) | |
{ | |
} | |
/** | |
* Print JavaScript settings. | |
* | |
* @since 3.4.0 | |
*/ | |
public function customize_preview_init() | |
{ | |
} | |
/** | |
* Filter the X-Frame-Options and Content-Security-Policy headers to ensure frontend can load in customizer. | |
* | |
* @since 4.7.0 | |
* | |
* @param array $headers Headers. | |
* @return array Headers. | |
*/ | |
public function filter_iframe_security_headers($headers) | |
{ | |
} | |
/** | |
* Add customize state query params to a given URL if preview is allowed. | |
* | |
* @since 4.7.0 | |
* @see wp_redirect() | |
* @see WP_Customize_Manager::get_allowed_url() | |
* | |
* @param string $url URL. | |
* @return string URL. | |
*/ | |
public function add_state_query_params($url) | |
{ | |
} | |
/** | |
* Prevent sending a 404 status when returning the response for the customize | |
* preview, since it causes the jQuery Ajax to fail. Send 200 instead. | |
* | |
* @since 4.0.0 | |
* @deprecated 4.7.0 | |
*/ | |
public function customize_preview_override_404_status() | |
{ | |
} | |
/** | |
* Print base element for preview frame. | |
* | |
* @since 3.4.0 | |
* @deprecated 4.7.0 | |
*/ | |
public function customize_preview_base() | |
{ | |
} | |
/** | |
* Print a workaround to handle HTML5 tags in IE < 9. | |
* | |
* @since 3.4.0 | |
* @deprecated 4.7.0 Customizer no longer supports IE8, so all supported browsers recognize HTML5. | |
*/ | |
public function customize_preview_html5() | |
{ | |
} | |
/** | |
* Print CSS for loading indicators for the Customizer preview. | |
* | |
* @since 4.2.0 | |
*/ | |
public function customize_preview_loading_style() | |
{ | |
} | |
/** | |
* Remove customize_messenger_channel query parameter from the preview window when it is not in an iframe. | |
* | |
* This ensures that the admin bar will be shown. It also ensures that link navigation will | |
* work as expected since the parent frame is not being sent the URL to navigate to. | |
* | |
* @since 4.7.0 | |
*/ | |
public function remove_frameless_preview_messenger_channel() | |
{ | |
} | |
/** | |
* Print JavaScript settings for preview frame. | |
* | |
* @since 3.4.0 | |
*/ | |
public function customize_preview_settings() | |
{ | |
} | |
/** | |
* Prints a signature so we can ensure the Customizer was properly executed. | |
* | |
* @since 3.4.0 | |
* @deprecated 4.7.0 | |
*/ | |
public function customize_preview_signature() | |
{ | |
} | |
/** | |
* Removes the signature in case we experience a case where the Customizer was not properly executed. | |
* | |
* @since 3.4.0 | |
* @deprecated 4.7.0 | |
* | |
* @param mixed $return Value passed through for {@see 'wp_die_handler'} filter. | |
* @return mixed Value passed through for {@see 'wp_die_handler'} filter. | |
*/ | |
public function remove_preview_signature($return = \null) | |
{ | |
} | |
/** | |
* Is it a theme preview? | |
* | |
* @since 3.4.0 | |
* | |
* @return bool True if it's a preview, false if not. | |
*/ | |
public function is_preview() | |
{ | |
} | |
/** | |
* Retrieve the template name of the previewed theme. | |
* | |
* @since 3.4.0 | |
* | |
* @return string Template name. | |
*/ | |
public function get_template() | |
{ | |
} | |
/** | |
* Retrieve the stylesheet name of the previewed theme. | |
* | |
* @since 3.4.0 | |
* | |
* @return string Stylesheet name. | |
*/ | |
public function get_stylesheet() | |
{ | |
} | |
/** | |
* Retrieve the template root of the previewed theme. | |
* | |
* @since 3.4.0 | |
* | |
* @return string Theme root. | |
*/ | |
public function get_template_root() | |
{ | |
} | |
/** | |
* Retrieve the stylesheet root of the previewed theme. | |
* | |
* @since 3.4.0 | |
* | |
* @return string Theme root. | |
*/ | |
public function get_stylesheet_root() | |
{ | |
} | |
/** | |
* Filters the current theme and return the name of the previewed theme. | |
* | |
* @since 3.4.0 | |
* | |
* @param $current_theme {@internal Parameter is not used} | |
* @return string Theme name. | |
*/ | |
public function current_theme($current_theme) | |
{ | |
} | |
/** | |
* Validates setting values. | |
* | |
* Validation is skipped for unregistered settings or for values that are | |
* already null since they will be skipped anyway. Sanitization is applied | |
* to values that pass validation, and values that become null or `WP_Error` | |
* after sanitizing are marked invalid. | |
* | |
* @since 4.6.0 | |
* | |
* @see WP_REST_Request::has_valid_params() | |
* @see WP_Customize_Setting::validate() | |
* | |
* @param array $setting_values Mapping of setting IDs to values to validate and sanitize. | |
* @param array $options { | |
* Options. | |
* | |
* @type bool $validate_existence Whether a setting's existence will be checked. | |
* @type bool $validate_capability Whether the setting capability will be checked. | |
* } | |
* @return array Mapping of setting IDs to return value of validate method calls, either `true` or `WP_Error`. | |
*/ | |
public function validate_setting_values($setting_values, $options = array()) | |
{ | |
} | |
/** | |
* Prepares setting validity for exporting to the client (JS). | |
* | |
* Converts `WP_Error` instance into array suitable for passing into the | |
* `wp.customize.Notification` JS model. | |
* | |
* @since 4.6.0 | |
* | |
* @param true|WP_Error $validity Setting validity. | |
* @return true|array If `$validity` was a WP_Error, the error codes will be array-mapped | |
* to their respective `message` and `data` to pass into the | |
* `wp.customize.Notification` JS model. | |
*/ | |
public function prepare_setting_validity_for_js($validity) | |
{ | |
} | |
/** | |
* Handle customize_save WP Ajax request to save/update a changeset. | |
* | |
* @since 3.4.0 | |
* @since 4.7.0 The semantics of this method have changed to update a changeset, optionally to also change the status and other attributes. | |
*/ | |
public function save() | |
{ | |
} | |
/** | |
* Save the post for the loaded changeset. | |
* | |
* @since 4.7.0 | |
* | |
* @param array $args { | |
* Args for changeset post. | |
* | |
* @type array $data Optional additional changeset data. Values will be merged on top of any existing post values. | |
* @type string $status Post status. Optional. If supplied, the save will be transactional and a post revision will be allowed. | |
* @type string $title Post title. Optional. | |
* @type string $date_gmt Date in GMT. Optional. | |
* @type int $user_id ID for user who is saving the changeset. Optional, defaults to the current user ID. | |
* @type bool $starter_content Whether the data is starter content. If false (default), then $starter_content will be cleared for any $data being saved. | |
* @type bool $autosave Whether this is a request to create an autosave revision. | |
* } | |
* | |
* @return array|WP_Error Returns array on success and WP_Error with array data on error. | |
*/ | |
function save_changeset_post($args = array()) | |
{ | |
} | |
/** | |
* Trash or delete a changeset post. | |
* | |
* The following re-formulates the logic from `wp_trash_post()` as done in | |
* `wp_publish_post()`. The reason for bypassing `wp_trash_post()` is that it | |
* will mutate the the `post_content` and the `post_name` when they should be | |
* untouched. | |
* | |
* @since 4.9.0 | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* @see wp_trash_post() | |
* | |
* @param int|WP_Post $post The changeset post. | |
* @return mixed A WP_Post object for the trashed post or an empty value on failure. | |
*/ | |
public function trash_changeset_post($post) | |
{ | |
} | |
/** | |
* Handle request to trash a changeset. | |
* | |
* @since 4.9.0 | |
*/ | |
public function handle_changeset_trash_request() | |
{ | |
} | |
/** | |
* Re-map 'edit_post' meta cap for a customize_changeset post to be the same as 'customize' maps. | |
* | |
* There is essentially a "meta meta" cap in play here, where 'edit_post' meta cap maps to | |
* the 'customize' meta cap which then maps to 'edit_theme_options'. This is currently | |
* required in core for `wp_create_post_autosave()` because it will call | |
* `_wp_translate_postdata()` which in turn will check if a user can 'edit_post', but the | |
* the caps for the customize_changeset post type are all mapping to the meta capability. | |
* This should be able to be removed once #40922 is addressed in core. | |
* | |
* @since 4.9.0 | |
* @link https://core.trac.wordpress.org/ticket/40922 | |
* @see WP_Customize_Manager::save_changeset_post() | |
* @see _wp_translate_postdata() | |
* | |
* @param string[] $caps Array of the user's capabilities. | |
* @param string $cap Capability name. | |
* @param int $user_id The user ID. | |
* @param array $args Adds the context to the cap. Typically the object ID. | |
* @return array Capabilities. | |
*/ | |
public function grant_edit_post_capability_for_changeset($caps, $cap, $user_id, $args) | |
{ | |
} | |
/** | |
* Marks the changeset post as being currently edited by the current user. | |
* | |
* @since 4.9.0 | |
* | |
* @param int $changeset_post_id Changeset post id. | |
* @param bool $take_over Take over the changeset, default is false. | |
*/ | |
public function set_changeset_lock($changeset_post_id, $take_over = \false) | |
{ | |
} | |
/** | |
* Refreshes changeset lock with the current time if current user edited the changeset before. | |
* | |
* @since 4.9.0 | |
* | |
* @param int $changeset_post_id Changeset post id. | |
*/ | |
public function refresh_changeset_lock($changeset_post_id) | |
{ | |
} | |
/** | |
* Filter heartbeat settings for the Customizer. | |
* | |
* @since 4.9.0 | |
* @param array $settings Current settings to filter. | |
* @return array Heartbeat settings. | |
*/ | |
public function add_customize_screen_to_heartbeat_settings($settings) | |
{ | |
} | |
/** | |
* Get lock user data. | |
* | |
* @since 4.9.0 | |
* | |
* @param int $user_id User ID. | |
* @return array|null User data formatted for client. | |
*/ | |
protected function get_lock_user_data($user_id) | |
{ | |
} | |
/** | |
* Check locked changeset with heartbeat API. | |
* | |
* @since 4.9.0 | |
* | |
* @param array $response The Heartbeat response. | |
* @param array $data The $_POST data sent. | |
* @param string $screen_id The screen id. | |
* @return array The Heartbeat response. | |
*/ | |
public function check_changeset_lock_with_heartbeat($response, $data, $screen_id) | |
{ | |
} | |
/** | |
* Removes changeset lock when take over request is sent via Ajax. | |
* | |
* @since 4.9.0 | |
*/ | |
public function handle_override_changeset_lock_request() | |
{ | |
} | |
/** | |
* Whether a changeset revision should be made. | |
* | |
* @since 4.7.0 | |
* @var bool | |
*/ | |
protected $store_changeset_revision; | |
/** | |
* Filters whether a changeset has changed to create a new revision. | |
* | |
* Note that this will not be called while a changeset post remains in auto-draft status. | |
* | |
* @since 4.7.0 | |
* | |
* @param bool $post_has_changed Whether the post has changed. | |
* @param WP_Post $last_revision The last revision post object. | |
* @param WP_Post $post The post object. | |
* | |
* @return bool Whether a revision should be made. | |
*/ | |
public function _filter_revision_post_has_changed($post_has_changed, $last_revision, $post) | |
{ | |
} | |
/** | |
* Publish changeset values. | |
* | |
* This will the values contained in a changeset, even changesets that do not | |
* correspond to current manager instance. This is called by | |
* `_wp_customize_publish_changeset()` when a customize_changeset post is | |
* transitioned to the `publish` status. As such, this method should not be | |
* called directly and instead `wp_publish_post()` should be used. | |
* | |
* Please note that if the settings in the changeset are for a non-activated | |
* theme, the theme must first be switched to (via `switch_theme()`) before | |
* invoking this method. | |
* | |
* @since 4.7.0 | |
* @see _wp_customize_publish_changeset() | |
* @global wpdb $wpdb | |
* | |
* @param int $changeset_post_id ID for customize_changeset post. Defaults to the changeset for the current manager instance. | |
* @return true|WP_Error True or error info. | |
*/ | |
public function _publish_changeset_values($changeset_post_id) | |
{ | |
} | |
/** | |
* Update stashed theme mod settings. | |
* | |
* @since 4.7.0 | |
* | |
* @param array $inactive_theme_mod_settings Mapping of stylesheet to arrays of theme mod settings. | |
* @return array|false Returns array of updated stashed theme mods or false if the update failed or there were no changes. | |
*/ | |
protected function update_stashed_theme_mod_settings($inactive_theme_mod_settings) | |
{ | |
} | |
/** | |
* Refresh nonces for the current preview. | |
* | |
* @since 4.2.0 | |
*/ | |
public function refresh_nonces() | |
{ | |
} | |
/** | |
* Delete a given auto-draft changeset or the autosave revision for a given changeset or delete changeset lock. | |
* | |
* @since 4.9.0 | |
*/ | |
public function handle_dismiss_autosave_or_lock_request() | |
{ | |
} | |
/** | |
* Add a customize setting. | |
* | |
* @since 3.4.0 | |
* @since 4.5.0 Return added WP_Customize_Setting instance. | |
* | |
* @param WP_Customize_Setting|string $id Customize Setting object, or ID. | |
* @param array $args { | |
* Optional. Array of properties for the new WP_Customize_Setting. Default empty array. | |
* | |
* @type string $type Type of the setting. Default 'theme_mod'. | |
* @type string $capability Capability required for the setting. Default 'edit_theme_options' | |
* @type string|array $theme_supports Theme features required to support the panel. Default is none. | |
* @type string $default Default value for the setting. Default is empty string. | |
* @type string $transport Options for rendering the live preview of changes in Theme Customizer. | |
* Using 'refresh' makes the change visible by reloading the whole preview. | |
* Using 'postMessage' allows a custom JavaScript to handle live changes. | |
* @link https://developer.wordpress.org/themes/customize-api | |
* Default is 'refresh' | |
* @type callable $validate_callback Server-side validation callback for the setting's value. | |
* @type callable $sanitize_callback Callback to filter a Customize setting value in un-slashed form. | |
* @type callable $sanitize_js_callback Callback to convert a Customize PHP setting value to a value that is | |
* JSON serializable. | |
* @type bool $dirty Whether or not the setting is initially dirty when created. | |
* } | |
* @return WP_Customize_Setting The instance of the setting that was added. | |
*/ | |
public function add_setting($id, $args = array()) | |
{ | |
} | |
/** | |
* Register any dynamically-created settings, such as those from $_POST['customized'] | |
* that have no corresponding setting created. | |
* | |
* This is a mechanism to "wake up" settings that have been dynamically created | |
* on the front end and have been sent to WordPress in `$_POST['customized']`. When WP | |
* loads, the dynamically-created settings then will get created and previewed | |
* even though they are not directly created statically with code. | |
* | |
* @since 4.2.0 | |
* | |
* @param array $setting_ids The setting IDs to add. | |
* @return array The WP_Customize_Setting objects added. | |
*/ | |
public function add_dynamic_settings($setting_ids) | |
{ | |
} | |
/** | |
* Retrieve a customize setting. | |
* | |
* @since 3.4.0 | |
* | |
* @param string $id Customize Setting ID. | |
* @return WP_Customize_Setting|void The setting, if set. | |
*/ | |
public function get_setting($id) | |
{ | |
} | |
/** | |
* Remove a customize setting. | |
* | |
* @since 3.4.0 | |
* | |
* @param string $id Customize Setting ID. | |
*/ | |
public function remove_setting($id) | |
{ | |
} | |
/** | |
* Add a customize panel. | |
* | |
* @since 4.0.0 | |
* @since 4.5.0 Return added WP_Customize_Panel instance. | |
* | |
* @param WP_Customize_Panel|string $id Customize Panel object, or Panel ID. | |
* @param array $args { | |
* Optional. Array of properties for the new Panel object. Default empty array. | |
* @type int $priority Priority of the panel, defining the display order of panels and sections. | |
* Default 160. | |
* @type string $capability Capability required for the panel. Default `edit_theme_options` | |
* @type string|array $theme_supports Theme features required to support the panel. | |
* @type string $title Title of the panel to show in UI. | |
* @type string $description Description to show in the UI. | |
* @type string $type Type of the panel. | |
* @type callable $active_callback Active callback. | |
* } | |
* @return WP_Customize_Panel The instance of the panel that was added. | |
*/ | |
public function add_panel($id, $args = array()) | |
{ | |
} | |
/** | |
* Retrieve a customize panel. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $id Panel ID to get. | |
* @return WP_Customize_Panel|void Requested panel instance, if set. | |
*/ | |
public function get_panel($id) | |
{ | |
} | |
/** | |
* Remove a customize panel. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $id Panel ID to remove. | |
*/ | |
public function remove_panel($id) | |
{ | |
} | |
/** | |
* Register a customize panel type. | |
* | |
* Registered types are eligible to be rendered via JS and created dynamically. | |
* | |
* @since 4.3.0 | |
* | |
* @see WP_Customize_Panel | |
* | |
* @param string $panel Name of a custom panel which is a subclass of WP_Customize_Panel. | |
*/ | |
public function register_panel_type($panel) | |
{ | |
} | |
/** | |
* Render JS templates for all registered panel types. | |
* | |
* @since 4.3.0 | |
*/ | |
public function render_panel_templates() | |
{ | |
} | |
/** | |
* Add a customize section. | |
* | |
* @since 3.4.0 | |
* @since 4.5.0 Return added WP_Customize_Section instance. | |
* | |
* @param WP_Customize_Section|string $id Customize Section object, or Section ID. | |
* @param array $args { | |
* Optional. Array of properties for the new Section object. Default empty array. | |
* @type int $priority Priority of the section, defining the display order of panels and sections. | |
* Default 160. | |
* @type string $panel The panel this section belongs to (if any). Default empty. | |
* @type string $capability Capability required for the section. Default 'edit_theme_options' | |
* @type string|array $theme_supports Theme features required to support the section. | |
* @type string $title Title of the section to show in UI. | |
* @type string $description Description to show in the UI. | |
* @type string $type Type of the section. | |
* @type callable $active_callback Active callback. | |
* @type bool $description_hidden Hide the description behind a help icon, instead of inline above the first control. Default false. | |
* } | |
* @return WP_Customize_Section The instance of the section that was added. | |
*/ | |
public function add_section($id, $args = array()) | |
{ | |
} | |
/** | |
* Retrieve a customize section. | |
* | |
* @since 3.4.0 | |
* | |
* @param string $id Section ID. | |
* @return WP_Customize_Section|void The section, if set. | |
*/ | |
public function get_section($id) | |
{ | |
} | |
/** | |
* Remove a customize section. | |
* | |
* @since 3.4.0 | |
* | |
* @param string $id Section ID. | |
*/ | |
public function remove_section($id) | |
{ | |
} | |
/** | |
* Register a customize section type. | |
* | |
* Registered types are eligible to be rendered via JS and created dynamically. | |
* | |
* @since 4.3.0 | |
* | |
* @see WP_Customize_Section | |
* | |
* @param string $section Name of a custom section which is a subclass of WP_Customize_Section. | |
*/ | |
public function register_section_type($section) | |
{ | |
} | |
/** | |
* Render JS templates for all registered section types. | |
* | |
* @since 4.3.0 | |
*/ | |
public function render_section_templates() | |
{ | |
} | |
/** | |
* Add a customize control. | |
* | |
* @since 3.4.0 | |
* @since 4.5.0 Return added WP_Customize_Control instance. | |
* | |
* @param WP_Customize_Control|string $id Customize Control object, or ID. | |
* @param array $args { | |
* Optional. Array of properties for the new Control object. Default empty array. | |
* | |
* @type array $settings All settings tied to the control. If undefined, defaults to `$setting`. | |
* IDs in the array correspond to the ID of a registered `WP_Customize_Setting`. | |
* @type string $setting The primary setting for the control (if there is one). Default is 'default'. | |
* @type string $capability Capability required to use this control. Normally derived from `$settings`. | |
* @type int $priority Order priority to load the control. Default 10. | |
* @type string $section The section this control belongs to. Default empty. | |
* @type string $label Label for the control. Default empty. | |
* @type string $description Description for the control. Default empty. | |
* @type array $choices List of choices for 'radio' or 'select' type controls, where values | |
* are the keys, and labels are the values. Default empty array. | |
* @type array $input_attrs List of custom input attributes for control output, where attribute | |
* names are the keys and values are the values. Default empty array. | |
* @type bool $allow_addition Show UI for adding new content, currently only used for the | |
* dropdown-pages control. Default false. | |
* @type string $type The type of the control. Default 'text'. | |
* @type callback $active_callback Active callback. | |
* } | |
* @return WP_Customize_Control The instance of the control that was added. | |
*/ | |
public function add_control($id, $args = array()) | |
{ | |
} | |
/** | |
* Retrieve a customize control. | |
* | |
* @since 3.4.0 | |
* | |
* @param string $id ID of the control. | |
* @return WP_Customize_Control|void The control object, if set. | |
*/ | |
public function get_control($id) | |
{ | |
} | |
/** | |
* Remove a customize control. | |
* | |
* @since 3.4.0 | |
* | |
* @param string $id ID of the control. | |
*/ | |
public function remove_control($id) | |
{ | |
} | |
/** | |
* Register a customize control type. | |
* | |
* Registered types are eligible to be rendered via JS and created dynamically. | |
* | |
* @since 4.1.0 | |
* | |
* @param string $control Name of a custom control which is a subclass of | |
* WP_Customize_Control. | |
*/ | |
public function register_control_type($control) | |
{ | |
} | |
/** | |
* Render JS templates for all registered control types. | |
* | |
* @since 4.1.0 | |
*/ | |
public function render_control_templates() | |
{ | |
} | |
/** | |
* Helper function to compare two objects by priority, ensuring sort stability via instance_number. | |
* | |
* @since 3.4.0 | |
* @deprecated 4.7.0 Use wp_list_sort() | |
* | |
* @param WP_Customize_Panel|WP_Customize_Section|WP_Customize_Control $a Object A. | |
* @param WP_Customize_Panel|WP_Customize_Section|WP_Customize_Control $b Object B. | |
* @return int | |
*/ | |
protected function _cmp_priority($a, $b) | |
{ | |
} | |
/** | |
* Prepare panels, sections, and controls. | |
* | |
* For each, check if required related components exist, | |
* whether the user has the necessary capabilities, | |
* and sort by priority. | |
* | |
* @since 3.4.0 | |
*/ | |
public function prepare_controls() | |
{ | |
} | |
/** | |
* Enqueue scripts for customize controls. | |
* | |
* @since 3.4.0 | |
*/ | |
public function enqueue_control_scripts() | |
{ | |
} | |
/** | |
* Determine whether the user agent is iOS. | |
* | |
* @since 4.4.0 | |
* | |
* @return bool Whether the user agent is iOS. | |
*/ | |
public function is_ios() | |
{ | |
} | |
/** | |
* Get the template string for the Customizer pane document title. | |
* | |
* @since 4.4.0 | |
* | |
* @return string The template string for the document title. | |
*/ | |
public function get_document_title_template() | |
{ | |
} | |
/** | |
* Set the initial URL to be previewed. | |
* | |
* URL is validated. | |
* | |
* @since 4.4.0 | |
* | |
* @param string $preview_url URL to be previewed. | |
*/ | |
public function set_preview_url($preview_url) | |
{ | |
} | |
/** | |
* Get the initial URL to be previewed. | |
* | |
* @since 4.4.0 | |
* | |
* @return string URL being previewed. | |
*/ | |
public function get_preview_url() | |
{ | |
} | |
/** | |
* Determines whether the admin and the frontend are on different domains. | |
* | |
* @since 4.7.0 | |
* | |
* @return bool Whether cross-domain. | |
*/ | |
public function is_cross_domain() | |
{ | |
} | |
/** | |
* Get URLs allowed to be previewed. | |
* | |
* If the front end and the admin are served from the same domain, load the | |
* preview over ssl if the Customizer is being loaded over ssl. This avoids | |
* insecure content warnings. This is not attempted if the admin and front end | |
* are on different domains to avoid the case where the front end doesn't have | |
* ssl certs. Domain mapping plugins can allow other urls in these conditions | |
* using the customize_allowed_urls filter. | |
* | |
* @since 4.7.0 | |
* | |
* @returns array Allowed URLs. | |
*/ | |
public function get_allowed_urls() | |
{ | |
} | |
/** | |
* Get messenger channel. | |
* | |
* @since 4.7.0 | |
* | |
* @return string Messenger channel. | |
*/ | |
public function get_messenger_channel() | |
{ | |
} | |
/** | |
* Set URL to link the user to when closing the Customizer. | |
* | |
* URL is validated. | |
* | |
* @since 4.4.0 | |
* | |
* @param string $return_url URL for return link. | |
*/ | |
public function set_return_url($return_url) | |
{ | |
} | |
/** | |
* Get URL to link the user to when closing the Customizer. | |
* | |
* @since 4.4.0 | |
* | |
* @return string URL for link to close Customizer. | |
*/ | |
public function get_return_url() | |
{ | |
} | |
/** | |
* Set the autofocused constructs. | |
* | |
* @since 4.4.0 | |
* | |
* @param array $autofocus { | |
* Mapping of 'panel', 'section', 'control' to the ID which should be autofocused. | |
* | |
* @type string [$control] ID for control to be autofocused. | |
* @type string [$section] ID for section to be autofocused. | |
* @type string [$panel] ID for panel to be autofocused. | |
* } | |
*/ | |
public function set_autofocus($autofocus) | |
{ | |
} | |
/** | |
* Get the autofocused constructs. | |
* | |
* @since 4.4.0 | |
* | |
* @return array { | |
* Mapping of 'panel', 'section', 'control' to the ID which should be autofocused. | |
* | |
* @type string [$control] ID for control to be autofocused. | |
* @type string [$section] ID for section to be autofocused. | |
* @type string [$panel] ID for panel to be autofocused. | |
* } | |
*/ | |
public function get_autofocus() | |
{ | |
} | |
/** | |
* Get nonces for the Customizer. | |
* | |
* @since 4.5.0 | |
* | |
* @return array Nonces. | |
*/ | |
public function get_nonces() | |
{ | |
} | |
/** | |
* Print JavaScript settings for parent window. | |
* | |
* @since 4.4.0 | |
*/ | |
public function customize_pane_settings() | |
{ | |
} | |
/** | |
* Returns a list of devices to allow previewing. | |
* | |
* @since 4.5.0 | |
* | |
* @return array List of devices with labels and default setting. | |
*/ | |
public function get_previewable_devices() | |
{ | |
} | |
/** | |
* Register some default controls. | |
* | |
* @since 3.4.0 | |
*/ | |
public function register_controls() | |
{ | |
} | |
/** | |
* Return whether there are published pages. | |
* | |
* Used as active callback for static front page section and controls. | |
* | |
* @since 4.7.0 | |
* | |
* @returns bool Whether there are published (or to be published) pages. | |
*/ | |
public function has_published_pages() | |
{ | |
} | |
/** | |
* Add settings from the POST data that were not added with code, e.g. dynamically-created settings for Widgets | |
* | |
* @since 4.2.0 | |
* | |
* @see add_dynamic_settings() | |
*/ | |
public function register_dynamic_settings() | |
{ | |
} | |
/** | |
* Load themes into the theme browsing/installation UI. | |
* | |
* @since 4.9.0 | |
*/ | |
public function handle_load_themes_request() | |
{ | |
} | |
/** | |
* Callback for validating the header_textcolor value. | |
* | |
* Accepts 'blank', and otherwise uses sanitize_hex_color_no_hash(). | |
* Returns default text color if hex color is empty. | |
* | |
* @since 3.4.0 | |
* | |
* @param string $color | |
* @return mixed | |
*/ | |
public function _sanitize_header_textcolor($color) | |
{ | |
} | |
/** | |
* Callback for validating a background setting value. | |
* | |
* @since 4.7.0 | |
* | |
* @param string $value Repeat value. | |
* @param WP_Customize_Setting $setting Setting. | |
* @return string|WP_Error Background value or validation error. | |
*/ | |
public function _sanitize_background_setting($value, $setting) | |
{ | |
} | |
/** | |
* Export header video settings to facilitate selective refresh. | |
* | |
* @since 4.7.0 | |
* | |
* @param array $response Response. | |
* @param WP_Customize_Selective_Refresh $selective_refresh Selective refresh component. | |
* @param array $partials Array of partials. | |
* @return array | |
*/ | |
public function export_header_video_settings($response, $selective_refresh, $partials) | |
{ | |
} | |
/** | |
* Callback for validating the header_video value. | |
* | |
* Ensures that the selected video is less than 8MB and provides an error message. | |
* | |
* @since 4.7.0 | |
* | |
* @param WP_Error $validity | |
* @param mixed $value | |
* @return mixed | |
*/ | |
public function _validate_header_video($validity, $value) | |
{ | |
} | |
/** | |
* Callback for validating the external_header_video value. | |
* | |
* Ensures that the provided URL is supported. | |
* | |
* @since 4.7.0 | |
* | |
* @param WP_Error $validity | |
* @param mixed $value | |
* @return mixed | |
*/ | |
public function _validate_external_header_video($validity, $value) | |
{ | |
} | |
/** | |
* Callback for sanitizing the external_header_video value. | |
* | |
* @since 4.7.1 | |
* | |
* @param string $value URL. | |
* @return string Sanitized URL. | |
*/ | |
public function _sanitize_external_header_video($value) | |
{ | |
} | |
/** | |
* Callback for rendering the custom logo, used in the custom_logo partial. | |
* | |
* This method exists because the partial object and context data are passed | |
* into a partial's render_callback so we cannot use get_custom_logo() as | |
* the render_callback directly since it expects a blog ID as the first | |
* argument. When WP no longer supports PHP 5.3, this method can be removed | |
* in favor of an anonymous function. | |
* | |
* @see WP_Customize_Manager::register_controls() | |
* | |
* @since 4.5.0 | |
* | |
* @return string Custom logo. | |
*/ | |
public function _render_custom_logo_partial() | |
{ | |
} | |
} | |
/** | |
* WordPress Customize Nav Menus classes | |
* | |
* @package WordPress | |
* @subpackage Customize | |
* @since 4.3.0 | |
*/ | |
/** | |
* Customize Nav Menus class. | |
* | |
* Implements menu management in the Customizer. | |
* | |
* @since 4.3.0 | |
* | |
* @see WP_Customize_Manager | |
*/ | |
final class WP_Customize_Nav_Menus | |
{ | |
/** | |
* WP_Customize_Manager instance. | |
* | |
* @since 4.3.0 | |
* @var WP_Customize_Manager | |
*/ | |
public $manager; | |
/** | |
* Original nav menu locations before the theme was switched. | |
* | |
* @since 4.9.0 | |
* @var array | |
*/ | |
protected $original_nav_menu_locations; | |
/** | |
* Constructor. | |
* | |
* @since 4.3.0 | |
* | |
* @param object $manager An instance of the WP_Customize_Manager class. | |
*/ | |
public function __construct($manager) | |
{ | |
} | |
/** | |
* Adds a nonce for customizing menus. | |
* | |
* @since 4.5.0 | |
* | |
* @param string[] $nonces Array of nonces. | |
* @return string[] $nonces Modified array of nonces. | |
*/ | |
public function filter_nonces($nonces) | |
{ | |
} | |
/** | |
* Ajax handler for loading available menu items. | |
* | |
* @since 4.3.0 | |
*/ | |
public function ajax_load_available_items() | |
{ | |
} | |
/** | |
* Performs the post_type and taxonomy queries for loading available menu items. | |
* | |
* @since 4.3.0 | |
* | |
* @param string $type Optional. Accepts any custom object type and has built-in support for | |
* 'post_type' and 'taxonomy'. Default is 'post_type'. | |
* @param string $object Optional. Accepts any registered taxonomy or post type name. Default is 'page'. | |
* @param int $page Optional. The page number used to generate the query offset. Default is '0'. | |
* @return WP_Error|array Returns either a WP_Error object or an array of menu items. | |
*/ | |
public function load_available_items_query($type = 'post_type', $object = 'page', $page = 0) | |
{ | |
} | |
/** | |
* Ajax handler for searching available menu items. | |
* | |
* @since 4.3.0 | |
*/ | |
public function ajax_search_available_items() | |
{ | |
} | |
/** | |
* Performs post queries for available-item searching. | |
* | |
* Based on WP_Editor::wp_link_query(). | |
* | |
* @since 4.3.0 | |
* | |
* @param array $args Optional. Accepts 'pagenum' and 's' (search) arguments. | |
* @return array Menu items. | |
*/ | |
public function search_available_items_query($args = array()) | |
{ | |
} | |
/** | |
* Enqueue scripts and styles for Customizer pane. | |
* | |
* @since 4.3.0 | |
*/ | |
public function enqueue_scripts() | |
{ | |
} | |
/** | |
* Filters a dynamic setting's constructor args. | |
* | |
* For a dynamic setting to be registered, this filter must be employed | |
* to override the default false value with an array of args to pass to | |
* the WP_Customize_Setting constructor. | |
* | |
* @since 4.3.0 | |
* | |
* @param false|array $setting_args The arguments to the WP_Customize_Setting constructor. | |
* @param string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. | |
* @return array|false | |
*/ | |
public function filter_dynamic_setting_args($setting_args, $setting_id) | |
{ | |
} | |
/** | |
* Allow non-statically created settings to be constructed with custom WP_Customize_Setting subclass. | |
* | |
* @since 4.3.0 | |
* | |
* @param string $setting_class WP_Customize_Setting or a subclass. | |
* @param string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. | |
* @param array $setting_args WP_Customize_Setting or a subclass. | |
* @return string | |
*/ | |
public function filter_dynamic_setting_class($setting_class, $setting_id, $setting_args) | |
{ | |
} | |
/** | |
* Add the customizer settings and controls. | |
* | |
* @since 4.3.0 | |
*/ | |
public function customize_register() | |
{ | |
} | |
/** | |
* Get the base10 intval. | |
* | |
* This is used as a setting's sanitize_callback; we can't use just plain | |
* intval because the second argument is not what intval() expects. | |
* | |
* @since 4.3.0 | |
* | |
* @param mixed $value Number to convert. | |
* @return int Integer. | |
*/ | |
public function intval_base10($value) | |
{ | |
} | |
/** | |
* Return an array of all the available item types. | |
* | |
* @since 4.3.0 | |
* @since 4.7.0 Each array item now includes a `$type_label` in addition to `$title`, `$type`, and `$object`. | |
* | |
* @return array The available menu item types. | |
*/ | |
public function available_item_types() | |
{ | |
} | |
/** | |
* Add a new `auto-draft` post. | |
* | |
* @since 4.7.0 | |
* | |
* @param array $postarr { | |
* Post array. Note that post_status is overridden to be `auto-draft`. | |
* | |
* @var string $post_title Post title. Required. | |
* @var string $post_type Post type. Required. | |
* @var string $post_name Post name. | |
* @var string $post_content Post content. | |
* } | |
* @return WP_Post|WP_Error Inserted auto-draft post object or error. | |
*/ | |
public function insert_auto_draft_post($postarr) | |
{ | |
} | |
/** | |
* Ajax handler for adding a new auto-draft post. | |
* | |
* @since 4.7.0 | |
*/ | |
public function ajax_insert_auto_draft_post() | |
{ | |
} | |
/** | |
* Print the JavaScript templates used to render Menu Customizer components. | |
* | |
* Templates are imported into the JS use wp.template. | |
* | |
* @since 4.3.0 | |
*/ | |
public function print_templates() | |
{ | |
} | |
/** | |
* Print the html template used to render the add-menu-item frame. | |
* | |
* @since 4.3.0 | |
*/ | |
public function available_items_template() | |
{ | |
} | |
/** | |
* Print the markup for new menu items. | |
* | |
* To be used in the template #available-menu-items. | |
* | |
* @since 4.7.0 | |
* | |
* @param array $available_item_type Menu item data to output, including title, type, and label. | |
* @return void | |
*/ | |
protected function print_post_type_container($available_item_type) | |
{ | |
} | |
/** | |
* Print the markup for available menu item custom links. | |
* | |
* @since 4.7.0 | |
* | |
* @return void | |
*/ | |
protected function print_custom_links_available_menu_item() | |
{ | |
} | |
// | |
// Start functionality specific to partial-refresh of menu changes in Customizer preview. | |
// | |
/** | |
* Nav menu args used for each instance, keyed by the args HMAC. | |
* | |
* @since 4.3.0 | |
* @var array | |
*/ | |
public $preview_nav_menu_instance_args = array(); | |
/** | |
* Filters arguments for dynamic nav_menu selective refresh partials. | |
* | |
* @since 4.5.0 | |
* | |
* @param array|false $partial_args Partial args. | |
* @param string $partial_id Partial ID. | |
* @return array Partial args. | |
*/ | |
public function customize_dynamic_partial_args($partial_args, $partial_id) | |
{ | |
} | |
/** | |
* Add hooks for the Customizer preview. | |
* | |
* @since 4.3.0 | |
*/ | |
public function customize_preview_init() | |
{ | |
} | |
/** | |
* Make the auto-draft status protected so that it can be queried. | |
* | |
* @since 4.7.0 | |
* | |
* @global array $wp_post_statuses List of post statuses. | |
*/ | |
public function make_auto_draft_status_previewable() | |
{ | |
} | |
/** | |
* Sanitize post IDs for posts created for nav menu items to be published. | |
* | |
* @since 4.7.0 | |
* | |
* @param array $value Post IDs. | |
* @returns array Post IDs. | |
*/ | |
public function sanitize_nav_menus_created_posts($value) | |
{ | |
} | |
/** | |
* Publish the auto-draft posts that were created for nav menu items. | |
* | |
* The post IDs will have been sanitized by already by | |
* `WP_Customize_Nav_Menu_Items::sanitize_nav_menus_created_posts()` to | |
* remove any post IDs for which the user cannot publish or for which the | |
* post is not an auto-draft. | |
* | |
* @since 4.7.0 | |
* | |
* @param WP_Customize_Setting $setting Customizer setting object. | |
*/ | |
public function save_nav_menus_created_posts($setting) | |
{ | |
} | |
/** | |
* Keep track of the arguments that are being passed to wp_nav_menu(). | |
* | |
* @since 4.3.0 | |
* @see wp_nav_menu() | |
* @see WP_Customize_Widgets::filter_dynamic_sidebar_params() | |
* | |
* @param array $args An array containing wp_nav_menu() arguments. | |
* @return array Arguments. | |
*/ | |
public function filter_wp_nav_menu_args($args) | |
{ | |
} | |
/** | |
* Prepares wp_nav_menu() calls for partial refresh. | |
* | |
* Injects attributes into container element. | |
* | |
* @since 4.3.0 | |
* | |
* @see wp_nav_menu() | |
* | |
* @param string $nav_menu_content The HTML content for the navigation menu. | |
* @param object $args An object containing wp_nav_menu() arguments. | |
* @return string Nav menu HTML with selective refresh attributes added if partial can be refreshed. | |
*/ | |
public function filter_wp_nav_menu($nav_menu_content, $args) | |
{ | |
} | |
/** | |
* Hashes (hmac) the nav menu arguments to ensure they are not tampered with when | |
* submitted in the Ajax request. | |
* | |
* Note that the array is expected to be pre-sorted. | |
* | |
* @since 4.3.0 | |
* | |
* @param array $args The arguments to hash. | |
* @return string Hashed nav menu arguments. | |
*/ | |
public function hash_nav_menu_args($args) | |
{ | |
} | |
/** | |
* Enqueue scripts for the Customizer preview. | |
* | |
* @since 4.3.0 | |
*/ | |
public function customize_preview_enqueue_deps() | |
{ | |
} | |
/** | |
* Exports data from PHP to JS. | |
* | |
* @since 4.3.0 | |
*/ | |
public function export_preview_data() | |
{ | |
} | |
/** | |
* Export any wp_nav_menu() calls during the rendering of any partials. | |
* | |
* @since 4.5.0 | |
* | |
* @param array $response Response. | |
* @return array Response. | |
*/ | |
public function export_partial_rendered_nav_menu_instances($response) | |
{ | |
} | |
/** | |
* Render a specific menu via wp_nav_menu() using the supplied arguments. | |
* | |
* @since 4.3.0 | |
* | |
* @see wp_nav_menu() | |
* | |
* @param WP_Customize_Partial $partial Partial. | |
* @param array $nav_menu_args Nav menu args supplied as container context. | |
* @return string|false | |
*/ | |
public function render_nav_menu_partial($partial, $nav_menu_args) | |
{ | |
} | |
} | |
/** | |
* WordPress Customize Panel classes | |
* | |
* @package WordPress | |
* @subpackage Customize | |
* @since 4.0.0 | |
*/ | |
/** | |
* Customize Panel class. | |
* | |
* A UI container for sections, managed by the WP_Customize_Manager. | |
* | |
* @since 4.0.0 | |
* | |
* @see WP_Customize_Manager | |
*/ | |
class WP_Customize_Panel | |
{ | |
/** | |
* Incremented with each new class instantiation, then stored in $instance_number. | |
* | |
* Used when sorting two instances whose priorities are equal. | |
* | |
* @since 4.1.0 | |
* @var int | |
*/ | |
protected static $instance_count = 0; | |
/** | |
* Order in which this instance was created in relation to other instances. | |
* | |
* @since 4.1.0 | |
* @var int | |
*/ | |
public $instance_number; | |
/** | |
* WP_Customize_Manager instance. | |
* | |
* @since 4.0.0 | |
* @var WP_Customize_Manager | |
*/ | |
public $manager; | |
/** | |
* Unique identifier. | |
* | |
* @since 4.0.0 | |
* @var string | |
*/ | |
public $id; | |
/** | |
* Priority of the panel, defining the display order of panels and sections. | |
* | |
* @since 4.0.0 | |
* @var integer | |
*/ | |
public $priority = 160; | |
/** | |
* Capability required for the panel. | |
* | |
* @since 4.0.0 | |
* @var string | |
*/ | |
public $capability = 'edit_theme_options'; | |
/** | |
* Theme feature support for the panel. | |
* | |
* @since 4.0.0 | |
* @var string|array | |
*/ | |
public $theme_supports = ''; | |
/** | |
* Title of the panel to show in UI. | |
* | |
* @since 4.0.0 | |
* @var string | |
*/ | |
public $title = ''; | |
/** | |
* Description to show in the UI. | |
* | |
* @since 4.0.0 | |
* @var string | |
*/ | |
public $description = ''; | |
/** | |
* Auto-expand a section in a panel when the panel is expanded when the panel only has the one section. | |
* | |
* @since 4.7.4 | |
* @var bool | |
*/ | |
public $auto_expand_sole_section = \false; | |
/** | |
* Customizer sections for this panel. | |
* | |
* @since 4.0.0 | |
* @var array | |
*/ | |
public $sections; | |
/** | |
* Type of this panel. | |
* | |
* @since 4.1.0 | |
* @var string | |
*/ | |
public $type = 'default'; | |
/** | |
* Active callback. | |
* | |
* @since 4.1.0 | |
* | |
* @see WP_Customize_Section::active() | |
* | |
* @var callable Callback is called with one argument, the instance of | |
* WP_Customize_Section, and returns bool to indicate whether | |
* the section is active (such as it relates to the URL currently | |
* being previewed). | |
*/ | |
public $active_callback = ''; | |
/** | |
* Constructor. | |
* | |
* Any supplied $args override class property defaults. | |
* | |
* @since 4.0.0 | |
* | |
* @param WP_Customize_Manager $manager Customizer bootstrap instance. | |
* @param string $id An specific ID for the panel. | |
* @param array $args Panel arguments. | |
*/ | |
public function __construct($manager, $id, $args = array()) | |
{ | |
} | |
/** | |
* Check whether panel is active to current Customizer preview. | |
* | |
* @since 4.1.0 | |
* | |
* @return bool Whether the panel is active to the current preview. | |
*/ | |
public final function active() | |
{ | |
} | |
/** | |
* Default callback used when invoking WP_Customize_Panel::active(). | |
* | |
* Subclasses can override this with their specific logic, or they may | |
* provide an 'active_callback' argument to the constructor. | |
* | |
* @since 4.1.0 | |
* | |
* @return bool Always true. | |
*/ | |
public function active_callback() | |
{ | |
} | |
/** | |
* Gather the parameters passed to client JavaScript via JSON. | |
* | |
* @since 4.1.0 | |
* | |
* @return array The array to be exported to the client as JSON. | |
*/ | |
public function json() | |
{ | |
} | |
/** | |
* Checks required user capabilities and whether the theme has the | |
* feature support required by the panel. | |
* | |
* @since 4.0.0 | |
* | |
* @return bool False if theme doesn't support the panel or the user doesn't have the capability. | |
*/ | |
public final function check_capabilities() | |
{ | |
} | |
/** | |
* Get the panel's content template for insertion into the Customizer pane. | |
* | |
* @since 4.1.0 | |
* | |
* @return string Content for the panel. | |
*/ | |
public final function get_content() | |
{ | |
} | |
/** | |
* Check capabilities and render the panel. | |
* | |
* @since 4.0.0 | |
*/ | |
public final function maybe_render() | |
{ | |
} | |
/** | |
* Render the panel container, and then its contents (via `this->render_content()`) in a subclass. | |
* | |
* Panel containers are now rendered in JS by default, see WP_Customize_Panel::print_template(). | |
* | |
* @since 4.0.0 | |
*/ | |
protected function render() | |
{ | |
} | |
/** | |
* Render the panel UI in a subclass. | |
* | |
* Panel contents are now rendered in JS by default, see WP_Customize_Panel::print_template(). | |
* | |
* @since 4.1.0 | |
*/ | |
protected function render_content() | |
{ | |
} | |
/** | |
* Render the panel's JS templates. | |
* | |
* This function is only run for panel types that have been registered with | |
* WP_Customize_Manager::register_panel_type(). | |
* | |
* @since 4.3.0 | |
* | |
* @see WP_Customize_Manager::register_panel_type() | |
*/ | |
public function print_template() | |
{ | |
} | |
/** | |
* An Underscore (JS) template for rendering this panel's container. | |
* | |
* Class variables for this panel class are available in the `data` JS object; | |
* export custom variables by overriding WP_Customize_Panel::json(). | |
* | |
* @see WP_Customize_Panel::print_template() | |
* | |
* @since 4.3.0 | |
*/ | |
protected function render_template() | |
{ | |
} | |
/** | |
* An Underscore (JS) template for this panel's content (but not its container). | |
* | |
* Class variables for this panel class are available in the `data` JS object; | |
* export custom variables by overriding WP_Customize_Panel::json(). | |
* | |
* @see WP_Customize_Panel::print_template() | |
* | |
* @since 4.3.0 | |
*/ | |
protected function content_template() | |
{ | |
} | |
} | |
/** | |
* WordPress Customize Section classes | |
* | |
* @package WordPress | |
* @subpackage Customize | |
* @since 3.4.0 | |
*/ | |
/** | |
* Customize Section class. | |
* | |
* A UI container for controls, managed by the WP_Customize_Manager class. | |
* | |
* @since 3.4.0 | |
* | |
* @see WP_Customize_Manager | |
*/ | |
class WP_Customize_Section | |
{ | |
/** | |
* Incremented with each new class instantiation, then stored in $instance_number. | |
* | |
* Used when sorting two instances whose priorities are equal. | |
* | |
* @since 4.1.0 | |
* @var int | |
*/ | |
protected static $instance_count = 0; | |
/** | |
* Order in which this instance was created in relation to other instances. | |
* | |
* @since 4.1.0 | |
* @var int | |
*/ | |
public $instance_number; | |
/** | |
* WP_Customize_Manager instance. | |
* | |
* @since 3.4.0 | |
* @var WP_Customize_Manager | |
*/ | |
public $manager; | |
/** | |
* Unique identifier. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $id; | |
/** | |
* Priority of the section which informs load order of sections. | |
* | |
* @since 3.4.0 | |
* @var integer | |
*/ | |
public $priority = 160; | |
/** | |
* Panel in which to show the section, making it a sub-section. | |
* | |
* @since 4.0.0 | |
* @var string | |
*/ | |
public $panel = ''; | |
/** | |
* Capability required for the section. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $capability = 'edit_theme_options'; | |
/** | |
* Theme feature support for the section. | |
* | |
* @since 3.4.0 | |
* @var string|array | |
*/ | |
public $theme_supports = ''; | |
/** | |
* Title of the section to show in UI. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $title = ''; | |
/** | |
* Description to show in the UI. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $description = ''; | |
/** | |
* Customizer controls for this section. | |
* | |
* @since 3.4.0 | |
* @var array | |
*/ | |
public $controls; | |
/** | |
* Type of this section. | |
* | |
* @since 4.1.0 | |
* @var string | |
*/ | |
public $type = 'default'; | |
/** | |
* Active callback. | |
* | |
* @since 4.1.0 | |
* | |
* @see WP_Customize_Section::active() | |
* | |
* @var callable Callback is called with one argument, the instance of | |
* WP_Customize_Section, and returns bool to indicate whether | |
* the section is active (such as it relates to the URL currently | |
* being previewed). | |
*/ | |
public $active_callback = ''; | |
/** | |
* Show the description or hide it behind the help icon. | |
* | |
* @since 4.7.0 | |
* | |
* @var bool Indicates whether the Section's description should be | |
* hidden behind a help icon ("?") in the Section header, | |
* similar to how help icons are displayed on Panels. | |
*/ | |
public $description_hidden = \false; | |
/** | |
* Constructor. | |
* | |
* Any supplied $args override class property defaults. | |
* | |
* @since 3.4.0 | |
* | |
* @param WP_Customize_Manager $manager Customizer bootstrap instance. | |
* @param string $id An specific ID of the section. | |
* @param array $args Section arguments. | |
*/ | |
public function __construct($manager, $id, $args = array()) | |
{ | |
} | |
/** | |
* Check whether section is active to current Customizer preview. | |
* | |
* @since 4.1.0 | |
* | |
* @return bool Whether the section is active to the current preview. | |
*/ | |
public final function active() | |
{ | |
} | |
/** | |
* Default callback used when invoking WP_Customize_Section::active(). | |
* | |
* Subclasses can override this with their specific logic, or they may provide | |
* an 'active_callback' argument to the constructor. | |
* | |
* @since 4.1.0 | |
* | |
* @return true Always true. | |
*/ | |
public function active_callback() | |
{ | |
} | |
/** | |
* Gather the parameters passed to client JavaScript via JSON. | |
* | |
* @since 4.1.0 | |
* | |
* @return array The array to be exported to the client as JSON. | |
*/ | |
public function json() | |
{ | |
} | |
/** | |
* Checks required user capabilities and whether the theme has the | |
* feature support required by the section. | |
* | |
* @since 3.4.0 | |
* | |
* @return bool False if theme doesn't support the section or user doesn't have the capability. | |
*/ | |
public final function check_capabilities() | |
{ | |
} | |
/** | |
* Get the section's content for insertion into the Customizer pane. | |
* | |
* @since 4.1.0 | |
* | |
* @return string Contents of the section. | |
*/ | |
public final function get_content() | |
{ | |
} | |
/** | |
* Check capabilities and render the section. | |
* | |
* @since 3.4.0 | |
*/ | |
public final function maybe_render() | |
{ | |
} | |
/** | |
* Render the section UI in a subclass. | |
* | |
* Sections are now rendered in JS by default, see WP_Customize_Section::print_template(). | |
* | |
* @since 3.4.0 | |
*/ | |
protected function render() | |
{ | |
} | |
/** | |
* Render the section's JS template. | |
* | |
* This function is only run for section types that have been registered with | |
* WP_Customize_Manager::register_section_type(). | |
* | |
* @since 4.3.0 | |
* | |
* @see WP_Customize_Manager::render_template() | |
*/ | |
public function print_template() | |
{ | |
} | |
/** | |
* An Underscore (JS) template for rendering this section. | |
* | |
* Class variables for this section class are available in the `data` JS object; | |
* export custom variables by overriding WP_Customize_Section::json(). | |
* | |
* @since 4.3.0 | |
* | |
* @see WP_Customize_Section::print_template() | |
*/ | |
protected function render_template() | |
{ | |
} | |
} | |
/** | |
* WordPress Customize Setting classes | |
* | |
* @package WordPress | |
* @subpackage Customize | |
* @since 3.4.0 | |
*/ | |
/** | |
* Customize Setting class. | |
* | |
* Handles saving and sanitizing of settings. | |
* | |
* @since 3.4.0 | |
* | |
* @see WP_Customize_Manager | |
*/ | |
class WP_Customize_Setting | |
{ | |
/** | |
* Customizer bootstrap instance. | |
* | |
* @since 3.4.0 | |
* @var WP_Customize_Manager | |
*/ | |
public $manager; | |
/** | |
* Unique string identifier for the setting. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $id; | |
/** | |
* Type of customize settings. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $type = 'theme_mod'; | |
/** | |
* Capability required to edit this setting. | |
* | |
* @since 3.4.0 | |
* @var string|array | |
*/ | |
public $capability = 'edit_theme_options'; | |
/** | |
* Feature a theme is required to support to enable this setting. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $theme_supports = ''; | |
/** | |
* The default value for the setting. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $default = ''; | |
/** | |
* Options for rendering the live preview of changes in Theme Customizer. | |
* | |
* Set this value to 'postMessage' to enable a custom Javascript handler to render changes to this setting | |
* as opposed to reloading the whole page. | |
* | |
* @link https://developer.wordpress.org/themes/customize-api | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $transport = 'refresh'; | |
/** | |
* Server-side validation callback for the setting's value. | |
* | |
* @since 4.6.0 | |
* @var callable | |
*/ | |
public $validate_callback = ''; | |
/** | |
* Callback to filter a Customize setting value in un-slashed form. | |
* | |
* @since 3.4.0 | |
* @var callable | |
*/ | |
public $sanitize_callback = ''; | |
/** | |
* Callback to convert a Customize PHP setting value to a value that is JSON serializable. | |
* | |
* @since 3.4.0 | |
* @var string | |
*/ | |
public $sanitize_js_callback = ''; | |
/** | |
* Whether or not the setting is initially dirty when created. | |
* | |
* This is used to ensure that a setting will be sent from the pane to the | |
* preview when loading the Customizer. Normally a setting only is synced to | |
* the preview if it has been changed. This allows the setting to be sent | |
* from the start. | |
* | |
* @since 4.2.0 | |
* @var bool | |
*/ | |
public $dirty = \false; | |
/** | |
* ID Data. | |
* | |
* @since 3.4.0 | |
* @var array | |
*/ | |
protected $id_data = array(); | |
/** | |
* Whether or not preview() was called. | |
* | |
* @since 4.4.0 | |
* @var bool | |
*/ | |
protected $is_previewed = \false; | |
/** | |
* Cache of multidimensional values to improve performance. | |
* | |
* @since 4.4.0 | |
* @var array | |
*/ | |
protected static $aggregated_multidimensionals = array(); | |
/** | |
* Whether the multidimensional setting is aggregated. | |
* | |
* @since 4.4.0 | |
* @var bool | |
*/ | |
protected $is_multidimensional_aggregated = \false; | |
/** | |
* Constructor. | |
* | |
* Any supplied $args override class property defaults. | |
* | |
* @since 3.4.0 | |
* | |
* @param WP_Customize_Manager $manager | |
* @param string $id An specific ID of the setting. Can be a | |
* theme mod or option name. | |
* @param array $args Setting arguments. | |
*/ | |
public function __construct($manager, $id, $args = array()) | |
{ | |
} | |
/** | |
* Get parsed ID data for multidimensional setting. | |
* | |
* @since 4.4.0 | |
* | |
* @return array { | |
* ID data for multidimensional setting. | |
* | |
* @type string $base ID base | |
* @type array $keys Keys for multidimensional array. | |
* } | |
*/ | |
public final function id_data() | |
{ | |
} | |
/** | |
* Set up the setting for aggregated multidimensional values. | |
* | |
* When a multidimensional setting gets aggregated, all of its preview and update | |
* calls get combined into one call, greatly improving performance. | |
* | |
* @since 4.4.0 | |
*/ | |
protected function aggregate_multidimensional() | |
{ | |
} | |
/** | |
* Reset `$aggregated_multidimensionals` static variable. | |
* | |
* This is intended only for use by unit tests. | |
* | |
* @since 4.5.0 | |
* @ignore | |
*/ | |
public static function reset_aggregated_multidimensionals() | |
{ | |
} | |
/** | |
* The ID for the current site when the preview() method was called. | |
* | |
* @since 4.2.0 | |
* @var int | |
*/ | |
protected $_previewed_blog_id; | |
/** | |
* Return true if the current site is not the same as the previewed site. | |
* | |
* @since 4.2.0 | |
* | |
* @return bool If preview() has been called. | |
*/ | |
public function is_current_blog_previewed() | |
{ | |
} | |
/** | |
* Original non-previewed value stored by the preview method. | |
* | |
* @see WP_Customize_Setting::preview() | |
* @since 4.1.1 | |
* @var mixed | |
*/ | |
protected $_original_value; | |
/** | |
* Add filters to supply the setting's value when accessed. | |
* | |
* If the setting already has a pre-existing value and there is no incoming | |
* post value for the setting, then this method will short-circuit since | |
* there is no change to preview. | |
* | |
* @since 3.4.0 | |
* @since 4.4.0 Added boolean return value. | |
* | |
* @return bool False when preview short-circuits due no change needing to be previewed. | |
*/ | |
public function preview() | |
{ | |
} | |
/** | |
* Clear out the previewed-applied flag for a multidimensional-aggregated value whenever its post value is updated. | |
* | |
* This ensures that the new value will get sanitized and used the next time | |
* that `WP_Customize_Setting::_multidimensional_preview_filter()` | |
* is called for this setting. | |
* | |
* @since 4.4.0 | |
* | |
* @see WP_Customize_Manager::set_post_value() | |
* @see WP_Customize_Setting::_multidimensional_preview_filter() | |
*/ | |
public final function _clear_aggregated_multidimensional_preview_applied_flag() | |
{ | |
} | |
/** | |
* Callback function to filter non-multidimensional theme mods and options. | |
* | |
* If switch_to_blog() was called after the preview() method, and the current | |
* site is now not the same site, then this method does a no-op and returns | |
* the original value. | |
* | |
* @since 3.4.0 | |
* | |
* @param mixed $original Old value. | |
* @return mixed New or old value. | |
*/ | |
public function _preview_filter($original) | |
{ | |
} | |
/** | |
* Callback function to filter multidimensional theme mods and options. | |
* | |
* For all multidimensional settings of a given type, the preview filter for | |
* the first setting previewed will be used to apply the values for the others. | |
* | |
* @since 4.4.0 | |
* | |
* @see WP_Customize_Setting::$aggregated_multidimensionals | |
* @param mixed $original Original root value. | |
* @return mixed New or old value. | |
*/ | |
public final function _multidimensional_preview_filter($original) | |
{ | |
} | |
/** | |
* Checks user capabilities and theme supports, and then saves | |
* the value of the setting. | |
* | |
* @since 3.4.0 | |
* | |
* @return false|void False if cap check fails or value isn't set or is invalid. | |
*/ | |
public final function save() | |
{ | |
} | |
/** | |
* Fetch and sanitize the $_POST value for the setting. | |
* | |
* During a save request prior to save, post_value() provides the new value while value() does not. | |
* | |
* @since 3.4.0 | |
* | |
* @param mixed $default A default value which is used as a fallback. Default is null. | |
* @return mixed The default value on failure, otherwise the sanitized and validated value. | |
*/ | |
public final function post_value($default = \null) | |
{ | |
} | |
/** | |
* Sanitize an input. | |
* | |
* @since 3.4.0 | |
* | |
* @param string|array $value The value to sanitize. | |
* @return string|array|null|WP_Error Sanitized value, or `null`/`WP_Error` if invalid. | |
*/ | |
public function sanitize($value) | |
{ | |
} | |
/** | |
* Validates an input. | |
* | |
* @since 4.6.0 | |
* | |
* @see WP_REST_Request::has_valid_params() | |
* | |
* @param mixed $value Value to validate. | |
* @return true|WP_Error True if the input was validated, otherwise WP_Error. | |
*/ | |
public function validate($value) | |
{ | |
} | |
/** | |
* Get the root value for a setting, especially for multidimensional ones. | |
* | |
* @since 4.4.0 | |
* | |
* @param mixed $default Value to return if root does not exist. | |
* @return mixed | |
*/ | |
protected function get_root_value($default = \null) | |
{ | |
} | |
/** | |
* Set the root value for a setting, especially for multidimensional ones. | |
* | |
* @since 4.4.0 | |
* | |
* @param mixed $value Value to set as root of multidimensional setting. | |
* @return bool Whether the multidimensional root was updated successfully. | |
*/ | |
protected function set_root_value($value) | |
{ | |
} | |
/** | |
* Save the value of the setting, using the related API. | |
* | |
* @since 3.4.0 | |
* | |
* @param mixed $value The value to update. | |
* @return bool The result of saving the value. | |
*/ | |
protected function update($value) | |
{ | |
} | |
/** | |
* Deprecated method. | |
* | |
* @since 3.4.0 | |
* @deprecated 4.4.0 Deprecated in favor of update() method. | |
*/ | |
protected function _update_theme_mod() | |
{ | |
} | |
/** | |
* Deprecated method. | |
* | |
* @since 3.4.0 | |
* @deprecated 4.4.0 Deprecated in favor of update() method. | |
*/ | |
protected function _update_option() | |
{ | |
} | |
/** | |
* Fetch the value of the setting. | |
* | |
* @since 3.4.0 | |
* | |
* @return mixed The value. | |
*/ | |
public function value() | |
{ | |
} | |
/** | |
* Sanitize the setting's value for use in JavaScript. | |
* | |
* @since 3.4.0 | |
* | |
* @return mixed The requested escaped value. | |
*/ | |
public function js_value() | |
{ | |
} | |
/** | |
* Retrieves the data to export to the client via JSON. | |
* | |
* @since 4.6.0 | |
* | |
* @return array Array of parameters passed to JavaScript. | |
*/ | |
public function json() | |
{ | |
} | |
/** | |
* Validate user capabilities whether the theme supports the setting. | |
* | |
* @since 3.4.0 | |
* | |
* @return bool False if theme doesn't support the setting or user can't change setting, otherwise true. | |
*/ | |
public final function check_capabilities() | |
{ | |
} | |
/** | |
* Multidimensional helper function. | |
* | |
* @since 3.4.0 | |
* | |
* @param $root | |
* @param $keys | |
* @param bool $create Default is false. | |
* @return array|void Keys are 'root', 'node', and 'key'. | |
*/ | |
protected final function multidimensional(&$root, $keys, $create = \false) | |
{ | |
} | |
/** | |
* Will attempt to replace a specific value in a multidimensional array. | |
* | |
* @since 3.4.0 | |
* | |
* @param $root | |
* @param $keys | |
* @param mixed $value The value to update. | |
* @return mixed | |
*/ | |
protected final function multidimensional_replace($root, $keys, $value) | |
{ | |
} | |
/** | |
* Will attempt to fetch a specific value from a multidimensional array. | |
* | |
* @since 3.4.0 | |
* | |
* @param $root | |
* @param $keys | |
* @param mixed $default A default value which is used as a fallback. Default is null. | |
* @return mixed The requested value or the default value. | |
*/ | |
protected final function multidimensional_get($root, $keys, $default = \null) | |
{ | |
} | |
/** | |
* Will attempt to check if a specific value in a multidimensional array is set. | |
* | |
* @since 3.4.0 | |
* | |
* @param $root | |
* @param $keys | |
* @return bool True if value is set, false if not. | |
*/ | |
protected final function multidimensional_isset($root, $keys) | |
{ | |
} | |
} | |
/** | |
* WordPress Customize Widgets classes | |
* | |
* @package WordPress | |
* @subpackage Customize | |
* @since 3.9.0 | |
*/ | |
/** | |
* Customize Widgets class. | |
* | |
* Implements widget management in the Customizer. | |
* | |
* @since 3.9.0 | |
* | |
* @see WP_Customize_Manager | |
*/ | |
final class WP_Customize_Widgets | |
{ | |
/** | |
* WP_Customize_Manager instance. | |
* | |
* @since 3.9.0 | |
* @var WP_Customize_Manager | |
*/ | |
public $manager; | |
/** | |
* All id_bases for widgets defined in core. | |
* | |
* @since 3.9.0 | |
* @var array | |
*/ | |
protected $core_widget_id_bases = array('archives', 'calendar', 'categories', 'custom_html', 'links', 'media_audio', 'media_image', 'media_video', 'meta', 'nav_menu', 'pages', 'recent-comments', 'recent-posts', 'rss', 'search', 'tag_cloud', 'text'); | |
/** | |
* @since 3.9.0 | |
* @var array | |
*/ | |
protected $rendered_sidebars = array(); | |
/** | |
* @since 3.9.0 | |
* @var array | |
*/ | |
protected $rendered_widgets = array(); | |
/** | |
* @since 3.9.0 | |
* @var array | |
*/ | |
protected $old_sidebars_widgets = array(); | |
/** | |
* Mapping of widget ID base to whether it supports selective refresh. | |
* | |
* @since 4.5.0 | |
* @var array | |
*/ | |
protected $selective_refreshable_widgets; | |
/** | |
* Mapping of setting type to setting ID pattern. | |
* | |
* @since 4.2.0 | |
* @var array | |
*/ | |
protected $setting_id_patterns = array('widget_instance' => '/^widget_(?P<id_base>.+?)(?:\\[(?P<widget_number>\\d+)\\])?$/', 'sidebar_widgets' => '/^sidebars_widgets\\[(?P<sidebar_id>.+?)\\]$/'); | |
/** | |
* Initial loader. | |
* | |
* @since 3.9.0 | |
* | |
* @param WP_Customize_Manager $manager Customize manager bootstrap instance. | |
*/ | |
public function __construct($manager) | |
{ | |
} | |
/** | |
* List whether each registered widget can be use selective refresh. | |
* | |
* If the theme does not support the customize-selective-refresh-widgets feature, | |
* then this will always return an empty array. | |
* | |
* @since 4.5.0 | |
* | |
* @global WP_Widget_Factory $wp_widget_factory | |
* | |
* @return array Mapping of id_base to support. If theme doesn't support | |
* selective refresh, an empty array is returned. | |
*/ | |
public function get_selective_refreshable_widgets() | |
{ | |
} | |
/** | |
* Determines if a widget supports selective refresh. | |
* | |
* @since 4.5.0 | |
* | |
* @param string $id_base Widget ID Base. | |
* @return bool Whether the widget can be selective refreshed. | |
*/ | |
public function is_widget_selective_refreshable($id_base) | |
{ | |
} | |
/** | |
* Retrieves the widget setting type given a setting ID. | |
* | |
* @since 4.2.0 | |
* | |
* @staticvar array $cache | |
* | |
* @param string $setting_id Setting ID. | |
* @return string|void Setting type. | |
*/ | |
protected function get_setting_type($setting_id) | |
{ | |
} | |
/** | |
* Inspects the incoming customized data for any widget settings, and dynamically adds | |
* them up-front so widgets will be initialized properly. | |
* | |
* @since 4.2.0 | |
*/ | |
public function register_settings() | |
{ | |
} | |
/** | |
* Determines the arguments for a dynamically-created setting. | |
* | |
* @since 4.2.0 | |
* | |
* @param false|array $args The arguments to the WP_Customize_Setting constructor. | |
* @param string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. | |
* @return false|array Setting arguments, false otherwise. | |
*/ | |
public function filter_customize_dynamic_setting_args($args, $setting_id) | |
{ | |
} | |
/** | |
* Retrieves an unslashed post value or return a default. | |
* | |
* @since 3.9.0 | |
* | |
* @param string $name Post value. | |
* @param mixed $default Default post value. | |
* @return mixed Unslashed post value or default value. | |
*/ | |
protected function get_post_value($name, $default = \null) | |
{ | |
} | |
/** | |
* Override sidebars_widgets for theme switch. | |
* | |
* When switching a theme via the Customizer, supply any previously-configured | |
* sidebars_widgets from the target theme as the initial sidebars_widgets | |
* setting. Also store the old theme's existing settings so that they can | |
* be passed along for storing in the sidebars_widgets theme_mod when the | |
* theme gets switched. | |
* | |
* @since 3.9.0 | |
* | |
* @global array $sidebars_widgets | |
* @global array $_wp_sidebars_widgets | |
*/ | |
public function override_sidebars_widgets_for_theme_switch() | |
{ | |
} | |
/** | |
* Filters old_sidebars_widgets_data Customizer setting. | |
* | |
* When switching themes, filter the Customizer setting old_sidebars_widgets_data | |
* to supply initial $sidebars_widgets before they were overridden by retrieve_widgets(). | |
* The value for old_sidebars_widgets_data gets set in the old theme's sidebars_widgets | |
* theme_mod. | |
* | |
* @since 3.9.0 | |
* | |
* @see WP_Customize_Widgets::handle_theme_switch() | |
* | |
* @param array $old_sidebars_widgets | |
* @return array | |
*/ | |
public function filter_customize_value_old_sidebars_widgets_data($old_sidebars_widgets) | |
{ | |
} | |
/** | |
* Filters sidebars_widgets option for theme switch. | |
* | |
* When switching themes, the retrieve_widgets() function is run when the Customizer initializes, | |
* and then the new sidebars_widgets here get supplied as the default value for the sidebars_widgets | |
* option. | |
* | |
* @since 3.9.0 | |
* | |
* @see WP_Customize_Widgets::handle_theme_switch() | |
* @global array $sidebars_widgets | |
* | |
* @param array $sidebars_widgets | |
* @return array | |
*/ | |
public function filter_option_sidebars_widgets_for_theme_switch($sidebars_widgets) | |
{ | |
} | |
/** | |
* Ensures all widgets get loaded into the Customizer. | |
* | |
* Note: these actions are also fired in wp_ajax_update_widget(). | |
* | |
* @since 3.9.0 | |
*/ | |
public function customize_controls_init() | |
{ | |
} | |
/** | |
* Ensures widgets are available for all types of previews. | |
* | |
* When in preview, hook to {@see 'customize_register'} for settings after WordPress is loaded | |
* so that all filters have been initialized (e.g. Widget Visibility). | |
* | |
* @since 3.9.0 | |
*/ | |
public function schedule_customize_register() | |
{ | |
} | |
/** | |
* Registers Customizer settings and controls for all sidebars and widgets. | |
* | |
* @since 3.9.0 | |
* | |
* @global array $wp_registered_widgets | |
* @global array $wp_registered_widget_controls | |
* @global array $wp_registered_sidebars | |
*/ | |
public function customize_register() | |
{ | |
} | |
/** | |
* Determines whether the widgets panel is active, based on whether there are sidebars registered. | |
* | |
* @since 4.4.0 | |
* | |
* @see WP_Customize_Panel::$active_callback | |
* | |
* @global array $wp_registered_sidebars | |
* @return bool Active. | |
*/ | |
public function is_panel_active() | |
{ | |
} | |
/** | |
* Converts a widget_id into its corresponding Customizer setting ID (option name). | |
* | |
* @since 3.9.0 | |
* | |
* @param string $widget_id Widget ID. | |
* @return string Maybe-parsed widget ID. | |
*/ | |
public function get_setting_id($widget_id) | |
{ | |
} | |
/** | |
* Determines whether the widget is considered "wide". | |
* | |
* Core widgets which may have controls wider than 250, but can still be shown | |
* in the narrow Customizer panel. The RSS and Text widgets in Core, for example, | |
* have widths of 400 and yet they still render fine in the Customizer panel. | |
* | |
* This method will return all Core widgets as being not wide, but this can be | |
* overridden with the {@see 'is_wide_widget_in_customizer'} filter. | |
* | |
* @since 3.9.0 | |
* | |
* @global $wp_registered_widget_controls | |
* | |
* @param string $widget_id Widget ID. | |
* @return bool Whether or not the widget is a "wide" widget. | |
*/ | |
public function is_wide_widget($widget_id) | |
{ | |
} | |
/** | |
* Converts a widget ID into its id_base and number components. | |
* | |
* @since 3.9.0 | |
* | |
* @param string $widget_id Widget ID. | |
* @return array Array containing a widget's id_base and number components. | |
*/ | |
public function parse_widget_id($widget_id) | |
{ | |
} | |
/** | |
* Converts a widget setting ID (option path) to its id_base and number components. | |
* | |
* @since 3.9.0 | |
* | |
* @param string $setting_id Widget setting ID. | |
* @return WP_Error|array Array containing a widget's id_base and number components, | |
* or a WP_Error object. | |
*/ | |
public function parse_widget_setting_id($setting_id) | |
{ | |
} | |
/** | |
* Calls admin_print_styles-widgets.php and admin_print_styles hooks to | |
* allow custom styles from plugins. | |
* | |
* @since 3.9.0 | |
*/ | |
public function print_styles() | |
{ | |
} | |
/** | |
* Calls admin_print_scripts-widgets.php and admin_print_scripts hooks to | |
* allow custom scripts from plugins. | |
* | |
* @since 3.9.0 | |
*/ | |
public function print_scripts() | |
{ | |
} | |
/** | |
* Enqueues scripts and styles for Customizer panel and export data to JavaScript. | |
* | |
* @since 3.9.0 | |
* | |
* @global WP_Scripts $wp_scripts | |
* @global array $wp_registered_sidebars | |
* @global array $wp_registered_widgets | |
*/ | |
public function enqueue_scripts() | |
{ | |
} | |
/** | |
* Renders the widget form control templates into the DOM. | |
* | |
* @since 3.9.0 | |
*/ | |
public function output_widget_control_templates() | |
{ | |
} | |
/** | |
* Calls admin_print_footer_scripts and admin_print_scripts hooks to | |
* allow custom scripts from plugins. | |
* | |
* @since 3.9.0 | |
*/ | |
public function print_footer_scripts() | |
{ | |
} | |
/** | |
* Retrieves common arguments to supply when constructing a Customizer setting. | |
* | |
* @since 3.9.0 | |
* | |
* @param string $id Widget setting ID. | |
* @param array $overrides Array of setting overrides. | |
* @return array Possibly modified setting arguments. | |
*/ | |
public function get_setting_args($id, $overrides = array()) | |
{ | |
} | |
/** | |
* Ensures sidebar widget arrays only ever contain widget IDS. | |
* | |
* Used as the 'sanitize_callback' for each $sidebars_widgets setting. | |
* | |
* @since 3.9.0 | |
* | |
* @param string[] $widget_ids Array of widget IDs. | |
* @return string[] Array of sanitized widget IDs. | |
*/ | |
public function sanitize_sidebar_widgets($widget_ids) | |
{ | |
} | |
/** | |
* Builds up an index of all available widgets for use in Backbone models. | |
* | |
* @since 3.9.0 | |
* | |
* @global array $wp_registered_widgets | |
* @global array $wp_registered_widget_controls | |
* @staticvar array $available_widgets | |
* | |
* @see wp_list_widgets() | |
* | |
* @return array List of available widgets. | |
*/ | |
public function get_available_widgets() | |
{ | |
} | |
/** | |
* Naturally orders available widgets by name. | |
* | |
* @since 3.9.0 | |
* | |
* @param array $widget_a The first widget to compare. | |
* @param array $widget_b The second widget to compare. | |
* @return int Reorder position for the current widget comparison. | |
*/ | |
protected function _sort_name_callback($widget_a, $widget_b) | |
{ | |
} | |
/** | |
* Retrieves the widget control markup. | |
* | |
* @since 3.9.0 | |
* | |
* @param array $args Widget control arguments. | |
* @return string Widget control form HTML markup. | |
*/ | |
public function get_widget_control($args) | |
{ | |
} | |
/** | |
* Retrieves the widget control markup parts. | |
* | |
* @since 4.4.0 | |
* | |
* @param array $args Widget control arguments. | |
* @return array { | |
* @type string $control Markup for widget control wrapping form. | |
* @type string $content The contents of the widget form itself. | |
* } | |
*/ | |
public function get_widget_control_parts($args) | |
{ | |
} | |
/** | |
* Adds hooks for the Customizer preview. | |
* | |
* @since 3.9.0 | |
*/ | |
public function customize_preview_init() | |
{ | |
} | |
/** | |
* Refreshes the nonce for widget updates. | |
* | |
* @since 4.2.0 | |
* | |
* @param array $nonces Array of nonces. | |
* @return array $nonces Array of nonces. | |
*/ | |
public function refresh_nonces($nonces) | |
{ | |
} | |
/** | |
* When previewing, ensures the proper previewing widgets are used. | |
* | |
* Because wp_get_sidebars_widgets() gets called early at {@see 'init' } (via | |
* wp_convert_widget_settings()) and can set global variable `$_wp_sidebars_widgets` | |
* to the value of `get_option( 'sidebars_widgets' )` before the Customizer preview | |
* filter is added, it has to be reset after the filter has been added. | |
* | |
* @since 3.9.0 | |
* | |
* @param array $sidebars_widgets List of widgets for the current sidebar. | |
* @return array | |
*/ | |
public function preview_sidebars_widgets($sidebars_widgets) | |
{ | |
} | |
/** | |
* Enqueues scripts for the Customizer preview. | |
* | |
* @since 3.9.0 | |
*/ | |
public function customize_preview_enqueue() | |
{ | |
} | |
/** | |
* Inserts default style for highlighted widget at early point so theme | |
* stylesheet can override. | |
* | |
* @since 3.9.0 | |
*/ | |
public function print_preview_css() | |
{ | |
} | |
/** | |
* Communicates the sidebars that appeared on the page at the very end of the page, | |
* and at the very end of the wp_footer, | |
* | |
* @since 3.9.0 | |
* | |
* @global array $wp_registered_sidebars | |
* @global array $wp_registered_widgets | |
*/ | |
public function export_preview_data() | |
{ | |
} | |
/** | |
* Tracks the widgets that were rendered. | |
* | |
* @since 3.9.0 | |
* | |
* @param array $widget Rendered widget to tally. | |
*/ | |
public function tally_rendered_widgets($widget) | |
{ | |
} | |
/** | |
* Determine if a widget is rendered on the page. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $widget_id Widget ID to check. | |
* @return bool Whether the widget is rendered. | |
*/ | |
public function is_widget_rendered($widget_id) | |
{ | |
} | |
/** | |
* Determines if a sidebar is rendered on the page. | |
* | |
* @since 4.0.0 | |
* | |
* @param string $sidebar_id Sidebar ID to check. | |
* @return bool Whether the sidebar is rendered. | |
*/ | |
public function is_sidebar_rendered($sidebar_id) | |
{ | |
} | |
/** | |
* Tallies the sidebars rendered via is_active_sidebar(). | |
* | |
* Keep track of the times that is_active_sidebar() is called in the template, | |
* and assume that this means that the sidebar would be rendered on the template | |
* if there were widgets populating it. | |
* | |
* @since 3.9.0 | |
* | |
* @param bool $is_active Whether the sidebar is active. | |
* @param string $sidebar_id Sidebar ID. | |
* @return bool Whether the sidebar is active. | |
*/ | |
public function tally_sidebars_via_is_active_sidebar_calls($is_active, $sidebar_id) | |
{ | |
} | |
/** | |
* Tallies the sidebars rendered via dynamic_sidebar(). | |
* | |
* Keep track of the times that dynamic_sidebar() is called in the template, | |
* and assume this means the sidebar would be rendered on the template if | |
* there were widgets populating it. | |
* | |
* @since 3.9.0 | |
* | |
* @param bool $has_widgets Whether the current sidebar has widgets. | |
* @param string $sidebar_id Sidebar ID. | |
* @return bool Whether the current sidebar has widgets. | |
*/ | |
public function tally_sidebars_via_dynamic_sidebar_calls($has_widgets, $sidebar_id) | |
{ | |
} | |
/** | |
* Retrieves MAC for a serialized widget instance string. | |
* | |
* Allows values posted back from JS to be rejected if any tampering of the | |
* data has occurred. | |
* | |
* @since 3.9.0 | |
* | |
* @param string $serialized_instance Widget instance. | |
* @return string MAC for serialized widget instance. | |
*/ | |
protected function get_instance_hash_key($serialized_instance) | |
{ | |
} | |
/** | |
* Sanitizes a widget instance. | |
* | |
* Unserialize the JS-instance for storing in the options. It's important that this filter | |
* only get applied to an instance *once*. | |
* | |
* @since 3.9.0 | |
* | |
* @param array $value Widget instance to sanitize. | |
* @return array|void Sanitized widget instance. | |
*/ | |
public function sanitize_widget_instance($value) | |
{ | |
} | |
/** | |
* Converts a widget instance into JSON-representable format. | |
* | |
* @since 3.9.0 | |
* | |
* @param array $value Widget instance to convert to JSON. | |
* @return array JSON-converted widget instance. | |
*/ | |
public function sanitize_widget_js_instance($value) | |
{ | |
} | |
/** | |
* Strips out widget IDs for widgets which are no longer registered. | |
* | |
* One example where this might happen is when a plugin orphans a widget | |
* in a sidebar upon deactivation. | |
* | |
* @since 3.9.0 | |
* | |
* @global array $wp_registered_widgets | |
* | |
* @param array $widget_ids List of widget IDs. | |
* @return array Parsed list of widget IDs. | |
*/ | |
public function sanitize_sidebar_widgets_js_instance($widget_ids) | |
{ | |
} | |
/** | |
* Finds and invokes the widget update and control callbacks. | |
* | |
* Requires that `$_POST` be populated with the instance data. | |
* | |
* @since 3.9.0 | |
* | |
* @global array $wp_registered_widget_updates | |
* @global array $wp_registered_widget_controls | |
* | |
* @param string $widget_id Widget ID. | |
* @return WP_Error|array Array containing the updated widget information. | |
* A WP_Error object, otherwise. | |
*/ | |
public function call_widget_update($widget_id) | |
{ | |
} | |
/** | |
* Updates widget settings asynchronously. | |
* | |
* Allows the Customizer to update a widget using its form, but return the new | |
* instance info via Ajax instead of saving it to the options table. | |
* | |
* Most code here copied from wp_ajax_save_widget(). | |
* | |
* @since 3.9.0 | |
* | |
* @see wp_ajax_save_widget() | |
*/ | |
public function wp_ajax_update_widget() | |
{ | |
} | |
/* | |
* Selective Refresh Methods | |
*/ | |
/** | |
* Filters arguments for dynamic widget partials. | |
* | |
* @since 4.5.0 | |
* | |
* @param array|false $partial_args Partial arguments. | |
* @param string $partial_id Partial ID. | |
* @return array (Maybe) modified partial arguments. | |
*/ | |
public function customize_dynamic_partial_args($partial_args, $partial_id) | |
{ | |
} | |
/** | |
* Adds hooks for selective refresh. | |
* | |
* @since 4.5.0 | |
*/ | |
public function selective_refresh_init() | |
{ | |
} | |
/** | |
* Inject selective refresh data attributes into widget container elements. | |
* | |
* @since 4.5.0 | |
* | |
* @param array $params { | |
* Dynamic sidebar params. | |
* | |
* @type array $args Sidebar args. | |
* @type array $widget_args Widget args. | |
* } | |
* @see WP_Customize_Nav_Menus::filter_wp_nav_menu_args() | |
* | |
* @return array Params. | |
*/ | |
public function filter_dynamic_sidebar_params($params) | |
{ | |
} | |
/** | |
* List of the tag names seen for before_widget strings. | |
* | |
* This is used in the {@see 'filter_wp_kses_allowed_html'} filter to ensure that the | |
* data-* attributes can be whitelisted. | |
* | |
* @since 4.5.0 | |
* @var array | |
*/ | |
protected $before_widget_tags_seen = array(); | |
/** | |
* Ensures the HTML data-* attributes for selective refresh are allowed by kses. | |
* | |
* This is needed in case the `$before_widget` is run through wp_kses() when printed. | |
* | |
* @since 4.5.0 | |
* | |
* @param array $allowed_html Allowed HTML. | |
* @return array (Maybe) modified allowed HTML. | |
*/ | |
public function filter_wp_kses_allowed_data_attributes($allowed_html) | |
{ | |
} | |
/** | |
* Keep track of the number of times that dynamic_sidebar() was called for a given sidebar index. | |
* | |
* This helps facilitate the uncommon scenario where a single sidebar is rendered multiple times on a template. | |
* | |
* @since 4.5.0 | |
* @var array | |
*/ | |
protected $sidebar_instance_count = array(); | |
/** | |
* The current request's sidebar_instance_number context. | |
* | |
* @since 4.5.0 | |
* @var int | |
*/ | |
protected $context_sidebar_instance_number; | |
/** | |
* Current sidebar ID being rendered. | |
* | |
* @since 4.5.0 | |
* @var array | |
*/ | |
protected $current_dynamic_sidebar_id_stack = array(); | |
/** | |
* Begins keeping track of the current sidebar being rendered. | |
* | |
* Insert marker before widgets are rendered in a dynamic sidebar. | |
* | |
* @since 4.5.0 | |
* | |
* @param int|string $index Index, name, or ID of the dynamic sidebar. | |
*/ | |
public function start_dynamic_sidebar($index) | |
{ | |
} | |
/** | |
* Finishes keeping track of the current sidebar being rendered. | |
* | |
* Inserts a marker after widgets are rendered in a dynamic sidebar. | |
* | |
* @since 4.5.0 | |
* | |
* @param int|string $index Index, name, or ID of the dynamic sidebar. | |
*/ | |
public function end_dynamic_sidebar($index) | |
{ | |
} | |
/** | |
* Current sidebar being rendered. | |
* | |
* @since 4.5.0 | |
* @var string | |
*/ | |
protected $rendering_widget_id; | |
/** | |
* Current widget being rendered. | |
* | |
* @since 4.5.0 | |
* @var string | |
*/ | |
protected $rendering_sidebar_id; | |
/** | |
* Filters sidebars_widgets to ensure the currently-rendered widget is the only widget in the current sidebar. | |
* | |
* @since 4.5.0 | |
* | |
* @param array $sidebars_widgets Sidebars widgets. | |
* @return array Filtered sidebars widgets. | |
*/ | |
public function filter_sidebars_widgets_for_rendering_widget($sidebars_widgets) | |
{ | |
} | |
/** | |
* Renders a specific widget using the supplied sidebar arguments. | |
* | |
* @since 4.5.0 | |
* | |
* @see dynamic_sidebar() | |
* | |
* @param WP_Customize_Partial $partial Partial. | |
* @param array $context { | |
* Sidebar args supplied as container context. | |
* | |
* @type string $sidebar_id ID for sidebar for widget to render into. | |
* @type int $sidebar_instance_number Disambiguating instance number. | |
* } | |
* @return string|false | |
*/ | |
public function render_widget_partial($partial, $context) | |
{ | |
} | |
// | |
// Option Update Capturing | |
// | |
/** | |
* List of captured widget option updates. | |
* | |
* @since 3.9.0 | |
* @var array $_captured_options Values updated while option capture is happening. | |
*/ | |
protected $_captured_options = array(); | |
/** | |
* Whether option capture is currently happening. | |
* | |
* @since 3.9.0 | |
* @var bool $_is_current Whether option capture is currently happening or not. | |
*/ | |
protected $_is_capturing_option_updates = \false; | |
/** | |
* Determines whether the captured option update should be ignored. | |
* | |
* @since 3.9.0 | |
* | |
* @param string $option_name Option name. | |
* @return bool Whether the option capture is ignored. | |
*/ | |
protected function is_option_capture_ignored($option_name) | |
{ | |
} | |
/** | |
* Retrieves captured widget option updates. | |
* | |
* @since 3.9.0 | |
* | |
* @return array Array of captured options. | |
*/ | |
protected function get_captured_options() | |
{ | |
} | |
/** | |
* Retrieves the option that was captured from being saved. | |
* | |
* @since 4.2.0 | |
* | |
* @param string $option_name Option name. | |
* @param mixed $default Optional. Default value to return if the option does not exist. Default false. | |
* @return mixed Value set for the option. | |
*/ | |
protected function get_captured_option($option_name, $default = \false) | |
{ | |
} | |
/** | |
* Retrieves the number of captured widget option updates. | |
* | |
* @since 3.9.0 | |
* | |
* @return int Number of updated options. | |
*/ | |
protected function count_captured_options() | |
{ | |
} | |
/** | |
* Begins keeping track of changes to widget options, caching new values. | |
* | |
* @since 3.9.0 | |
*/ | |
protected function start_capturing_option_updates() | |
{ | |
} | |
/** | |
* Pre-filters captured option values before updating. | |
* | |
* @since 3.9.0 | |
* | |
* @param mixed $new_value The new option value. | |
* @param string $option_name Name of the option. | |
* @param mixed $old_value The old option value. | |
* @return mixed Filtered option value. | |
*/ | |
public function capture_filter_pre_update_option($new_value, $option_name, $old_value) | |
{ | |
} | |
/** | |
* Pre-filters captured option values before retrieving. | |
* | |
* @since 3.9.0 | |
* | |
* @param mixed $value Value to return instead of the option value. | |
* @return mixed Filtered option value. | |
*/ | |
public function capture_filter_pre_get_option($value) | |
{ | |
} | |
/** | |
* Undoes any changes to the options since options capture began. | |
* | |
* @since 3.9.0 | |
*/ | |
protected function stop_capturing_option_updates() | |
{ | |
} | |
/** | |
* {@internal Missing Summary} | |
* | |
* See the {@see 'customize_dynamic_setting_args'} filter. | |
* | |
* @since 3.9.0 | |
* @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. | |
*/ | |
public function setup_widget_addition_previews() | |
{ | |
} | |
/** | |
* {@internal Missing Summary} | |
* | |
* See the {@see 'customize_dynamic_setting_args'} filter. | |
* | |
* @since 3.9.0 | |
* @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. | |
*/ | |
public function prepreview_added_sidebars_widgets() | |
{ | |
} | |
/** | |
* {@internal Missing Summary} | |
* | |
* See the {@see 'customize_dynamic_setting_args'} filter. | |
* | |
* @since 3.9.0 | |
* @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. | |
*/ | |
public function prepreview_added_widget_instance() | |
{ | |
} | |
/** | |
* {@internal Missing Summary} | |
* | |
* See the {@see 'customize_dynamic_setting_args'} filter. | |
* | |
* @since 3.9.0 | |
* @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. | |
*/ | |
public function remove_prepreview_filters() | |
{ | |
} | |
} | |
/** | |
* Dependencies API: _WP_Dependency class | |
* | |
* @since 4.7.0 | |
* | |
* @package WordPress | |
* @subpackage Dependencies | |
*/ | |
/** | |
* Class _WP_Dependency | |
* | |
* Helper class to register a handle and associated data. | |
* | |
* @access private | |
* @since 2.6.0 | |
*/ | |
class _WP_Dependency | |
{ | |
/** | |
* The handle name. | |
* | |
* @since 2.6.0 | |
* @var null | |
*/ | |
public $handle; | |
/** | |
* The handle source. | |
* | |
* @since 2.6.0 | |
* @var null | |
*/ | |
public $src; | |
/** | |
* An array of handle dependencies. | |
* | |
* @since 2.6.0 | |
* @var array | |
*/ | |
public $deps = array(); | |
/** | |
* The handle version. | |
* | |
* Used for cache-busting. | |
* | |
* @since 2.6.0 | |
* @var bool|string | |
*/ | |
public $ver = \false; | |
/** | |
* Additional arguments for the handle. | |
* | |
* @since 2.6.0 | |
* @var null | |
*/ | |
public $args = \null; | |
// Custom property, such as $in_footer or $media. | |
/** | |
* Extra data to supply to the handle. | |
* | |
* @since 2.6.0 | |
* @var array | |
*/ | |
public $extra = array(); | |
/** | |
* Translation textdomain set for this dependency. | |
* | |
* @since 5.0.0 | |
* @var string | |
*/ | |
public $textdomain; | |
/** | |
* Translation path set for this dependency. | |
* | |
* @since 5.0.0 | |
* @var string | |
*/ | |
public $translations_path; | |
/** | |
* Setup dependencies. | |
* | |
* @since 2.6.0 | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Add handle data. | |
* | |
* @since 2.6.0 | |
* | |
* @param string $name The data key to add. | |
* @param mixed $data The data value to add. | |
* @return bool False if not scalar, true otherwise. | |
*/ | |
public function add_data($name, $data) | |
{ | |
} | |
/** | |
* Sets the translation domain for this dependency. | |
* | |
* @since 5.0.0 | |
* | |
* @param string $domain The translation textdomain. | |
* @param string $path Optional. The full file path to the directory containing translation files. | |
* | |
* @return bool False if $domain is not a string, true otherwise. | |
*/ | |
public function set_translations($domain, $path = \null) | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment