<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,10 +4,11 @@ class Interactive extends InteractiveAppModel {
 	var $objectCache = true;
 	var $objectPath = null;
 	var $raw = false;
-	
+	var $type = null;
+
 	function process($cmds) {
 		$cmds = explode(&quot;;&quot;, $cmds);
-		
+
 		$results = array();
 		foreach($cmds as $cmd) {
 			$this-&gt;raw = false;
@@ -23,10 +24,10 @@ class Interactive extends InteractiveAppModel {
 			$func = sprintf('__%sCall', $type);
 			$output = $this-&gt; {$func}($cmd);
 			$results[] = array('cmd' =&gt; $cmd,
-												 'raw' =&gt; $this-&gt;raw,
-												 'output' =&gt; $output);
+			                   'raw' =&gt; $this-&gt;raw,
+			                   'output' =&gt; $output);
 		}
-		
+
 		return $results;
 	}
 
@@ -64,9 +65,15 @@ class Interactive extends InteractiveAppModel {
 	}
 
 	function __getClass($className) {
-		$className = $this-&gt;__fixClassName($className);
-		$types = array('model', 'controller', 'helper', 'component');
+		$this-&gt;type = null;
 		$classType = false;
+		$className = $this-&gt;__fixClassName($className);
+
+		if ($this-&gt;type) {
+			$types = array($this-&gt;type);
+		} else {
+			$types = array('model', 'helper');
+		}
 
 		foreach($types as $type) {
 			$objects = Configure::listObjects($type, $this-&gt;objectPath, $this-&gt;objectCache);
@@ -108,6 +115,14 @@ class Interactive extends InteractiveAppModel {
 	}
 
 	function __fixClassName($className) {
+		if (stripos($className, 'component') !== false) {
+			$this-&gt;type = 'component';
+		}
+
+		if (stripos($className, 'controller') !== false) {
+			$this-&gt;type = 'controller';
+		}
+
 		return ucfirst(preg_replace('/(\$|controller|component)/i', '', $className));
 	}
 </diff>
      <filename>models/interactive.php</filename>
    </modified>
    <modified>
      <diff>@@ -122,7 +122,7 @@ class InteractiveTestCase extends CakeTestCase {
 	function testClassCallComponent() {
 		Configure::write('debug', 0);
 		Configure::write('Security.salt', 'fc4a7a2d16ed61344ff95c87674620c4ece9cea1');
-		$result = $this-&gt;Interactive-&gt;__classCall('Auth::password(&quot;test&quot;)');
+		$result = $this-&gt;Interactive-&gt;__classCall('AuthComponent::password(&quot;test&quot;)');
 		$this-&gt;assertEqual('cfc21a50c1f69eabdb6687d7f2b33891865f69bb', $result);
 		Configure::write('debug', 2);
 	}</diff>
      <filename>tests/cases/models/interactive.test.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>de04f4ae0cdd04113a2761082e15e77c0833989c</id>
    </parent>
  </parents>
  <author>
    <name>Matt Curry</name>
    <email>matt@pseudocoder.com</email>
  </author>
  <url>http://github.com/mcurry/interactive/commit/88b85116318c4942664becadff68693fbc017743</url>
  <id>88b85116318c4942664becadff68693fbc017743</id>
  <committed-date>2009-06-08T20:53:10-07:00</committed-date>
  <authored-date>2009-06-08T20:53:10-07:00</authored-date>
  <message>better handling for name conflicts</message>
  <tree>207856fcab884eff987f7fd4f29b2e81414b8d2a</tree>
  <committer>
    <name>Matt Curry</name>
    <email>matt@pseudocoder.com</email>
  </committer>
</commit>
