Add GLOB_BRACE option for better pattern searches. #798

merged 1 commit into from Jan 24, 2013

2 participants

Union of RAD member

I'm basically trying to do something like this:

    'rules' => array(
        '{:library}\test\rules\{:class}\{:name}' => array('libraries' => 'li3_quality'),
    'ruleSets' => array(
$ruleSets = Libraries::locate('ruleSets', null, array(
    'recursive' => false,
    'suffix' => '.json',
    'preFilter' => '/(r|defaultR)ules\.json/',
    'format' => false,

This sets priority and better matching.

Removing the *{rules,defaultRules} and replacing it with {:name} would cause them to be out of order, at which point I'd need to sort them since I want to only match the first one and use defaultRules as a last resort.

If I remove the preFilter rules.json wont match since the default regex requires an uppercase letter to match.

Union of RAD member

Well, strictly speaking, locate() is for classes, but hey, if it works, it works.

@nateabele nateabele merged commit 6a5691c into UnionOfRAD:dev Jan 24, 2013
@blainesch blainesch deleted the unknown repository branch Jan 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment