public static function extractCb($cb) { if ($cb instanceof CallbackWrapper) { return $cb->getCallback(); } return $cb; }