<?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>tech-stuff &#187; oop</title>
	<atom:link href="http://www.uselessco.de/tag/oop/feed" rel="self" type="application/rss+xml" />
	<link>http://www.uselessco.de</link>
	<description>snipplets and more</description>
	<lastBuildDate>Mon, 22 Feb 2010 10:57:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>quick import constructor</title>
		<link>http://www.uselessco.de/2009/php/quick-import-constructor</link>
		<comments>http://www.uselessco.de/2009/php/quick-import-constructor#comments</comments>
		<pubDate>Tue, 12 May 2009 15:29:28 +0000</pubDate>
		<dc:creator>ralf</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[oop]]></category>

		<guid isPermaLink="false">http://www.killerspielserver.de/blog/?p=5</guid>
		<description><![CDATA[This snipplet shows how to automatic import parameters into a class, restricted to the variables defined in the head of the class. class Demo &#123; var $a, $b, $c &#160; function Demo&#40;$data&#41; &#123; while&#40;list&#40;$key,$value&#41;=each&#40;$data&#41;&#41;&#123; if&#40;isset&#40;$this-&#62;$key&#41;&#41;&#123; $this-&#62;$key = $value; &#125; &#125; &#125; &#125;]]></description>
			<content:encoded><![CDATA[<p>This snipplet shows how to automatic import parameters into a class, restricted to the variables defined in the head of the class.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Demo
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$a</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</span><span style="color: #339933;">,</span> <span style="color: #000088;">$c</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">function</span> Demo<span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span><span style="color: #339933;">,</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">=</span><span style="color: #990000;">each</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #000088;">$key</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.uselessco.de/2009/php/quick-import-constructor/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
