Skip to content

Commit

Permalink
simplify the CI class
Browse files Browse the repository at this point in the history
  • Loading branch information
rich committed Jan 24, 2010
1 parent c263925 commit 7718224
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Services/Hoptoad/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 7718224

Please sign in to comment.