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
 function test__mix_of_valid_and_invalid_image_file_synchronous()
 {
     $sources = array(IMG_350 => false, AMP_IMG_DIMENSION_TEST_INVALID_FILE => false, IMG_1024 => false);
     $expected = array(IMG_350 => array('width' => 350, 'height' => 150), AMP_IMG_DIMENSION_TEST_INVALID_FILE => false, IMG_1024 => array('width' => 1024, 'height' => 768));
     $dimensions = AMP_Image_Dimension_Extractor::extract_by_downloading_images($sources, 'synchronous');
     $this->assertEquals($expected, $dimensions);
 }