/** * This must support the concept of a hypothetical hostname, not the actual hostname * * @param PostmanTransport $transport * @param unknown $hostname * @return PostmanGoogleOAuthScribe|PostmanMicrosoftOAuthScribe|PostmanYahooOAuthScribe|PostmanNonOAuthScribe */ static function createScribe($hostname, PostmanTransport $transport = null) { if ($transport->isServiceProviderGoogle($hostname)) { return new PostmanGoogleOAuthScribe(); } else { if ($transport->isServiceProviderMicrosoft($hostname)) { return new PostmanMicrosoftOAuthScribe(); } else { if ($transport->isServiceProviderYahoo($hostname)) { return new PostmanYahooOAuthScribe(); } else { return new PostmanNonOAuthScribe($hostname); } } } }