<?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>Felipe Theodoro &#187; cake php</title>
	<atom:link href="http://blog.ftgoncalves.com/tag/cake-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ftgoncalves.com</link>
	<description>sempre Realimentação positiva</description>
	<lastBuildDate>Wed, 07 Apr 2010 19:28:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tela branca no CakePHP</title>
		<link>http://blog.ftgoncalves.com/2009/09/tela-branca-no-cakephp/</link>
		<comments>http://blog.ftgoncalves.com/2009/09/tela-branca-no-cakephp/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 20:57:26 +0000</pubDate>
		<dc:creator>Felipe Theodoro</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blanck page]]></category>
		<category><![CDATA[cake php]]></category>
		<category><![CDATA[tela branca]]></category>

		<guid isPermaLink="false">http://blog.ftgoncalves.com/?p=131</guid>
		<description><![CDATA[Tela branco no cakephp depois de enviar os arquivos para o servidor via FTP.]]></description>
			<content:encoded><![CDATA[<p>Hoje tive um problema no qual nunca tinha passado: uma tela branca depois de mandar os arquivos para o servidor e acessar a url.<br />
Nada de erro, nada de nada&#8230; Pronto, pânico!<br />
Procurando um pouquinho na net, me deparei com um post do <a title="Tulio faria" href="http://www.tuliofaria.net" target="_blank">Tulio</a>, que passou por este mesmo problema.<br />
Foi resolvido mandando os arquivos para o servidor no modo Binário.<br />
Aqui funcionou depois de trocar o modo de transferência.<br />
Ps: Também tive que colocar 1 transferência simultânea.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftgoncalves.com/2009/09/tela-branca-no-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Usando o Component Auth do CakePHP</title>
		<link>http://blog.ftgoncalves.com/2009/09/usando-o-component-auth-do-cakephp/</link>
		<comments>http://blog.ftgoncalves.com/2009/09/usando-o-component-auth-do-cakephp/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 01:39:27 +0000</pubDate>
		<dc:creator>Felipe Theodoro</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[cake php]]></category>

		<guid isPermaLink="false">http://blog.ftgoncalves.com/?p=124</guid>
		<description><![CDATA[Configurando e usando o component Auth do Cakephp]]></description>
			<content:encoded><![CDATA[<p>Tenho visto várias pessoas com dúvidas em relaxão a utilização do componente Auth, por este motivo descidi escrever este pequeno tutorial.</p>
<p>Tudo começa com seu app_controller</p>
<p>app_controller.php</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> AppController <span style="color: #000000; font-weight: bold;">extends</span> Controller <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$components</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Auth'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> beforeFilter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #009933; font-style: italic;">/** 
		* Configuração das para que o Auth identifique os 
		* campos de acesso no sistema
		*/</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fields</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'email'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'password'</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #009933; font-style: italic;">/**
		* Caso acesso a area restrita e não logado é
		* redirecionado para efetuar login
		*/</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">loginAction</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'controller'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'users'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'action'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'login'</span><span style="color: #339933;">,</span>
			Configure<span style="color: #339933;">::</span><span style="color: #004000;">read</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Routing.admin'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">true</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #009933; font-style: italic;">/**
		* Redirecionamento após login
		*/</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">loginRedirect</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'controller'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'users'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'action'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'index'</span><span style="color: #339933;">,</span>
			Configure<span style="color: #339933;">::</span><span style="color: #004000;">read</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Routing.admin'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">true</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #009933; font-style: italic;">/**
		* Redirecionado quando o usuário requesita logout
		*/</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">logoutRedirect</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'controller'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'users'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'action'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'login'</span><span style="color: #339933;">,</span>
			Configure<span style="color: #339933;">::</span><span style="color: #004000;">read</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Routing.admin'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">true</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #009933; font-style: italic;">/**
		* Somente user ativo e administradores
		*/</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">userScope</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'User.status'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Autenticação somente para admin</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</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: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'prefix'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>Configure<span style="color: #339933;">::</span><span style="color: #004000;">read</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Routing.admin'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</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: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">allowedActions</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">allowedActions</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
				<span style="color: #0000ff;">'admin_recover_password'</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// Caixa para colocar e-mail e recuperar senha</span>
				<span style="color: #0000ff;">'admin_edit_password'</span> <span style="color: #666666; font-style: italic;">// link que é enviado por email para cadastrar nova senha</span>
			<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">loginError</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Erro na autenticação'</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">authError</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'É necessário a autenticação no sistema'</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">authorize</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'controller'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	* Verifica se usuário esta logado
	*
	* @return boolean
	*/</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> isAuthorized<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>em meu controller</p>
<p>users_controller.php</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> UsersController <span style="color: #000000; font-weight: bold;">extends</span> AppController <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> login<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">...</span></pre></td></tr></table></div>

<p>Feito estes ajustes é so criar as view e pronto o component Auth fará o resto.</p>
<p>ps: Ao adicionar um usuário o Auth se encaregará de fazer o hash da senhas.</p>
<p>até a proxima.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftgoncalves.com/2009/09/usando-o-component-auth-do-cakephp/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Paginação com dados HABTM CakePHP</title>
		<link>http://blog.ftgoncalves.com/2009/08/paginacao-com-dados-habtm-cakephp/</link>
		<comments>http://blog.ftgoncalves.com/2009/08/paginacao-com-dados-habtm-cakephp/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 19:23:23 +0000</pubDate>
		<dc:creator>Felipe Theodoro</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[cake php]]></category>
		<category><![CDATA[habtm]]></category>
		<category><![CDATA[paginação]]></category>
		<category><![CDATA[relacionamento]]></category>

		<guid isPermaLink="false">http://blog.ftgoncalves.com/?p=119</guid>
		<description><![CDATA[Paginação com dados de models relacionados com HABTM em CakePHP]]></description>
			<content:encoded><![CDATA[<p>Uma exelente receita de bolo para paginação entre dados que estão relacionados em HABTM</p>
<p><a href="http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/">http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftgoncalves.com/2009/08/paginacao-com-dados-habtm-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plugin PagSeguro para CakePHP</title>
		<link>http://blog.ftgoncalves.com/2009/07/plugin-pagseguro-para-cakephp/</link>
		<comments>http://blog.ftgoncalves.com/2009/07/plugin-pagseguro-para-cakephp/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 14:05:00 +0000</pubDate>
		<dc:creator>Felipe Theodoro</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[cake php]]></category>
		<category><![CDATA[pagseguro]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://blog.ftgoncalves.com/?p=73</guid>
		<description><![CDATA[Plugin para o CakePHP do PagSeguro, criando um checkOut em minutos sem complicação.]]></description>
			<content:encoded><![CDATA[<p><strong>Plugin PagSeguro</strong></p>
<p>Finalmente consegui achar tempo para fazer este plugin. A idéia dele é bem simples. Você tem à disposição um component e um helper. Você manda um array com todas as informações da compra para o component e ele reorganiza tais informações, passando para o padrão do PagSeguro. Após isso, é só mandar para view e chamar o helper para criar o form e os hiddens padrões.</p>
<p>Segue um exemplo:</p>
<p><strong>Utilizando o pligin</strong></p>
<p>Em seu controller, chame o component e o helper:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$components</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Pagseguro.PagSeguro?'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$helpers</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Pagseguro.Formpg'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Array padrão referente às informações necessárias e opcionais para o PagSeguro:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000088;">$sale</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'email_cobranca'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'tipo'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'CP'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'moeda'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'BRL'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'tipo_frete'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'SD'</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
        <span style="color: #0000ff;">'ref_transacao'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
        <span style="color: #0000ff;">'produto'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
           <span style="color:#800080;">1.</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                  <span style="color: #0000ff;">'item_id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span>
                  <span style="color: #0000ff;">'item_descr'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span>
                  <span style="color: #0000ff;">'item_valor'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span>
                  <span style="color: #0000ff;">'item_quant'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span>
                  <span style="color: #0000ff;">'item_frete'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
                  <span style="color: #0000ff;">'item_peso'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
                  <span style="color: #0000ff;">'item_quant'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span> 
            <span style="color: #009900;">&#41;</span> 
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
        <span style="color: #0000ff;">'cliente'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'nome'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'cep'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'end'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'num'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'compl'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'bairro'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'cidade'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'uf'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'pais'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'ddd'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'tel'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//opcional</span>
            <span style="color: #0000ff;">'email'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #666666; font-style: italic;">//opcional </span>
        <span style="color: #009900;">&#41;</span> 
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Arrumando valores referentes à dinheiro, se seu sistema jogar o valor com vírgula ou ponto. Exemplo: 30,99 ou 30.99.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$valor</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">PagSeguro</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">parcePagSeguro</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'30.98'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//retorno 3098;</span></pre></div></div>

<p>Setando os dados:</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;">PagSeguro</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setSale</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sale</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Arrumando no padrão e mandando para a view:</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;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'data'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">PagSeguro</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">generateInformation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Na view:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">echo</span> <span style="color: #000088;">$formpg</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">create</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">echo</span> <span style="color: #000088;">$formpg</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hidden</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">echo</span> <span style="color: #000088;">$formpg</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'img'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'btnFinalizar.jpg'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//opções: btnFinalizaBR.jpg btnConcluirBR.jpg btnFinalizar.jpg btnConcluir.jpg</span>
<span style="color: #990000;">echo</span> <span style="color: #000088;">$formpg</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">end</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Download</strong></p>
<p>Repositório em desenvolvimeto<strong><br />
</strong></p>
<p>svn checkout http://pagseguro.googlecode.com/svn/trunk/</p>
<p>Última versão estável</p>
<p>svn checkout http://pagseguro.googlecode.com/svn/tags/0.1.0</p>
<p>Site do oficial das ferramentas PagSeguro</p>
<p>http://visie.com.br/pagseguro/cake.php</p>
<p>Bugs, sugestões, duvídas ou elogios:<br />
<a href=" http://code.google.com/p/pagseguro/"><br />
http://code.google.com/p/pagseguro/</a></p>
<p> <img src='http://blog.ftgoncalves.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftgoncalves.com/2009/07/plugin-pagseguro-para-cakephp/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Evento CakeSP</title>
		<link>http://blog.ftgoncalves.com/2009/06/evento-cakesp/</link>
		<comments>http://blog.ftgoncalves.com/2009/06/evento-cakesp/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 18:14:59 +0000</pubDate>
		<dc:creator>Felipe Theodoro</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[cake php]]></category>
		<category><![CDATA[cakesp]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://blog.ftgoncalves.com/?p=65</guid>
		<description><![CDATA[
Segue Minha apresentação no evento 
E o link da minha página pessoal da slideshare http://www.slideshare.net/ftgoncalves
]]></description>
			<content:encoded><![CDATA[<div id="__ss_1576195" style="width: 425px; text-align: left;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=plugins-090612185647-phpapp02&amp;stripped_title=plugins" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=plugins-090612185647-phpapp02&amp;stripped_title=plugins" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<p>Segue Minha apresentação no evento <img src='http://blog.ftgoncalves.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
E o link da minha página pessoal da slideshare <a href="http://www.slideshare.net/ftgoncalves">http://www.slideshare.net/ftgoncalves</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftgoncalves.com/2009/06/evento-cakesp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Evento CakePHP em Sampa</title>
		<link>http://blog.ftgoncalves.com/2009/03/evento-cakephp-em-sampa/</link>
		<comments>http://blog.ftgoncalves.com/2009/03/evento-cakephp-em-sampa/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 19:59:10 +0000</pubDate>
		<dc:creator>Felipe Theodoro</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[cake php]]></category>
		<category><![CDATA[evento]]></category>
		<category><![CDATA[sp]]></category>

		<guid isPermaLink="false">http://blog.ftgoncalves.com/?p=44</guid>
		<description><![CDATA[Creio que uma parte importante de toda linguagem ou ferramenta seja as pessoas que lidam com ela! A comunidade CakePHP é bastante forte sendo seu maior núcleo nos EUA. Pensando nisso eu e o Renan cujo o mesmo faz parte do Core Developer, estamos bolando um evento que reúna desenvolvedores que lidam com o CakePHP [...]]]></description>
			<content:encoded><![CDATA[<p>Creio que uma parte importante de toda linguagem ou ferramenta seja as pessoas que lidam com ela! A comunidade CakePHP é bastante forte sendo seu maior núcleo nos EUA. Pensando nisso eu e o <a href="http://blog.renangoncalves.com/2009/03/05/evento-sobre-cakephp-em-sao-paulo/">Renan</a> cujo o mesmo faz parte do Core Developer, estamos bolando um evento que reúna desenvolvedores que lidam com o CakePHP ou somente PHP, para que seja fortalecida a comunidade&#8230;.<br />
Não temos ainda data nem local definido, mas assim que definido vamos divulga-lo.<br />
ps: O Evento não tem fins lucrativos!</p>
<p>Estou negociando com a LocaWeb para possível patrocínio.</p>
<p>E claro como o Renan disse no final do evento bora Bar!!!! <img src='http://blog.ftgoncalves.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftgoncalves.com/2009/03/evento-cakephp-em-sampa/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Um geral sobre php</title>
		<link>http://blog.ftgoncalves.com/2008/11/um-geral-sobre-php/</link>
		<comments>http://blog.ftgoncalves.com/2008/11/um-geral-sobre-php/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 11:02:20 +0000</pubDate>
		<dc:creator>Felipe Theodoro</dc:creator>
				<category><![CDATA[Programação]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[cake php]]></category>
		<category><![CDATA[Frameworks]]></category>

		<guid isPermaLink="false">http://blog.ftgoncalves.com/?p=6</guid>
		<description><![CDATA[Olá,este é meu primeiro post e espero que vocês gostem!
Bom neste post vou falar sobre a linguagem de programação que particularmente eu mais gosto. O php não é só uma linguagem rápida e versátil é também umas das linguagem de melhor posicionamento no mercado de trabalho hoje um profissional que lida com essa linguagem com [...]]]></description>
			<content:encoded><![CDATA[<p>Olá,este é meu primeiro post e espero que vocês gostem!<br />
Bom neste post vou falar sobre a linguagem de programação que particularmente eu mais gosto. O php não é só uma linguagem rápida e versátil é também umas das linguagem de melhor posicionamento no mercado de trabalho hoje um profissional que lida com essa linguagem com certeza não ficará desempregado. Não só pelo fato de ser uma linguagem fácil de programar mais por sua versatilidade, para ilustrar falando em produtividade hoje em dia existem vários frameworks para trabalhar com php como por exemplo Zend que é da própria mantenedora da linguagem php, existem também o CakePHP que foi muito bem aceito pelos grupos e empresas que lidam com php e um outro ótimo framework é o CodeIgniter agora falando de gente grande o Symfony é um framework muito bem falado internacionalmente e utilizado por uma grande empresa a Yahoo. Todos frameworks citados acima são Open Source <span> </span>e com documentação bastante vasta segue abaixo uma tabela comparando-os.</p>
<p class="MsoNormal"> </p>
<div id="attachment_7" class="wp-caption aligncenter" style="width: 510px"><a class="thickbox" href="http://blog.ftgoncalves.com/wp-content/uploads/2008/11/gf.gif"><img class="size-medium wp-image-7 ngg-singlepic  " title="Tabela Comparativa" src="http://blog.ftgoncalves.com/wp-content/uploads/2008/11/gf-300x166.gif" alt="Tabela Comparativa de frameworks" width="500" height="366" /></a><p class="wp-caption-text">Tabela Comparativa de frameworks</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftgoncalves.com/2008/11/um-geral-sobre-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
