<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum CakePHP.org.pl - przechwytywanie danych z paska adresu? jak?   cake/posts/view/19/1231]]></title>
	<link rel="self" href="http://forum.cakephp.org.pl/feed/atom/topic/67/"/>
	<updated>2009-07-08T13:34:16Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.cakephp.org.pl/topic/67/przechwytywanie-danych-z-paska-adresu-jak-cakepostsview191231/</id>
		<entry>
			<title type="html"><![CDATA[Odp: przechwytywanie danych z paska adresu? jak?   cake/posts/view/19/1231]]></title>
			<link rel="alternate" href="http://forum.cakephp.org.pl/post/382/#p382"/>
			<content type="html"><![CDATA[<p>mi tam przychodza do glowy dwa proste rozwiazania :</p><p>1. stndardowe , ale niekoniecznie moze sie nadawac, bo nie doczytalem do konca Twojego posta ;-)<br /></p><div class="codebox"><pre><code>public function action($arg1 .... $argN)
{
       ....
}</code></pre></div><p>2. O wiele wygodniejsze niz poprzednie + grzebanie w przekazanych parametrach<br /></p><div class="codebox"><pre><code>public function action()
{
       $tuSaMojeAtrbuty = func_get_args();
       ....
}</code></pre></div><p>Co do drugiego, to stosuje je np w modelach jezeli dokladnie nie wiadomo ile parametrow i w jakiej kolejnosci przekaze do metody ;-)</p>]]></content>
			<author>
				<name><![CDATA[robal77]]></name>
				<uri>http://forum.cakephp.org.pl/user/143/</uri>
			</author>
			<updated>2009-07-08T13:34:16Z</updated>
			<id>http://forum.cakephp.org.pl/post/382/#p382</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: przechwytywanie danych z paska adresu? jak?   cake/posts/view/19/1231]]></title>
			<link rel="alternate" href="http://forum.cakephp.org.pl/post/317/#p317"/>
			<content type="html"><![CDATA[<p>Witam, do parametrów przekazanych w adresie URL można się dostać za pomocą takiego kodu:</p><div class="codebox"><pre><code>$this-&gt;params[&#039;pass&#039;]</code></pre></div><p>Tak instrukcja zwraca tablicę parametrów przekazanych w adresie URL - dla podanego przez Ciebie przykładu tablica będzie wyglądać następująco:</p><div class="codebox"><pre><code>Array ( [0] =&gt; 19 [1] =&gt; 1231 )</code></pre></div><p>Za pomocą zmiennej <strong>params</strong> można się dostać także do innych parametrów przekazanych w adresie URL (np. nazwy kontrolera lub akcji) - więcej informacji oczywiście w manualu: <a href="http://book.cakephp.org/view/55/The-Parameters-Attribute-params">http://book.cakephp.org/view/55/The-Par … ute-params</a></p>]]></content>
			<author>
				<name><![CDATA[michol]]></name>
				<uri>http://forum.cakephp.org.pl/user/201/</uri>
			</author>
			<updated>2009-05-14T11:03:48Z</updated>
			<id>http://forum.cakephp.org.pl/post/317/#p317</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[przechwytywanie danych z paska adresu? jak?   cake/posts/view/19/1231]]></title>
			<link rel="alternate" href="http://forum.cakephp.org.pl/post/315/#p315"/>
			<content type="html"><![CDATA[<p>http://localhost/cake/posts/view/19/1231 </p><br /><p>tego typu adres przekazuje dane w zmiennych:</p><p>core ma włączone :&nbsp; &quot;debug=3&quot;</p><br /><br /><p>chcialbym pobrac zmienna stąd:</p><p>&nbsp; &nbsp; [params] =&gt; Array<br />&nbsp; &nbsp; &nbsp; &nbsp; (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [pass] =&gt; Array<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [0] =&gt; 19<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [1] =&gt; 1231<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br />[...]</p><br /><p>chcę pobrać&nbsp; tą zmienną&nbsp; &nbsp;[1] = 1231&nbsp; &nbsp;tylko jak ?</p><br /><p>czekam na wasze pomysły...</p><br /><br /><br /><p>----------------------------------kod ---------------<br />&nbsp; &nbsp; &nbsp; &nbsp; PostsController Object<br />(<br />&nbsp; &nbsp; [name] =&gt; Posts<br />&nbsp; &nbsp; [here] =&gt; /cake/posts/view/19/1231<br />&nbsp; &nbsp; [webroot] =&gt; /cake/<br />&nbsp; &nbsp; [action] =&gt; view<br />&nbsp; &nbsp; [uses] =&gt; <br />&nbsp; &nbsp; [helpers] =&gt; Array<br />&nbsp; &nbsp; &nbsp; &nbsp; (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [0] =&gt; Html<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [1] =&gt; Form<br />&nbsp; &nbsp; &nbsp; &nbsp; )</p><p>&nbsp; &nbsp; [params] =&gt; Array<br />&nbsp; &nbsp; &nbsp; &nbsp; (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [pass] =&gt; Array<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [0] =&gt; 19<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [1] =&gt; 1231<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [named] =&gt; Array<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [controller] =&gt; posts<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [action] =&gt; view<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [plugin] =&gt; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [form] =&gt; Array<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [url]=&gt; Array<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [url]=&gt; posts/view/19/1231<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [models] =&gt; Array<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [0] =&gt; Post<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )</p><p>&nbsp; &nbsp; &nbsp; &nbsp; )</p><p>[..................]</p>]]></content>
			<author>
				<name><![CDATA[johnny]]></name>
				<uri>http://forum.cakephp.org.pl/user/196/</uri>
			</author>
			<updated>2009-05-10T12:12:51Z</updated>
			<id>http://forum.cakephp.org.pl/post/315/#p315</id>
		</entry>
</feed>

