[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Site 5 * @subpackage com_banners 6 * 7 * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 namespace Joomla\Component\Banners\Site\Helper; 12 13 // phpcs:disable PSR1.Files.SideEffects 14 \defined('_JEXEC') or die; 15 // phpcs:enable PSR1.Files.SideEffects 16 17 /** 18 * Banner Helper Class 19 * 20 * @since 1.6 21 */ 22 abstract class BannerHelper 23 { 24 /** 25 * Checks if a URL is an image 26 * 27 * @param string $url The URL path to the potential image 28 * 29 * @return boolean True if an image of type bmp, gif, jp(e)g, png or webp, false otherwise 30 * 31 * @since 1.6 32 */ 33 public static function isImage($url) 34 { 35 $urlCheck = explode('?', $url); 36 37 if (preg_match('#\.(?:bmp|gif|jpe?g|png|webp)$#i', $urlCheck[0])) { 38 return true; 39 } 40 41 return false; 42 } 43 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |