<?xml version="1.0" encoding="iso-8859-9"?><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: flyweight design pattern &#8211; php</title>
	<atom:link href="http://code.internet.com.tr/flyweight-design-pattern/feed/" rel="self" type="application/rss+xml" />
	<link>http://code.internet.com.tr/flyweight-design-pattern/</link>
	<description>bir gün bir gün bir çocuk</description>
	<lastBuildDate>Tue, 03 Jan 2012 21:27:10 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Emre Çevik</title>
		<link>http://code.internet.com.tr/flyweight-design-pattern/comment-page-1/#comment-1172</link>
		<dc:creator>Emre Çevik</dc:creator>
		<pubDate>Thu, 01 Jul 2010 21:27:21 +0000</pubDate>
		<guid isPermaLink="false">http://code.internet.com.tr/?p=323#comment-1172</guid>
		<description>bunları tek başına düşünmeyin bir sistem düşünün sistemde bir sürü parça var, buda o sistemin bir parçası.

hadi ben flyweight kullanıyım diye kullanmayın zaten. 

Daha ayrıntılı bilgi için MVP Bursak Selim Şenyurt tarafından yazılmış bir yazıyı okuyabilirsin.

http://www.buraksenyurt.com/post/Tasarc4b1m-Desenleri-FlyWeight.aspx</description>
		<content:encoded><![CDATA[<p>bunları tek başına düşünmeyin bir sistem düşünün sistemde bir sürü parça var, buda o sistemin bir parçası.</p>
<p>hadi ben flyweight kullanıyım diye kullanmayın zaten. </p>
<p>Daha ayrıntılı bilgi için MVP Bursak Selim Şenyurt tarafından yazılmış bir yazıyı okuyabilirsin.</p>
<p><a href="http://www.buraksenyurt.com/post/Tasarc4b1m-Desenleri-FlyWeight.aspx" rel="nofollow">http://www.buraksenyurt.com/post/Tasarc4b1m-Desenleri-FlyWeight.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: can</title>
		<link>http://code.internet.com.tr/flyweight-design-pattern/comment-page-1/#comment-1170</link>
		<dc:creator>can</dc:creator>
		<pubDate>Thu, 01 Jul 2010 09:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://code.internet.com.tr/?p=323#comment-1170</guid>
		<description>[code]
class Form 
{
	private $args;
	private $pattern = &quot;\n%s\n&quot;;
	private $var = Array();


	public function __construct($name, $action, $method = &#039;POST&#039;, $type = null)
	{
        $this-&gt;args[&#039;id&#039;] = $name;
		$this-&gt;args[&#039;name&#039;] = $name;
		$this-&gt;args[&#039;action&#039;] = $action;
		$this-&gt;args[&#039;method&#039;] = $method;
		$this-&gt;args[&#039;type&#039;] = $type;
        
		$this-&gt;args[&#039;element&#039;] = &quot;&quot;;
        
        

	}

	public function __toString()
	{
	   
		return (string )$this-&gt;generate();
	}


	public function generate()
	{
		foreach ((Array)$this-&gt;var as $key =&gt; $value)
		{

			$this-&gt;args[&#039;element&#039;] .= &quot;\t&quot; . $value . &quot;\n&quot;;

		}
		return vsprintf($this-&gt;pattern, $this-&gt;args);

	}


	public function __set($key, $value)
	{

		$this-&gt;var[$key] = $value;

	}

	public function __get($key)
	{
        
		return $this-&gt;var[$key];
	}

}

$Form1 = new Form(&#039;Form1&#039;, &quot;&quot;, &#039;POST&#039;);
$Form1-&gt;durum1 = (&#039;&#039;);
$Form1-&gt;radio1 = &#039;&#039;;
$Form1-&gt;durum2 = &#039;&#039;;

echo $Form1;[/code]

şeklinde olursa arasında ki fark ne olur?</description>
		<content:encoded><![CDATA[<p>[code]<br />
class Form<br />
{<br />
	private $args;<br />
	private $pattern = "\n%s\n";<br />
	private $var = Array();</p>
<p>	public function __construct($name, $action, $method = 'POST', $type = null)<br />
	{<br />
        $this-&gt;args['id'] = $name;<br />
		$this-&gt;args['name'] = $name;<br />
		$this-&gt;args['action'] = $action;<br />
		$this-&gt;args['method'] = $method;<br />
		$this-&gt;args['type'] = $type;</p>
<p>		$this-&gt;args['element'] = "";</p>
<p>	}</p>
<p>	public function __toString()<br />
	{</p>
<p>		return (string )$this-&gt;generate();<br />
	}</p>
<p>	public function generate()<br />
	{<br />
		foreach ((Array)$this-&gt;var as $key =&gt; $value)<br />
		{</p>
<p>			$this-&gt;args['element'] .= "\t" . $value . "\n";</p>
<p>		}<br />
		return vsprintf($this-&gt;pattern, $this-&gt;args);</p>
<p>	}</p>
<p>	public function __set($key, $value)<br />
	{</p>
<p>		$this-&gt;var[$key] = $value;</p>
<p>	}</p>
<p>	public function __get($key)<br />
	{</p>
<p>		return $this-&gt;var[$key];<br />
	}</p>
<p>}</p>
<p>$Form1 = new Form('Form1', "", 'POST');<br />
$Form1-&gt;durum1 = ('');<br />
$Form1-&gt;radio1 = '';<br />
$Form1-&gt;durum2 = '';</p>
<p>echo $Form1;[/code]</p>
<p>şeklinde olursa arasında ki fark ne olur?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

