PHP 클래스 AMP_Image_Dimension_Extractor, amp-wp

파일 보기 프로젝트 열기: Automattic/amp-wp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$callbacks_registered

공개 메소드들

메소드 설명
extract ( $urls )
extract_by_downloading_images ( array $dimensions, string $mode = 'concurrent' ) : array Extract dimensions from downloaded images (or transient/cached dimensions from downloaded images)
get_default_user_agent ( ) : string Get default user agent
normalize_url ( $url )

비공개 메소드들

메소드 설명
determine_which_images_to_fetch ( array &$dimensions, array &$urls_to_fetch ) Determine which images to fetch by checking for dimensions in transient/cache.
fetch_images ( array $urls_to_fetch, array &$images, string $mode ) Fetch dimensions of remote images
fetch_images_via_fast_image ( array $urls_to_fetch, array &$images ) Fetch images via FastImage library
fetch_images_via_faster_image ( array $urls_to_fetch, array &$images ) Fetch images via FasterImage library
process_fetched_images ( array $urls_to_fetch, array $images, array &$dimensions, integer $transient_expiration ) Determine success or failure of remote fetch, integrate fetched dimensions into url to dimension mapping, cache fetched dimensions via transient and release/delete semaphore transient
register_callbacks ( )

메소드 상세

extract() 공개 정적인 메소드

public static extract ( $urls )

extract_by_downloading_images() 공개 정적인 메소드

Extract dimensions from downloaded images (or transient/cached dimensions from downloaded images)
public static extract_by_downloading_images ( array $dimensions, string $mode = 'concurrent' ) : array
$dimensions array Image urls mapped to dimensions.
$mode string Whether image dimensions should be extracted concurrently or synchronously.
리턴 array Dimensions mapped to image urls, or false if they could not be retrieved

get_default_user_agent() 공개 정적인 메소드

Get default user agent
public static get_default_user_agent ( ) : string
리턴 string

normalize_url() 공개 정적인 메소드

public static normalize_url ( $url )

프로퍼티 상세

$callbacks_registered 정적으로 공개적으로 프로퍼티

static public $callbacks_registered