From 326def19652fc6946a53989f80dd88be940d0f8e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 2 Jun 2008 13:57:25 -0400 Subject: move service-matching callbacks to library darcs-hash:20080602175725-84dde-c8b3abaedcb8667130da2a080a09630d91969b5c.gz --- lib/omb.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/omb.php') diff --git a/lib/omb.php b/lib/omb.php index 91c1906e3..9efdaff62 100644 --- a/lib/omb.php +++ b/lib/omb.php @@ -61,6 +61,19 @@ function omb_hmac_sha1() { return $hmac_method; } +function omb_service_filter($type) { + return create_function('$s', + 'return omb_match_service($s, \''.$type.'\''); +} + +function omb_match_service($service, $type) { + if ($service && $service->matchTypes(array($type))) { + return TRUE; + } else { + return FALSE; + } +} + function omb_service_uri($service) { $uris = $service->getURIs(); if (!$uris) { -- cgit v1.2.3-54-g00ecf