<commit_before><?php
/**
 * Bu Dosya AnonymFramework'e ait bir dosyadır.
 *
 * @author vahitserifsaglam <<EMAIL>>
 * @see http://gemframework.com
 *
 */


namespace Anonym\Components\Route;

use Anonym\Components\Route\Matchers\MatcherInterface;

/**
 * Class RouteMatcher
 * @package Anonym\Components\Route
 */
class RouteMatcher implements RouteMatcherInterface, MatcherInterface
{

    /**
     * Parametre adlarını depolar
     *
     * @var array
     */
    protected $parameters = [];
    /**
     * Filtreleri toplar
     *
     * @var array
     */
    protected $filters;

    /**
     * Çağrılan url i getirir
     *
     * @var string
     */
    protected $requestedUrl;

    /**
     * Eşleştirilecek url i tutar
     *
     * @var string
     */
    private $matchUrl;


    /**
     * the instance of matcher
     *
     * @var MatcherInterface
     */
    private $matcher;
    /**
     * Eşleştirilecek ve eşleşmesi gerek url i ayarlar
     *
     * @param string $requestedUrl
     * @param string $matchUrl
     * @param array $filters
     */
    public function __construct($requestedUrl = '', $matchUrl = '', $filters = [])
    {
        $this->setMatchUrl($matchUrl);
        $this->setRequestedUrl($requestedUrl);
        $this->setFilters($filters);

    }

    /**
     * Eşleşmeyi yapar
     *
     * @param string $matchUrl<commit_msg>made some updates<commit_after><?php
/**
 * Bu Dosya AnonymFramework'e ait bir dosyadır.
 *
 * @author vahitserifsaglam <<EMAIL>>
 * @see http://gemframework.com
 *
 */


namespace Anonym\Components\Route;

use Anonym\Components\Route\Matchers\MatcherInterface;
use Anonym\Components\Route\Matchers\NewMatcher;

/**
 * Class RouteMatcher
 * @package Anonym\Components\Route
 */
class RouteMatcher implements RouteMatcherInterface, MatcherInterface
{

    /**
     * Parametre adlarını depolar
     *
     * @var array
     */
    protected $parameters = [];
    /**
     * Filtreleri toplar
     *
     * @var array
     */
    protected $filters;

    /**
     * Çağrılan url i getirir
     *
     * @var string
     */
    protected $requestedUrl;

    /**
     * Eşleştirilecek url i tutar
     *
     * @var string
     */
    private $matchUrl;


    /**
     * the instance of matcher
     *
     * @var MatcherInterface
     */
    private $matcher;
    /**
     * Eşleştirilecek ve eşleşmesi gerek url i ayarlar
     *
     * @param string $requestedUrl
     * @param string $matchUrl
     * @param array $filters
     */
    public function __construct($requestedUrl = '', $matchUrl = '', $filters = [])
    {
        $this->setMatchUrl($matchUrl);
        $this->setRequestedUrl($requestedUrl);
        $this->setFilters($filters);
         $this->setMatcher( new NewMatcher($requestedUrl, $matchUrl, $filters));

    }

    /**
     * Eşleşmeyi yapar
     *
     * @param string $matchUrl
{'fraction_non_alphanumeric': 0.12360335195530726, 'fraction_numerical': 0.0, 'mean_word_length': 2.248299319727891, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1304796', 'n_tokens_mistral': 963, 'n_tokens_neox': 938, 'n_words': 190}