hshn/class-matcher

v0.2.0 2014-08-04 16:36 UTC

This package is not auto-updated.

Last update: 2021-10-25 12:44:23 UTC


README

Build Status

Usage

<?php

use Hshn\ClassMatcher\ClassMatcher;

$builder = ClassMatcher::createBuilder();

$matcher = $builder->logicalOr([
    $builder->equalsTo('Foo'),
    $builder->implemented('FooInterface'),
    $builder->extended('Foo'),
    $builder->logicalAnd([
        $builder->anything()
    ]),
]);

if ($matcher->matches('FooExtended')) {

} else {

}