Kahlan\Dir\Dir::_matchType PHP Method

_matchType() protected method

Checks if a file passes match the allowed type.
protected _matchType ( ) : boolean
return boolean Returns `true` if match the allowed type, `false` otherwise.
    protected function _matchType()
    {
        if (!$this->_types) {
            return true;
        }
        $file = $this->current();
        foreach ($this->_types as $type) {
            $method = 'is' . ucfirst($type);
            if ($file->{$method}()) {
                return true;
            }
        }
        return false;
    }