uawdijnntqw1x1x1
IP : 216.73.217.142
Hostname : localhost.localdomain
Kernel : Linux localhost.localdomain 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
OS : Linux
PATH:
/
var
/
www
/
consult-e-syn
/
public_html
/
643de
/
..
/
libraries
/
regularlabs
/
src
/
Alias.php
/
/
<?php /** * @package Regular Labs Library * @version 23.9.3039 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ namespace RegularLabs\Library; defined('_JEXEC') or die; use Joomla\CMS\Application\ApplicationHelper as JApplicationHelper; use Joomla\CMS\Factory as JFactory; /** * Class Alias * * @package RegularLabs\Library */ class Alias { /** * Creates an alias from a string * * @param string $string * * @return string */ public static function get($string = '', $unicode = false) { if (empty($string)) { return ''; } $string = StringHelper::removeHtml($string); if ($unicode || JFactory::getConfig()->get('unicodeslugs') == 1) { return self::stringURLUnicodeSlug($string); } // Remove < > html entities $string = str_replace(['<', '>'], '', $string); // Convert html entities $string = StringHelper::html_entity_decoder($string); return JApplicationHelper::stringURLSafe($string); } /** * Creates a unicode alias from a string * Based on stringURLUnicodeSlug method from the unicode slug plugin by infograf768 * * @param string $string * * @return string */ private static function stringURLUnicodeSlug($string = '') { if (empty($string)) { return ''; } // Remove < > html entities $string = str_replace(['<', '>'], '', $string); // Convert html entities $string = StringHelper::html_entity_decoder($string); // Convert to lowercase $string = StringHelper::strtolower($string); // remove html tags $string = RegEx::replace('</?[a-z][^>]*>', '', $string); // remove comments tags $string = RegEx::replace('<\!--.*?-->', '', $string); // Replace weird whitespace characters like (Â) with spaces //$string = str_replace(array(chr(160), chr(194)), ' ', $string); $string = str_replace("\xC2\xA0", ' ', $string); $string = str_replace("\xE2\x80\xA8", ' ', $string); // ascii only // Replace double byte whitespaces by single byte (East Asian languages) $string = str_replace("\xE3\x80\x80", ' ', $string); // Remove any '-' from the string as they will be used as concatenator. // Would be great to let the spaces in but only Firefox is friendly with this $string = str_replace('-', ' ', $string); // Replace forbidden characters by whitespaces $string = RegEx::replace('[' . RegEx::quote(',:#$*"@+=;&.%()[]{}/\'\\|') . ']', "\x20", $string); // Delete all characters that should not take up any space, like: ? $string = RegEx::replace('[' . RegEx::quote('?!¿¡') . ']', '', $string); // Trim white spaces at beginning and end of alias and make lowercase $string = trim($string); // Remove any duplicate whitespace and replace whitespaces by hyphens $string = RegEx::replace('\x20+', '-', $string); // Remove leading and trailing hyphens $string = trim($string, '-'); return $string; } }
/var/www/consult-e-syn/public_html/643de/../libraries/regularlabs/src/Alias.php