PHP Класс AS3CF_Filter, wp-amazon-s3-and-cloudfront

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$as3cf Amazon_S3_And_CloudFront
$query_cache array

Открытые методы

Метод Описание
__construct ( Amazon_S3_And_CloudFront $as3cf ) Constructor
filter_customizer_image ( string $value, boolean | string $old_value = false ) : string Filter customizer image.
filter_edd_download_files ( array $value ) : array Filter EDD download files.
filter_header_image_data ( stdClass $value, boolean | stdClass $old_value = false ) : stdClass Filter header image data.
filter_post ( string $content ) : string Filter post.
purge_cache_on_attachment_delete ( integer $post_id ) Purge attachment from cache on delete.
purge_from_cache ( string $url, boolean | integer $blog_id = false ) Purge URL from cache

Защищенные методы

Метод Описание
attachment_id_matches_src ( integer $attachment_id, string $url ) : boolean Does attachment ID match src?
find_urls_and_replace ( string $value, array $cache, array &$to_cache ) : string Find URLs and replace.
get_attachment_id_from_url ( string $url ) : boolean | integer Get attachment ID from URL.
get_attachment_ids_from_urls ( array $urls ) : array Get attachment IDs from URLs.
get_base_url ( integer $attachment_id ) : string | false Get base URL.
get_option_cache ( ) : array Get option cache.
get_post_cache ( ) : array Get post cache
get_size_string_from_url ( integer $attachment_id, string $url ) : null | string Get size string from URL.
get_url ( integer $attachment_id, null | string $size = null ) : boolean | string Get URL.
get_urls_from_content ( string $content, array $cache, array &$to_cache ) : array Get URLs from content.
get_urls_from_img_src ( string $content, array &$to_cache ) : array Get URLs from img src.
is_failure ( mixed $value ) : boolean Is failure?
maybe_update_option_cache ( array $to_cache ) Maybe update option cache.
maybe_update_post_cache ( array $to_cache ) Maybe update post cache
normalize_find_value ( string $url ) : string Normalize find value.
normalize_replace_value ( string $url ) : string Normalize replace value.
post_process_content ( string $content ) : string Post process content.
pre_replace_content ( string $content ) : string Pre replace content.
process_content ( string $content, array $cache, array &$to_cache ) : mixed Process content.
push_to_url_pairs ( array &$url_pairs, integer $attachment_id, string $find, array &$to_cache ) Push to URL pairs.
remove_aws_query_strings ( string $content, string $base_url = '' ) : string Remove AWS query strings.
replace_urls ( string $content, array $url_pairs ) : string Replace URLs.
should_filter_content ( ) : boolean Should filter content.
url_cache_failure ( string $url, array &$to_cache ) URL cache failure.
url_needs_replacing ( string $url ) : boolean Does URL need replacing?

Описание методов

__construct() публичный Метод

Constructor
public __construct ( Amazon_S3_And_CloudFront $as3cf )
$as3cf Amazon_S3_And_CloudFront

attachment_id_matches_src() защищенный Метод

Does attachment ID match src?
protected attachment_id_matches_src ( integer $attachment_id, string $url ) : boolean
$attachment_id integer
$url string
Результат boolean

filter_customizer_image() публичный Метод

Filter customizer image.
public filter_customizer_image ( string $value, boolean | string $old_value = false ) : string
$value string
$old_value boolean | string
Результат string

filter_edd_download_files() публичный Метод

Filter EDD download files.
public filter_edd_download_files ( array $value ) : array
$value array
Результат array

filter_header_image_data() публичный Метод

Filter header image data.
public filter_header_image_data ( stdClass $value, boolean | stdClass $old_value = false ) : stdClass
$value stdClass
$old_value boolean | stdClass
Результат stdClass

filter_post() публичный Метод

Filter post.
public filter_post ( string $content ) : string
$content string
Результат string

find_urls_and_replace() защищенный Метод

Find URLs and replace.
protected find_urls_and_replace ( string $value, array $cache, array &$to_cache ) : string
$value string
$cache array
$to_cache array
Результат string

get_attachment_id_from_url() абстрактный защищенный Метод

Get attachment ID from URL.
abstract protected get_attachment_id_from_url ( string $url ) : boolean | integer
$url string
Результат boolean | integer

get_attachment_ids_from_urls() абстрактный защищенный Метод

Get attachment IDs from URLs.
abstract protected get_attachment_ids_from_urls ( array $urls ) : array
$urls array
Результат array url => attachment ID (or false)

get_base_url() абстрактный защищенный Метод

Get base URL.
abstract protected get_base_url ( integer $attachment_id ) : string | false
$attachment_id integer
Результат string | false

get_option_cache() защищенный Метод

Get option cache.
protected get_option_cache ( ) : array
Результат array

get_post_cache() защищенный Метод

Get post cache
protected get_post_cache ( ) : array
Результат array

get_size_string_from_url() защищенный Метод

Get size string from URL.
protected get_size_string_from_url ( integer $attachment_id, string $url ) : null | string
$attachment_id integer
$url string
Результат null | string

get_url() абстрактный защищенный Метод

Get URL.
abstract protected get_url ( integer $attachment_id, null | string $size = null ) : boolean | string
$attachment_id integer
$size null | string
Результат boolean | string

get_urls_from_content() защищенный Метод

Get URLs from content.
protected get_urls_from_content ( string $content, array $cache, array &$to_cache ) : array
$content string
$cache array
$to_cache array
Результат array

get_urls_from_img_src() защищенный Метод

Get URLs from img src.
protected get_urls_from_img_src ( string $content, array &$to_cache ) : array
$content string
$to_cache array
Результат array

is_failure() защищенный Метод

Is failure?
protected is_failure ( mixed $value ) : boolean
$value mixed
Результат boolean

maybe_update_option_cache() защищенный Метод

Maybe update option cache.
protected maybe_update_option_cache ( array $to_cache )
$to_cache array

maybe_update_post_cache() защищенный Метод

Maybe update post cache
protected maybe_update_post_cache ( array $to_cache )
$to_cache array

normalize_find_value() абстрактный защищенный Метод

Normalize find value.
abstract protected normalize_find_value ( string $url ) : string
$url string
Результат string

normalize_replace_value() абстрактный защищенный Метод

Normalize replace value.
abstract protected normalize_replace_value ( string $url ) : string
$url string
Результат string

post_process_content() абстрактный защищенный Метод

Post process content.
abstract protected post_process_content ( string $content ) : string
$content string
Результат string

pre_replace_content() абстрактный защищенный Метод

Pre replace content.
abstract protected pre_replace_content ( string $content ) : string
$content string
Результат string

process_content() защищенный Метод

Process content.
protected process_content ( string $content, array $cache, array &$to_cache ) : mixed
$content string
$cache array
$to_cache array
Результат mixed

purge_cache_on_attachment_delete() публичный Метод

Purge attachment from cache on delete.
public purge_cache_on_attachment_delete ( integer $post_id )
$post_id integer

purge_from_cache() публичный Метод

Purge URL from cache
public purge_from_cache ( string $url, boolean | integer $blog_id = false )
$url string
$blog_id boolean | integer

push_to_url_pairs() защищенный Метод

Push to URL pairs.
protected push_to_url_pairs ( array &$url_pairs, integer $attachment_id, string $find, array &$to_cache )
$url_pairs array
$attachment_id integer
$find string
$to_cache array

remove_aws_query_strings() защищенный Метод

Remove AWS query strings.
protected remove_aws_query_strings ( string $content, string $base_url = '' ) : string
$content string
$base_url string Optional base URL that must exist within URL for Amazon query strings to be removed.
Результат string

replace_urls() защищенный Метод

Replace URLs.
protected replace_urls ( string $content, array $url_pairs ) : string
$content string
$url_pairs array
Результат string

should_filter_content() защищенный Метод

Should filter content.
protected should_filter_content ( ) : boolean
Результат boolean

url_cache_failure() защищенный Метод

URL cache failure.
protected url_cache_failure ( string $url, array &$to_cache )
$url string
$to_cache array

url_needs_replacing() абстрактный защищенный Метод

Does URL need replacing?
abstract protected url_needs_replacing ( string $url ) : boolean
$url string
Результат boolean

Описание свойств

$as3cf защищенное свойство

protected Amazon_S3_And_CloudFront $as3cf
Результат Amazon_S3_And_CloudFront

$query_cache защищенное свойство

protected array $query_cache
Результат array