<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sean-Paul.com</title>
	<atom:link href="http://www.sean-paul.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sean-paul.com</link>
	<description>3D, Web Design, Prototyping madman</description>
	<lastBuildDate>Wed, 23 Nov 2011 22:41:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PHP — heredoc</title>
		<link>http://www.sean-paul.com/coding/php-heredoc/</link>
		<comments>http://www.sean-paul.com/coding/php-heredoc/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 21:51:44 +0000</pubDate>
		<dc:creator>seanpaul</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://localhost/sean-paul.com.local/?p=267</guid>
		<description><![CDATA[// start the string with 3 &#60;'s and then a word // it doesn't have to be any particular string or length // but it's common to make it in all caps. echo &#60;&#60;&#60; EOT in here is your string it has the same variable substitution rules as a double quoted string. when you end]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// start the string with 3 &lt;'s and then a word</span>
<span style="color: #666666; font-style: italic;">// it doesn't have to be any particular string or length</span>
<span style="color: #666666; font-style: italic;">// but it's common to make it in all caps.</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt; EOT
    in here is your string
    it has the same variable substitution rules
    as a double quoted string.
    when you end it, put the indicator word at the
    start of the line (no spaces before it)
    and put a semicolon after it
EOT</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.sean-paul.com/coding/php-heredoc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retrieving controller and methods names</title>
		<link>http://www.sean-paul.com/codeigniter/retrieving-controller-and-methods-names/</link>
		<comments>http://www.sean-paul.com/codeigniter/retrieving-controller-and-methods-names/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 00:44:42 +0000</pubDate>
		<dc:creator>seanpaul</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[codeigniter]]></category>

		<guid isPermaLink="false">http://localhost/sean-paul.com.local/?p=233</guid>
		<description><![CDATA[Today I needed to pass the method name on to a view file. Normally I would just call the URI segment to pull it out. That approach would work fine unless you need to move around your URL structure later on.]]></description>
			<content:encoded><![CDATA[<p>Today I needed to pass the method name on to a view file. Normally I would just call the URI segment to pull it out. That approach would work fine unless you need to move around your URL structure later on. So in case you are needing to find either the method or class name, here you go:</p>
<p>To return the name of a controller in CodeIgniter:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">router</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetch_class</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>To return the name of a method in CodeIgniter:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">router</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetch_method</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Example</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> News <span style="color: #000000; font-weight: bold;">extends</span> CI_Controller <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       parent<span style="color: #339933;">::</span>__construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #000000; font-weight: bold;">function</span> latest<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">router</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetch_class</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Returns &quot;News&quot;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">router</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetch_method</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Returns &quot;latest&quot;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.sean-paul.com/codeigniter/retrieving-controller-and-methods-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

