| @@ 504-509 (lines=6) @@ | ||
| 501 | $generateMethods = array(); |
|
| 502 | $methodNames = Image::create()->allMethodNames($custom); |
|
| 503 | ||
| 504 | foreach ($methodNames as $methodName) { |
|
| 505 | if (substr($methodName, 0, 8) == 'generate' && $methodName != 'generateformattedimage') { |
|
| 506 | $format = substr($methodName, 8); |
|
| 507 | $generateMethods[] = $format; |
|
| 508 | } |
|
| 509 | } |
|
| 510 | ||
| 511 | return $generateMethods; |
|
| 512 | } |
|
| @@ 876-881 (lines=6) @@ | ||
| 873 | private function getFilenamePatterns($filename) { |
|
| 874 | $methodNames = $this->allMethodNames(true); |
|
| 875 | $generateFuncs = array(); |
|
| 876 | foreach($methodNames as $methodName) { |
|
| 877 | if(substr($methodName, 0, 8) == 'generate') { |
|
| 878 | $format = substr($methodName, 8); |
|
| 879 | $generateFuncs[] = preg_quote($format); |
|
| 880 | } |
|
| 881 | } |
|
| 882 | // All generate functions may appear any number of times in the image cache name. |
|
| 883 | $generateFuncs = implode('|', $generateFuncs); |
|
| 884 | $base64url_match = "[a-zA-Z0-9_~]*={0,2}"; |
|