CoreFiles by mySites.guru
TemplatedHrefTrait.php23 lines, 493 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
a7cc1c6e1e4784e703b6ebc9b9a286d4
sha1
193ffddf2651b6c187c1ecd3bc184488b5c055cc
sha256
76d131f6111014a239224c44225db24df97deb51d2649b5f86051cb2873633ed
<?php


namespace Fig\Link;

trait TemplatedHrefTrait
{
    /**
     * Determines if an href is a templated link or not.
     *
     * @see https://tools.ietf.org/html/rfc6570
     *
     * @param string $href
     *   The href value to check.
     *
     * @return bool
     *   True if the specified href is a templated path, False otherwise.
     */
    private function hrefIsTemplated(string $href): bool
    {
        return str_contains($href, '{') || str_contains($href, '}');
    }
}

The same content is in 155 releases, Joomla 5.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.