hshn/class-matcher

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

This package is not auto-updated.

Last update: 2024-12-17 04:06:35 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 {

}