Returns true if this class supports the given resource.
mixed $resource A resource:
string $type The resource type:
Boolean true if this class supports the given resource, false otherwise
public function supports($resource, $type = null) {
return $resource instanceof \Closure;
}