hshn/class-matcher

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

This package is not auto-updated.

Last update: 2024-04-09 01:00:39 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 {

}