Skip to content
Browse files

simplify the CI class

  • Loading branch information...
1 parent c263925 commit 77182248dbb846a4acab1f744f207d5996b296d1 @rich rich committed Jan 23, 2010
Showing with 3 additions and 5 deletions.
  1. +3 −5 Services/Hoptoad/CodeIgniter.php
View
8 Services/Hoptoad/CodeIgniter.php
@@ -2,18 +2,16 @@
class Services_Hoptoad_CodeIgniter extends Services_Hoptoad {
var $ci;
- function ci() {
- if (isset($this->ci)) return $this->ci;
+ function __construct() {
$this->ci =& get_instance();
- return $this->ci;
}
function action() {
- return $this->ci()->router->method;
+ return $this->ci->router->method;
}
function component() {
- return $this->ci()->router->class;
+ return $this->ci->router->class;
}
function project_path() {

0 comments on commit 7718224

Please sign in to comment.
Something went wrong with that request. Please try again.