MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/artinside/public_html/lhh/vendor/league/plates/src/Template/match.php
<?php

namespace League\Plates\Template;

use League\Plates\Template;

function matchPathExtension(callable $match) {
    return matchAttribute('path', function($path) use ($match) {
        return $match(pathinfo($path, PATHINFO_EXTENSION));
    });
}

function matchName($name) {
    return function(Template $template) use ($name) {
        return $template->get('normalized_name', $template->name) == $name;
    };
}

function matchExtensions(array $extensions) {
    return matchPathExtension(function($ext) use ($extensions) {
        return in_array($ext, $extensions);
    });
}

function matchAttribute($attribute, callable $match) {
    return function(Template $template) use ($attribute, $match) {
        return $match($template->get($attribute));
    };
}

function matchStub($res) {
    return function(Template $template) use ($res) {
        return $res;
    };
}

function matchAny(array $matches) {
    return function(Template $template) use ($matches) {
        foreach ($matches as $match) {
            if ($match($template)) {
                return true;
            }
        }

        return false;
    };
}

function matchAll(array $matches) {
    return function(Template $template) use ($matches) {
        foreach ($matches as $match) {
            if (!$match($template)) {
                return false;
            }
        }

        return true;
    };
}