<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en" xml:base="http://www.shawnstratton.info/wp-atom.php">
	<title type="text">Shawn Stratton</title>
	<subtitle type="text">PHP Geek</subtitle>

	<updated>2012-04-06T13:21:20Z</updated>

	<link rel="alternate" type="text/html" href="http://www.shawnstratton.info" />
	<id>http://www.shawnstratton.info/feed/atom/</id>
	

			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/shawnstratton/rCsU" /><feedburner:info uri="shawnstratton/rcsu" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>36.055115</geo:lat><geo:long>-86.64782</geo:long><feedburner:emailServiceId>shawnstratton/rCsU</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fshawnstratton%2FrCsU" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fshawnstratton%2FrCsU" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fshawnstratton%2FrCsU" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><entry>
		<author>
			<name>Shawn Stratton</name>
						<uri>http://shawnwstratton.com</uri>
					</author>
		<title type="html"><![CDATA[2012 Goals]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/shawnstratton/rCsU/~3/JzkpTOBqy9w/" />
		<id>http://www.shawnstratton.info/?p=280</id>
		<updated>2012-01-16T17:49:58Z</updated>
		<published>2012-01-16T17:49:58Z</published>
		<category scheme="http://www.shawnstratton.info" term="Discovery" /><category scheme="http://www.shawnstratton.info" term="Personal" /><category scheme="http://www.shawnstratton.info" term="PHP" /><category scheme="http://www.shawnstratton.info" term="Programing" /><category scheme="http://www.shawnstratton.info" term="Tools" /><category scheme="http://www.shawnstratton.info" term="Work" />		<summary type="html"><![CDATA[I'm sure I'll have other goals before years end, there are also other things that are not so much goal driven that I'll be doing this year but I think this is going to be a good year and the changes are going to be vast but helpful. Here's to hoping that everyone has an awesome 2012!]]></summary>
		<content type="html" xml:base="http://www.shawnstratton.info/2012-goals/">&lt;p&gt;So I don't really do New Years resolutions, but that doesn't mean I don't have goals for myself.  I've been pondering what my goals for this year are and I've got a pretty healthy list for 2012 (oddly all work/technical) so here goes:&lt;/p&gt;
&lt;h2&gt;1. Publish an AWS Consumer Application on Android.&lt;/h2&gt;
&lt;p&gt;So as part of my new role we're transition a lot of traditional hardware to EC2 instances, we'll be needing to monitor those instances and keep up with what's going on with our infrastructure.  We have a graphs solution that one of my co-workers wrote many moons ago, but, with EC2 &lt;a href="http://aws.amazon.com/cloudwatch/" target="_blank"&gt;CloudWatch&lt;/a&gt; becomes a target, since it records at what would traditionally be the hardware level.  CloudWatch has a fairly decent &lt;a href="http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/Welcome.html?r=7806" target="_blank"&gt;API&lt;/a&gt;, the only thing I'm not seeing yet is the ability to send CloudWatch alarm notifications over SNS (Push the alarm to a mobile device.)  My goal is to write a service consumer that will pull instance and aggregate metrics and then graph them, further I intend on doing a background process to monitor for alarms (until SNS notifications become possible.)  I hope to have this done by May, we'll see.&lt;/p&gt;
&lt;h2&gt;2. Transition to Programming in Python&lt;/h2&gt;
&lt;p&gt;What? Why? Well I'm no longer an Application Programmer, I'll be working on system level tools and processes and some of these will grow rather large so it's only logical that Python has better hooks than PHP and is more maintainable than BASH (personal opinion.)  Don't get me wrong I still love PHP, but it just doesn't make sense for what I'm working on here and I don't want to go as low as the C level with CLI tools and build tools.&lt;/p&gt;
&lt;h2&gt;3. Write a PECL Extension&lt;/h2&gt;
&lt;p&gt;So yeah, another lower level task (and no this doesn't contradict the Python statement from above.)  We have a jsmin based PHP Extension that allows us to dynamically minify js, however, we've toyed around with the idea of writing a wrapper around Google's PageSpeed api and switching to it, rather than sit here and spin the wheels at some point I'm going to do exactly that and my intent is to publish it to the PECL repository.&lt;/p&gt;
&lt;h2&gt;4. Contribute to Docblox&lt;/h2&gt;
&lt;p&gt;I had been doing work on phpDocumentor2, however, I kept getting demotivated with it since it was basically me and another guy and we could hardly ever agree on much.  &lt;a href="http://blog.naenius.com/" target="_blank"&gt;Mike Van Riel&lt;/a&gt; introduced &lt;a href="http://www.docblox-project.org/" target="_blank"&gt;Docblox&lt;/a&gt; last year, however, it's still actively being extended and I had some ideas that mvriel has yet to even hint at so this may well be the time for me to contribute.&lt;/p&gt;
&lt;h2&gt;5. Replace the DI container in ZF2&lt;/h2&gt;
&lt;p&gt;So I'm a big Zend Framework fan and Zend Framework 2 shows major promise, but, I have a few gripes with complexity and in some cases inflexibility.  One of those gripes I have is about the DI container that Matthew implemented and the static mappings that it requires.  Years ago I worked with a guy, &lt;a href="http://www.linkedin.com/pub/sean-crystal/33/b25/7b5" target="_blank"&gt;Sean Crystal&lt;/a&gt;, at this little shop in Knoxville; Sean had written a DI container that used reflection, a year or two later when he came out to Nashville to work for a new company that I had moved to he wrote an Open Source implementation called &lt;a href="https://github.com/spiralout/Wires" target="_blank"&gt;Wires&lt;/a&gt; which I wound up forking and trying to prepare for PEAR2.  Sean and I had a falling out because I made a slight mistake and Sean thought that I was trying to remove the attribution to him, hence I deleted all copies of Wires from my machine and removed my fork from Github and withdrew the PEAR2 RFC, however, between the work we did in Knoxville and the implementation of Wires and my evolution as a Computer Scientist, I have an idea for an implementation with adapter classes that will allow me to drop into ZF2 and other frameworks.  I don't know when I'll get to this but something tells me soonish as we're already building out our Zend Framework 2 implementation at Discovery.&lt;/p&gt;
&lt;p&gt;I'm sure I'll have other goals before years end, there are also other things that are not so much goal driven that I'll be doing this year, like next week I'll be setting up Cisco routers in our data-center to handle the tunnel between it and the AWS Virtual Private Cloud, but I think this is going to be a good year and the changes are going to be vast but helpful. Here's to hoping that everyone has an awesome 2012!&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=JzkpTOBqy9w:857eWa4a21A:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=JzkpTOBqy9w:857eWa4a21A:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?i=JzkpTOBqy9w:857eWa4a21A:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=JzkpTOBqy9w:857eWa4a21A:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/shawnstratton/rCsU/~4/JzkpTOBqy9w" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.shawnstratton.info/2012-goals/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.shawnstratton.info/2012-goals/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://www.shawnstratton.info/2012-goals/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Shawn Stratton</name>
						<uri>http://shawnwstratton.com</uri>
					</author>
		<title type="html"><![CDATA[PHP Gearman for Unfortunate Souls running Lucid Lynx]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/shawnstratton/rCsU/~3/ZRu45MmmtDw/" />
		<id>http://www.shawnstratton.info/?p=255</id>
		<updated>2011-11-30T16:07:19Z</updated>
		<published>2011-11-30T16:05:10Z</published>
		<category scheme="http://www.shawnstratton.info" term="PHP" /><category scheme="http://www.shawnstratton.info" term="Programing" />		<summary type="html"><![CDATA[I've been helping a friend setup gearman on his box; unfortunately his box happens to be running Ubuntu 10.04 Lucid Lynx LTS which has some packaging problems with gearman.  This post is a quick list of the things we did to fix the pecl installation of gearman-beta and to get it running. First, the Ubuntu [...]]]></summary>
		<content type="html" xml:base="http://www.shawnstratton.info/php-gearman-for-unfortunate-souls-running-lucid-lynx/">&lt;p&gt;I've been helping a friend setup gearman on his box; unfortunately his box happens to be running Ubuntu 10.04 Lucid Lynx LTS which has some packaging problems with gearman.  This post is a quick list of the things we did to fix the pecl installation of gearman-beta and to get it running.&lt;/p&gt;
&lt;h2&gt;First, the Ubuntu dependencies&lt;/h2&gt;
&lt;pre&gt;sudo apt-get install gearman libgearman2 libgearman-dev \
php5-dev php-pear&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Second, Edit a file&lt;/h2&gt;
&lt;p&gt;(This is due to packaging changes that occurred in Lucid.)&lt;/p&gt;
&lt;pre&gt;sudo vi  /usr/lib/libgearman.la&lt;/pre&gt;
&lt;p&gt;replace &lt;strong&gt;dependency_libs=' -L/usr/lib /usr/lib/libuuid.la'&lt;br /&gt;
&lt;/strong&gt;with &lt;strong&gt;dependency_libs=' -L/usr/lib -luuid'&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Third, Pecl&lt;/h2&gt;
&lt;pre&gt;sudo pecl install gearman-beta&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Fourth, Add Configuration to PHP&lt;/h2&gt;
&lt;p&gt;(optional if you have pecl configured to your php.ini files)&lt;/p&gt;
&lt;pre&gt;sudo echo 'extension=gearman.so' &amp;gt; /etc/php5/conf.d/gearman.ini&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;To verify&lt;/h2&gt;
&lt;p&gt;Run:&lt;/p&gt;
&lt;pre&gt;php -m |grep gearman&lt;/pre&gt;
&lt;p&gt;If this doesn't return anything you have a problem somewhere.  If it returns gearman than you're good, just restart apache and you're done.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=ZRu45MmmtDw:3jS4SgpewP0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=ZRu45MmmtDw:3jS4SgpewP0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?i=ZRu45MmmtDw:3jS4SgpewP0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=ZRu45MmmtDw:3jS4SgpewP0:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/shawnstratton/rCsU/~4/ZRu45MmmtDw" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.shawnstratton.info/php-gearman-for-unfortunate-souls-running-lucid-lynx/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.shawnstratton.info/php-gearman-for-unfortunate-souls-running-lucid-lynx/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://www.shawnstratton.info/php-gearman-for-unfortunate-souls-running-lucid-lynx/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Shawn Stratton</name>
						<uri>http://shawnwstratton.com</uri>
					</author>
		<title type="html"><![CDATA[Lock your doors!]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/shawnstratton/rCsU/~3/lJGv0Bi_tJA/" />
		<id>http://www.shawnstratton.info/?p=232</id>
		<updated>2011-09-26T17:36:31Z</updated>
		<published>2011-09-26T17:36:31Z</published>
		<category scheme="http://www.shawnstratton.info" term="Discovery" /><category scheme="http://www.shawnstratton.info" term="Personal" /><category scheme="http://www.shawnstratton.info" term="Work" />		<summary type="html"><![CDATA[when my boss took a week off some coworkers and I had the perfect opportunity to have some fun. My boss, Brian, came back from his vacation to find his office, well I better share pictures, that'll say more than I can put in words.]]></summary>
		<content type="html" xml:base="http://www.shawnstratton.info/lock-your-doors/">&lt;p&gt;So over the last few weeks things here have been crazy, between things that I can't discuss about work and Valerie and I buying the house there's been a very high level of stress in me mixed with anxiety and the such. Now that things have kind of stabilized I finally had the chance to calm down and take a breath, so when my boss took a week off some coworkers and I had the perfect opportunity to have some fun. My boss, &lt;a href="http://bit.ly/nPyMQP"&gt;Brian&lt;/a&gt;, came back from his vacation to find his office, well I better share pictures, that'll say more than I can put in words.&lt;/p&gt;

&lt;a href='http://www.shawnstratton.info/lock-your-doors/alltheway/' title='alltheway'&gt;&lt;img width="150" height="150" src="http://www.shawnstratton.info/wp-content/uploads/2011/09/alltheway-150x150.jpg" class="attachment-thumbnail" alt="alltheway" title="alltheway" /&gt;&lt;/a&gt;
&lt;a href='http://www.shawnstratton.info/lock-your-doors/filled/' title='filled'&gt;&lt;img width="150" height="150" src="http://www.shawnstratton.info/wp-content/uploads/2011/09/filled-150x150.jpg" class="attachment-thumbnail" alt="filled" title="filled" /&gt;&lt;/a&gt;
&lt;a href='http://www.shawnstratton.info/lock-your-doors/name-sign/' title='name sign'&gt;&lt;img width="150" height="150" src="http://www.shawnstratton.info/wp-content/uploads/2011/09/name-sign-150x150.jpg" class="attachment-thumbnail" alt="name sign" title="name sign" /&gt;&lt;/a&gt;
&lt;a href='http://www.shawnstratton.info/lock-your-doors/wakeup/' title='wakeup'&gt;&lt;img width="150" height="150" src="http://www.shawnstratton.info/wp-content/uploads/2011/09/wakeup-150x150.jpg" class="attachment-thumbnail" alt="wakeup" title="wakeup" /&gt;&lt;/a&gt;
&lt;a href='http://www.shawnstratton.info/lock-your-doors/bodies/' title='bodies'&gt;&lt;img width="150" height="150" src="http://www.shawnstratton.info/wp-content/uploads/2011/09/bodies-150x150.jpg" class="attachment-thumbnail" alt="bodies" title="bodies" /&gt;&lt;/a&gt;
&lt;a href='http://www.shawnstratton.info/lock-your-doors/nail/' title='nail'&gt;&lt;img width="150" height="150" src="http://www.shawnstratton.info/wp-content/uploads/2011/09/nail-150x150.jpg" class="attachment-thumbnail" alt="nail" title="nail" /&gt;&lt;/a&gt;

&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=lJGv0Bi_tJA:I9Urw8A88jE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=lJGv0Bi_tJA:I9Urw8A88jE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?i=lJGv0Bi_tJA:I9Urw8A88jE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=lJGv0Bi_tJA:I9Urw8A88jE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/shawnstratton/rCsU/~4/lJGv0Bi_tJA" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.shawnstratton.info/lock-your-doors/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.shawnstratton.info/lock-your-doors/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://www.shawnstratton.info/lock-your-doors/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Shawn Stratton</name>
						<uri>http://shawnwstratton.com</uri>
					</author>
		<title type="html"><![CDATA[Latex Presentation Template]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/shawnstratton/rCsU/~3/WkCHq18fazU/" />
		<id>http://www.shawnstratton.info/?p=209</id>
		<updated>2011-07-21T23:01:16Z</updated>
		<published>2011-05-23T02:45:28Z</published>
		<category scheme="http://www.shawnstratton.info" term="Personal" /><category scheme="http://www.shawnstratton.info" term="Tools" />		<summary type="html"><![CDATA[Thanks to Lorna Jane &#038; Matthew Weier O`Phinney I've been using Latex to generate PDF slides for my upcoming talks.  Over the last few weeks I've been doing a lot of learning in regards to how it works and how to use it more efficiently. ]]></summary>
		<content type="html" xml:base="http://www.shawnstratton.info/latex-presentation-template/">&lt;p&gt;This is going to be a short post, but thanks to Lorna Jane &amp;amp; Matthew Weier O`Phinney I've been using Latex to generate PDF slides for my upcoming talks.  Over the last few weeks I've been doing a lot of learning in regards to how it works and how to use it more efficiently.  Lorna has an excellent entry in her blog that shows how to actually run latexmk to generate the slides &lt;a href="http://www.lornajane.net/posts/2011/Creating-Presentations-with-LaTeX"&gt;here&lt;/a&gt; and another excellent entry on markup &lt;a href="http://www.lornajane.net/posts/2011/Slide-Markup-with-LaTeX-First-Steps"&gt;here&lt;/a&gt;.  Matthew Weier O`Phinney and I have been talking about an awesome program on github called &lt;a href="https://github.com/jakobwesthoff/Pdf-Presenter-Console"&gt;pdf-presenter-console&lt;/a&gt; which makes life easier as a presenter, it seems like an interesting tool and I'll be covering it at some point more in depth.&lt;/p&gt;
&lt;p&gt;On Ubuntu these are the packages you will need:&lt;/p&gt;
&lt;div class="geshi no bash"&gt;
&lt;ol&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;texlive-publishers texlive-latex-recommended latemk texlive-fonts-extra latex-fonts-recommended&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;(I may have forgotten one or two but will add if I discover any more)&lt;br /&gt;
And here is my template:&lt;/p&gt;
&lt;div class="geshi no latex"&gt;
&lt;div class="head"&gt;\documentclass[style=jefka]{powerdot}&lt;/div&gt;
&lt;ol&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re2"&gt;\usepackage&lt;/span&gt;{&lt;span class="re3"&gt;listings&lt;/span&gt;}&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re2"&gt;\usepackage&lt;/span&gt;{&lt;span class="re3"&gt;color&lt;/span&gt;}&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re2"&gt;\usepackage&lt;/span&gt;{&lt;span class="re3"&gt;textcomp&lt;/span&gt;}&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="co1"&gt;% Code Listing Stuff&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re2"&gt;\definecolor&lt;/span&gt;{&lt;span class="re3"&gt;lbcolor&lt;/span&gt;}{&lt;span class="re3"&gt;rgb&lt;/span&gt;}{&lt;span class="re3"&gt;0.9,0.9,0.9&lt;/span&gt;}&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re2"&gt;\lstset&lt;/span&gt;{   &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;language=PHP,  &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;tabsize=2,  &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;backgroundcolor=&lt;span class="re2"&gt;\color&lt;/span&gt;{&lt;span class="re3"&gt;lbcolor&lt;/span&gt;}, &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;rulecolor=,  &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;extendedchars=true,  &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;frame=single,  &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;breakatwhitespace=true,  &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;breaklines=true,  &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;identifierstyle=&lt;span class="re2"&gt;\ttfamily&lt;/span&gt;,  &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;keywordstyle=&lt;span class="re2"&gt;\color&lt;/span&gt;[&lt;span class="re4"&gt;rgb&lt;/span&gt;]{&lt;span class="re3"&gt;0,0,1&lt;/span&gt;},  &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;commentstyle=&lt;span class="re2"&gt;\color&lt;/span&gt;[&lt;span class="re4"&gt;rgb&lt;/span&gt;]{&lt;span class="re3"&gt;0.133,0.545,0.133&lt;/span&gt;},  &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;stringstyle=&lt;span class="re2"&gt;\color&lt;/span&gt;[&lt;span class="re4"&gt;rgb&lt;/span&gt;]{&lt;span class="re3"&gt;0.627,0.126,0.941&lt;/span&gt;},  &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;morekeywords={&lt;span class="re3"&gt;class, interface, namespace, abstract, new, return, function, public, protected, private, implements, extends, use, as, throws, catch&lt;/span&gt;}&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;}&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="co1"&gt;% Presentation Metadata&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re2"&gt;\title&lt;/span&gt;{&lt;span class="re3"&gt;Title&lt;/span&gt;}&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re2"&gt;\author&lt;/span&gt;{&lt;span class="re3"&gt;Shawn Stratton&lt;/span&gt;}&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re2"&gt;\date&lt;/span&gt;{&lt;span class="re3"&gt;&lt;span class="re2"&gt;\today&lt;/span&gt;&lt;/span&gt;}&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re2"&gt;&lt;span class="re6"&gt;\begin&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;document&lt;/span&gt;} &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re2"&gt;\maketitle&lt;/span&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re2"&gt;&lt;span class="re6"&gt;\begin&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;slide&lt;/span&gt;}{&lt;span class="re3"&gt;Slide Title&lt;/span&gt;}    &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;&lt;span class="re6"&gt;\begin&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;itemize&lt;/span&gt;} &amp;nbsp; &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;\item&lt;/span&gt; Item1 &amp;nbsp; &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;\item&lt;/span&gt; Item2 &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;&lt;span class="re7"&gt;\end&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;itemize&lt;/span&gt;} &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re2"&gt;&lt;span class="re7"&gt;\end&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;slide&lt;/span&gt;} &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re2"&gt;\section&lt;/span&gt;{&lt;span class="re3"&gt;Section Title&lt;/span&gt;} &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re2"&gt;&lt;span class="re6"&gt;\begin&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;slide&lt;/span&gt;}{&lt;span class="re3"&gt;New&lt;/span&gt;} &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;\vspace&lt;/span&gt;*{&lt;span class="re3"&gt;&lt;span class="re2"&gt;\fill&lt;/span&gt;&lt;/span&gt;} &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;&lt;span class="re6"&gt;\begin&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;figure&lt;/span&gt;} &amp;nbsp; &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;\centering&lt;/span&gt; &amp;nbsp; &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;\includegraphics&lt;/span&gt;[&lt;span class="re4"&gt;width=0.6&lt;span class="re2"&gt;\slidewidth&lt;/span&gt;&lt;/span&gt;]{&lt;span class="re3"&gt;images/sample.eps&lt;/span&gt;} &amp;nbsp; &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;\caption&lt;/span&gt;{&lt;span class="re3"&gt;This is a centered (both horizontal &amp;amp;amp; vertical image&lt;/span&gt;} &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="re2"&gt;&lt;span class="re7"&gt;\end&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;figure&lt;/span&gt;} &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="re2"&gt;\vspace&lt;/span&gt;*{&lt;span class="re3"&gt;&lt;span class="re2"&gt;\fill&lt;/span&gt;&lt;/span&gt;} &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re2"&gt;&lt;span class="re7"&gt;\end&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;slide&lt;/span&gt;} &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re2"&gt;&lt;span class="re6"&gt;\begin&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;note&lt;/span&gt;} &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;This is a note &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re2"&gt;&lt;span class="re7"&gt;\end&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;note&lt;/span&gt;} &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re2"&gt;&lt;span class="re6"&gt;\begin&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;slide&lt;/span&gt;}{&lt;span class="re3"&gt;Source Inclusion&lt;/span&gt;} &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;\vspace&lt;/span&gt;*{&lt;span class="re3"&gt;&lt;span class="re2"&gt;\fill&lt;/span&gt;&lt;/span&gt;} &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;\lstinputlisting&lt;/span&gt;{&lt;span class="re3"&gt;src/file.php&lt;/span&gt;} &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re2"&gt;\vspace&lt;/span&gt;*{&lt;span class="re3"&gt;&lt;span class="re2"&gt;\fill&lt;/span&gt;&lt;/span&gt;} &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re2"&gt;&lt;span class="re7"&gt;\end&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;slide&lt;/span&gt;}&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re2"&gt;&lt;span class="re7"&gt;\end&lt;/span&gt;&lt;/span&gt;{&lt;span class="re3"&gt;document&lt;/span&gt;}&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;The command to run to generate the presentation:&lt;/p&gt;
&lt;div class="geshi no bash"&gt;
&lt;ol&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;latexmk -f -pdfps presentation.tex&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=WkCHq18fazU:QTK95Lad7t4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=WkCHq18fazU:QTK95Lad7t4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?i=WkCHq18fazU:QTK95Lad7t4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=WkCHq18fazU:QTK95Lad7t4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/shawnstratton/rCsU/~4/WkCHq18fazU" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.shawnstratton.info/latex-presentation-template/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.shawnstratton.info/latex-presentation-template/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://www.shawnstratton.info/latex-presentation-template/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Shawn Stratton</name>
						<uri>http://shawnwstratton.com</uri>
					</author>
		<title type="html"><![CDATA[Accesors and Religion]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/shawnstratton/rCsU/~3/wccwVkx10Xk/" />
		<id>http://www.shawnstratton.info/?p=183</id>
		<updated>2011-05-30T17:21:09Z</updated>
		<published>2011-05-16T20:02:35Z</published>
		<category scheme="http://www.shawnstratton.info" term="PHP" />		<summary type="html"><![CDATA[Today I'm going to become flame bait, I'm going to talk about something that's highly controversial, not because most view points on it are wrong but because everyones differ and they're all wrong besides mine.  Well there went my attempt at being sarcastic, but seriously, this is one of those discussions that will always be [...]]]></summary>
		<content type="html" xml:base="http://www.shawnstratton.info/accesors-and-religion/">&lt;p&gt;Today I'm going to become flame bait, I'm going to talk about something that's highly controversial, not because most view points on it are wrong but because everyones differ and they're all wrong besides mine.  Well there went my attempt at being sarcastic, but seriously, this is one of those discussions that will always be highly controversial.&lt;/p&gt;
&lt;h1&gt;The Problem&lt;/h1&gt;
&lt;p&gt;Objects have properties which sometimes need special logic on how they are retrieved and set.  There are several solutions to this and everybody has a different view point about which is correct, none are pretty and all have drawbacks which range from writing extra code, creating something that has poor extensibility, or has issues with consistency.  These don't even breach the issues with IDE code completion and analysis.  Lets look at some of these solutions.&lt;/p&gt;
&lt;h1&gt;The Solutions&lt;/h1&gt;
&lt;h2&gt;Direct Access to properties&lt;/h2&gt;
&lt;p&gt;So when you first start getting into objects the very first thing that most people do is create a whole bunch of public properties that are accessed like this&lt;/p&gt;
&lt;div class="geshi no php"&gt;
&lt;div class="head"&gt;class stuff{&lt;/div&gt;
&lt;ol&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="re1"&gt;$whatever&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re1"&gt;$obj&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="me1"&gt;whatever&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;#39;whatever&amp;#39;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;This works well, you can set things outside of the object and then have the object act on it, the problem comes in when you need to modify the way the data is handled when it's set or retrieved without hanging client code.  That's generally when people start writing accessor methods and changing client code which leads to our second solution.&lt;/p&gt;
&lt;h2&gt;Mixture of Accessors and Direct Property Accessors&lt;/h2&gt;
&lt;p&gt;Once you start seeing needs of modifying data as it's being assigned you'll start seeing code like this:&lt;/p&gt;
&lt;div class="geshi no php"&gt;
&lt;div class="head"&gt;class whatever2{&lt;/div&gt;
&lt;ol&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;  &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="re1"&gt;$whatever&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;  &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="re1"&gt;$stuff&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;  &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;function&lt;/span&gt; setWhatever&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re1"&gt;$value&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;function&lt;/span&gt; getWhatever&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re1"&gt;$obj&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="me1"&gt;stuff&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;#39;stuff&amp;#39;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re1"&gt;$obj&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="me1"&gt;setWhatever&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;#39;whatever&amp;#39;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;Usually this only lasts a little while, usually someone will completely forget about the accesor methods and work with the property directly and cause some great inconsistencies, then as an act of paranoia someone will mark the property as protected or private.  This is still a problem as it leads to great inconsistencies, then the next step comes up.&lt;/p&gt;
&lt;h2&gt;Accessors for everything&lt;/h2&gt;
&lt;p&gt;This is usually the level most hit and stay at, they start writing accessors for every property that's supposed to be publicly accessible, your code here will start to look like this:&lt;/p&gt;
&lt;div class="geshi no php"&gt;
&lt;div class="head"&gt;class whatever{&lt;/div&gt;
&lt;ol&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;  protected &lt;span class="re1"&gt;$stuff&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;  protected &lt;span class="re1"&gt;$whatever&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;  &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;function&lt;/span&gt; getStuff&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;  &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;function&lt;/span&gt; setStuff&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re1"&gt;$value&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;  &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;function&lt;/span&gt; getWhatever&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;  &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;function&lt;/span&gt; setWhatever&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re1"&gt;$value&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re1"&gt;$obj&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="me1"&gt;setStuff&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;#39;stuff&amp;#39;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re1"&gt;$obj&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="me1"&gt;setWhatever&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;#39;whatever&amp;#39;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;At this level consistency is no longer a problem and you can easily extend the functionality of your getters/setters which is awesome, some even figure out to return $this in the setters so they can do chaining, at which point you client code can look like this&lt;/p&gt;
&lt;div class="geshi no php"&gt;
&lt;ol&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re1"&gt;$obj&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="me1"&gt;setStuff&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;#39;stuff&amp;#39;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="me1"&gt;setWhatever&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;#39;whatever&amp;#39;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;There are downsides with this though, you'll have to write two methods that have to be compiled and referenced for every property you have, this makes the code very verbose and very long.  Some people have solved this issue with __call which is called every time you call a function that doesn't exist.  This usually looks like:&lt;/p&gt;
&lt;div class="geshi no php"&gt;
&lt;div class="head"&gt;class whatever{&lt;/div&gt;
&lt;ol&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; protected &lt;span class="re1"&gt;$stuff&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; protected &lt;span class="re1"&gt;$whatever&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;function&lt;/span&gt; __call&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re1"&gt;$name&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt; &lt;span class="re1"&gt;$params&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;With some logic you can easily have the function  check for get/set at the beginning of the method name; it works but it's slow and it means that IDE's won't detect the setters/getters  and magic is generally not the best thing.  The even worse case of this is people use __get and __set to overwrite everything, but it does work on every protected/public property and it's an easy way to centralize getters and setters.  This leads us to our last idea, which I personally think is the best way to handle the situation.&lt;/p&gt;
&lt;h2&gt;My Solution&lt;/h2&gt;
&lt;p&gt;Obviously we want the ability to overwrite the way things are set, we also need consistency so that we're backwards compatible and the developers don't get confused by what's set via setter and what's set via direct property access, ultimately we don't want to write a bunch of functions just to set and get the values of our properties, it's kinda silly actually, thinking of all those function calls and completely discarding PHP's Property Setting also seems a little foolish.  Anyway, ultimately I came up with the following solution and it works really well for me and the people I work with.&lt;/p&gt;
&lt;div class="geshi no php"&gt;
&lt;div class="head"&gt;public function __set ($key, $value)&lt;/div&gt;
&lt;ol&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="co1"&gt;//check if a accessor function exists&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re1"&gt;$accessor&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;#39;set&amp;#39;&lt;/span&gt;&lt;span class="sy0"&gt;.&lt;/span&gt;&lt;span class="kw3"&gt;ucfirst&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re1"&gt;$key&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="kw3"&gt;method_exists&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re1"&gt;$this&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt; &lt;span class="re1"&gt;$accessor&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;return&lt;/span&gt; &lt;span class="re1"&gt;$this&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="re1"&gt;$accessor&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re1"&gt;$value&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;function&lt;/span&gt; __get &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re1"&gt;$key&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="re1"&gt;$accessor&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;&amp;#39;get&amp;#39;&lt;/span&gt;&lt;span class="sy0"&gt;.&lt;/span&gt;&lt;span class="kw3"&gt;ucfirst&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re1"&gt;$key&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="kw3"&gt;method_exists&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re1"&gt;$this&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt; &lt;span class="re1"&gt;$accessor&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;return&lt;/span&gt; &lt;span class="re1"&gt;$this&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="re1"&gt;$accessor&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;  &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;With this code in our Model Abstract we are able to call everything via the default method of setting properties i.e.&lt;/p&gt;
&lt;div class="geshi no php"&gt;
&lt;ol&gt;
&lt;li class="li1"&gt;
&lt;div class="de1"&gt;&lt;span class="re1"&gt;$object&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="me1"&gt;property&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="re1"&gt;$value&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;Most properties would then be marked public, with properties meant to be accessed in this way being set to protected and having set/get functions written for them (that are then marked protected to keep the api clean and to keep interaction sane.)  There is one obvious glaring downside to this though, this does not work with IDE auto-completion, and boy do I wish it did, but out of all things to sacrificed that's pretty minimal.  Also I should mention that the above code does not do any error setting which has been omitted in my example.&lt;/p&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;There are many ways you can skin this metaphorical cat, however, they each have trade-offs.  Ultimately I went with the methodology that made the most sense to me and that passed our architectural standards (consistency) but you may have a different use case and that's fine.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=wccwVkx10Xk:iY-Q9DbvjEo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=wccwVkx10Xk:iY-Q9DbvjEo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?i=wccwVkx10Xk:iY-Q9DbvjEo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?a=wccwVkx10Xk:iY-Q9DbvjEo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/shawnstratton/rCsU?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/shawnstratton/rCsU/~4/wccwVkx10Xk" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.shawnstratton.info/accesors-and-religion/#comments" thr:count="13" />
		<link rel="replies" type="application/atom+xml" href="http://www.shawnstratton.info/accesors-and-religion/feed/atom/" thr:count="13" />
		<thr:total>13</thr:total>
	<feedburner:origLink>http://www.shawnstratton.info/accesors-and-religion/</feedburner:origLink></entry>
	</feed>

