<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to list all controllers</title>
	<atom:link href="http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Wed, 12 Jun 2013 01:23:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Richard@Home</title>
		<link>http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/comment-page-1/#comment-280672</link>
		<dc:creator>Richard@Home</dc:creator>
		<pubDate>Tue, 19 Jun 2012 09:06:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=230#comment-280672</guid>
		<description><![CDATA[If you need this to work in CakePHP 2, I&#039;ve blogged an alternative solution:

http://richardathome.com/blog/cakephp-2-get-all-public-methods-controller

Hope you find this useful :-)]]></description>
		<content:encoded><![CDATA[<p>If you need this to work in CakePHP 2, I&#8217;ve blogged an alternative solution:</p>
<p><a href="http://richardathome.com/blog/cakephp-2-get-all-public-methods-controller" rel="nofollow">http://richardathome.com/blog/cakephp-2-get-all-public-methods-controller</a></p>
<p>Hope you find this useful :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: List all controllers in Cakephp 2</title>
		<link>http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/comment-page-1/#comment-253079</link>
		<dc:creator>List all controllers in Cakephp 2</dc:creator>
		<pubDate>Wed, 14 Dec 2011 09:00:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=230#comment-253079</guid>
		<description><![CDATA[[...] I needed to list all the Controllers of an Cakephp 2 application. I searched the webz and found an old article that got me started. The original article with code is here: http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] I needed to list all the Controllers of an Cakephp 2 application. I searched the webz and found an old article that got me started. The original article with code is here: <a href="http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/" rel="nofollow">http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Finding all application Controllers in CakePHP (v1.3.x) &#124; Tech Info....</title>
		<link>http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/comment-page-1/#comment-181684</link>
		<dc:creator>Finding all application Controllers in CakePHP (v1.3.x) &#124; Tech Info....</dc:creator>
		<pubDate>Mon, 22 Nov 2010 16:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=230#comment-181684</guid>
		<description><![CDATA[[...] Other useful links (check version compatibility in these resources): Quick dessert: List all controllers of a CakePHP application Automatically load all controllers and actions into ACO tables for ACL with a CakePHP Task How to list all controllers [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Other useful links (check version compatibility in these resources): Quick dessert: List all controllers of a CakePHP application Automatically load all controllers and actions into ACO tables for ACL with a CakePHP Task How to list all controllers [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Finding all application Controllers in CakePHP (v1.3.x) - mysiteonline™</title>
		<link>http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/comment-page-1/#comment-175589</link>
		<dc:creator>Finding all application Controllers in CakePHP (v1.3.x) - mysiteonline™</dc:creator>
		<pubDate>Tue, 28 Sep 2010 21:46:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=230#comment-175589</guid>
		<description><![CDATA[[...] Automatically load all controllers and actions into ACO tables for ACL with a CakePHP Task How to list all controllers     Geschrieben von Brendon Kozlowski  Comments (0) Trackbacks (0) Sie k&#246;nnen einen Kommentar [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Automatically load all controllers and actions into ACO tables for ACL with a CakePHP Task How to list all controllers     Geschrieben von Brendon Kozlowski  Comments (0) Trackbacks (0) Sie k&ouml;nnen einen Kommentar [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Controller List Component &#124; CakePHP Desk</title>
		<link>http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/comment-page-1/#comment-172659</link>
		<dc:creator>Controller List Component &#124; CakePHP Desk</dc:creator>
		<pubDate>Thu, 02 Sep 2010 07:16:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=230#comment-172659</guid>
		<description><![CDATA[[...] http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/     Articoli   &#8592; Persistent Pagination      Leave a comment0 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] <a href="http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/" rel="nofollow">http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/</a>     Articoli   &larr; Persistent Pagination      Leave a comment0 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Come ottenere una lista di tutti i componenti e relative actions &#124; Luizz</title>
		<link>http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/comment-page-1/#comment-172658</link>
		<dc:creator>Come ottenere una lista di tutti i componenti e relative actions &#124; Luizz</dc:creator>
		<pubDate>Thu, 02 Sep 2010 07:12:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=230#comment-172658</guid>
		<description><![CDATA[[...] http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/   Bookmark It                    Hide Sites    $$(&#039;div.d380&#039;).each( function(e) { e.visualEffect(&#039;slide_up&#039;,{duration:0.5}) }); [...]]]></description>
		<content:encoded><![CDATA[<p>[...] <a href="http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/" rel="nofollow">http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/</a>   Bookmark It                    Hide Sites    $$(&#039;div.d380&#039;).each( function(e) { e.visualEffect(&#039;slide_up&#039;,{duration:0.5}) }); [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/comment-page-1/#comment-166460</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Tue, 29 Jun 2010 16:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=230#comment-166460</guid>
		<description><![CDATA[@Andrew: Thanks for your fix, I modified the code accordingly.]]></description>
		<content:encoded><![CDATA[<p>@Andrew: Thanks for your fix, I modified the code accordingly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew K</title>
		<link>http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/comment-page-1/#comment-166123</link>
		<dc:creator>Andrew K</dc:creator>
		<pubDate>Sun, 27 Jun 2010 21:24:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=230#comment-166123</guid>
		<description><![CDATA[Just wanted to point out that this code will not work for controllers that are not in the main controller directory (e.g. app/controllers/). I have some controllers in a sub-directory that are not getting picked up. I added that extra folder to my bootstrap config and this code errored out saying that the file could not be found, because it was looking only in the main controllers directory.

I&#039;d recommend changing:
&lt;code&gt;
                $fileName = Inflector::underscore($controller).&#039;_controller.php&#039;;
                require_once(CONTROLLERS.$fileName);
&lt;/code&gt;
to
&lt;code&gt;
                App::import(&#039;Controller&#039;, $controller);
&lt;/code&gt;

That way Cake will work it&#039;s magic to find the file even if it&#039;s in an secondary directory.

P.S. I&#039;ve only done this in version 1.2, but I have a feeling it should work in later versions.]]></description>
		<content:encoded><![CDATA[<p>Just wanted to point out that this code will not work for controllers that are not in the main controller directory (e.g. app/controllers/). I have some controllers in a sub-directory that are not getting picked up. I added that extra folder to my bootstrap config and this code errored out saying that the file could not be found, because it was looking only in the main controllers directory.</p>
<p>I&#8217;d recommend changing:<br />
<pre><code>$fileName = Inflector::underscore($controller).'_controller.php';
                require_once(CONTROLLERS.$fileName);</code></pre><br />
to<br />
<code>App::import('Controller', $controller);</code></p>
<p>That way Cake will work it&#8217;s magic to find the file even if it&#8217;s in an secondary directory.</p>
<p>P.S. I&#8217;ve only done this in version 1.2, but I have a feeling it should work in later versions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/comment-page-1/#comment-162447</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Wed, 19 May 2010 08:58:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=230#comment-162447</guid>
		<description><![CDATA[@cetver: Thanks for your component! 

However, there is a problem with your approach to detect the action names. It will only find actions with views...]]></description>
		<content:encoded><![CDATA[<p>@cetver: Thanks for your component! </p>
<p>However, there is a problem with your approach to detect the action names. It will only find actions with views&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cetver</title>
		<link>http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/comment-page-1/#comment-162156</link>
		<dc:creator>cetver</dc:creator>
		<pubDate>Mon, 17 May 2010 12:22:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=230#comment-162156</guid>
		<description><![CDATA[&lt;code&gt;
//and final component :)
&lt;?php

class ControllerListComponent extends Object {
	function get() {
		$result = array();
		$controllers_folder = new Folder( APP . &#039;controllers&#039; );
		$controllers = $controllers_folder-&gt;find(&#039;.*_controller\.php&#039;);
		foreach( $controllers as $controller ) {
			$views  = array();
			$controller_name = substr($controller, 0, strpos($controller, &#039;_controller&#039;));
			if ( $controller_name !== &#039;app&#039; ) {
				$actions_folder = new Folder( APP . &#039;views&#039; . DIRECTORY_SEPARATOR . $controller_name );
				$actions = $actions_folder-&gt;find(&#039;.*\.ctp&#039;);
				foreach( $actions as $action ) {
					$action_name = substr($action, 0, strpos($action, &#039;.&#039;));					
					array_push($views, $action_name);
				}
				$result[$controller_name] = $views;
			}
		}
		return $result;
	}
}

?&gt;
&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<pre><code>//and final component :)
&lt;?php

class ControllerListComponent extends Object {
	function get() {
		$result = array();
		$controllers_folder = new Folder( APP . 'controllers' );
		$controllers = $controllers_folder-&gt;find('.*_controller\.php');
		foreach( $controllers as $controller ) {
			$views  = array();
			$controller_name = substr($controller, 0, strpos($controller, '_controller'));
			if ( $controller_name !== 'app' ) {
				$actions_folder = new Folder( APP . 'views' . DIRECTORY_SEPARATOR . $controller_name );
				$actions = $actions_folder-&gt;find('.*\.ctp');
				foreach( $actions as $action ) {
					$action_name = substr($action, 0, strpos($action, '.'));					
					array_push($views, $action_name);
				}
				$result[$controller_name] = $views;
			}
		}
		return $result;
	}
}

?&gt;</code></pre>
]]></content:encoded>
	</item>
</channel>
</rss>
