Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Making OAuth classes extensible, step three, renaming classes

  • Loading branch information...
commit 5494c74449554eb416d36c5f38bc5e89414af906 1 parent c0bcb79
@shadowhand shadowhand authored
View
2  classes/kohana/oauth/provider.php
@@ -22,7 +22,7 @@
*/
public static function factory($name, array $options = NULL)
{
- $class = __CLASS__.'_'.$name;
+ $class = 'OAuth_Factory_'.$name;
return new $class($options);
}
View
2  classes/kohana/oauth/request.php
@@ -23,7 +23,7 @@ class Kohana_OAuth_Request {
*/
public static function factory($type, $method, $url = NULL, array $params = NULL)
{
- $class = __CLASS__.'_'.$type;
+ $class = 'OAuth_Request_'.$type;
return new $class($method, $url, $params);
}
View
2  classes/kohana/oauth/response.php
@@ -12,7 +12,7 @@ class Kohana_OAuth_Response {
public static function factory($body)
{
- return new self($body);
+ return new OAuth_Response($body);
}
/**
View
2  classes/kohana/oauth/signature.php
@@ -22,7 +22,7 @@
public static function factory($name, array $options = NULL)
{
// Create the class name as a base of this class
- $class = __CLASS__.'_'.str_replace('-', '_', $name);
+ $class = 'OAuth_Signature_'.str_replace('-', '_', $name);
return new $class($options);
}
View
2  classes/kohana/oauth/token.php
@@ -21,7 +21,7 @@
*/
public static function factory($name, array $options = NULL)
{
- $class = __CLASS__.'_'.$name;
+ $class = 'OAuth_Token_'.$name;
return new $class($options);
}
Please sign in to comment.
Something went wrong with that request. Please try again.