Returns a SEO compatible url based on the specified string. Be sure to check the LC_CTYPE locale setting if
getting any question marks in result. Run locale -a on server to see full list of supported locales.

@param string $name
@return string
489337
public static function formatSeoUrl($name)
    {
        $url = mb_strtolower($name);
        $url = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $url);
        $url = preg_replace("/[^a-z0-9_\s-]/", "", $url);
        $url = preg_replace("/[\s-]+/", " ", $url);
        $url = trim($url);
        return preg_replace("/[\s_]/", "-", $url);
    }
1015889
public static function rewriteToURLFriendly($name){

		// Ensure that lower case string preserves UTF-8 encoding

		$name = mb_strtolower(trim($name), "UTF-8");

		// Approximate all non-ASCII characters with their ASCII counterpart

		$name = @iconv('UTF-8', 'ASCII//TRANSLIT', $name);

		/*
		 * If text starts and ends with a brace, remove these first. Several
		 * studies have this for some reason and it screws up the page name.
		 */

		if(!empty($name)){

			if($name[0] === '(' && $name[strlen($name) - 1] === ')') {

				$name = substr($name, 1, strlen($name) - 2);
			}
		}

		// Remove text in braces

		$name = preg_replace('/\(.*?\)/', '', $name);

		// Remove all remaining invalid characters

		$name = preg_replace('/[^a-z0-9 \-]+/', '', $name);
		$name = preg_replace('/[ \-]+/', '-', trim($name));

		if(empty($name)) $name = 'blank';

		return $name;
	}
1163380
public static function getResource(string $name)
    {
        $resource = static::getInstance($name)->getResource();

        if(RequestContext::exsits() && $resource)
        {
            static::pushResourceToRequestContext($resource);
        }

        return $resource;
    }
562287
public function getLinkForSearch($name)
    {
        return $this->router->generate('fill_search', [
            'plugin' => $this->getName(),
            $this->getForm()->getName() => ['name' => $name],
        ]);
    }
852500
public function getOriginalHeader($name)
    {
        return array_key_exists($name, $this->_request)? $this->_request[$name]: null;
    }
510360
protected function getViewPathFormatted($name)
    {
        $path = $this->getViewPath($name);

        if (strpos($path, 'admin.') === 0) {
            $path = substr($path, 6);
        }

        if (strpos($path, 'admins.') === 0) {
            $path = substr($path, 7);
        }

        if (strpos($path, 'website.') === 0) {
            $path = substr($path, 8);
        }

        if (strpos($path, 'websites.') === 0) {
            $path = substr($path, 9);
        }

        return $path;
    }
801723
protected function underscore($name)
    {
        if (isset(self::$underscoreCache[$name])) {
            return self::$underscoreCache[$name];
        }
        $result                       = strtolower(preg_replace('/(.)([A-Z])/', "$1_$2", $name));
        self::$underscoreCache[$name] = $result;

        return $result;
    }
951537
public function getLookup($name)
    {
        $name = strtolower($name);

        return (array_key_exists($name, $this->lookup)) ? $this->lookup[$name] : false;
    }
960694
public function getSource($name): string
    {
        return $this->innerLoader->getSourceContext($this->getRealName($name))->getCode();
    }
903235
public function get(string $name): string {
		$forms = $this->forms;
		foreach ($forms as $id => $item) {
			$val = $item->get();
			if (isset($val[$name]) && $val[$name]) {
				return $id;
			}
		}

		return false;
	}
561566
public function getFullName($name)
    {
        $prefix = $this->getPrefix();
        if (strlen($prefix) && false === strpos($name, $prefix)) {
            return $prefix . $name;
        }

        return $name;
    }
600435
public function supports($name)
    {
        $name = (string)$name;

        if (isset($this->supportedTemplates[$name])) {
            return $this->supportedTemplates[$name];
        }

        // Template URI must begin by "design:" or "file:" and have a .tpl suffix
        $this->supportedTemplates[$name] =
            (
                strpos($name, 'design:') === 0 ||
                strpos($name, 'file:') === 0
            ) &&
            (substr($name, -\strlen(self::SUPPORTED_SUFFIX)) === self::SUPPORTED_SUFFIX);

        return $this->supportedTemplates[$name];
    }
1373109
public function export(string $name)
    {
        $url = self::$base_url.'/'.$name.'/get';

        return self::$curl->get($url);
    }
1188452
public static function getHostByName($name) {
        if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name));
        if ($name == '')       throw new InvalidArgumentException('Invalid argument $name: "'.$name.'"');

        return \gethostbyname($name);
    }
810137
public static function getIsoCodeByName($name)
    {
        $name = strtoupper($name);
        return (isset(self::$currencies[$name])) ? self::$currencies[$name] : self::$currencies['REAL'];
    }
1000900
public function getAttribute($name): string
    {
        if ($this->attributes->length === 0) { // Performance optimization
            return '';
        }
        $value = parent::getAttribute($name);
        return $value !== '' ? (strstr($value, 'html5-dom-document-internal-entity') !== false ? $this->updateResult($value) : $value) : '';
    }
1155589
private function parseReferences($name): string
    {
        if (preg_match_all('/\$\{(.*[a-z\.0-9])\}/si', $name, $results, PREG_SET_ORDER)) {
            foreach ($results as $match) {
                $replace = $match[0];
                $key = $match[1];

                // Handle using relative placement like get('db.${.default}.host');
                if (strpos($key, '.') === 0) {
                    // using relative placement
                    $key = substr($name, 0, strpos($name, $replace) - 1) . $key;
                }

                // get the value
                $value = $this->get($key);
                if ($value === null || $value === '' || $value === false) {
                    throw new InvalidArgumentException(
                        $key . ' replacement for ' . $name . ' must not be null or empty'
                    );
                }

                $name = str_replace($replace, $value, $name);
            }
        }

        return $name;
    }