Back to WebAssetItem class

Method isPathExternal

protected bool
isPathExternal
(string $path)
Check if the Path is External
Parameters
  • string $path Path to test
Returns
  • bool
Since
  • 4.0.0
Class: WebAssetItem
Project: Joomla

Method isPathExternal - Source code

/**
 * Check if the Path is External
 *
 * @param   string  $path  Path to test
 *
 * @return  boolean
 *
 * @since   4.0.0
 */
protected function isPathExternal(string $path) : bool
{
    return strpos($path, 'http://') === 0 || strpos($path, 'https://') === 0 || strpos($path, '//') === 0;
}