<?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>映像とその周辺 &#187; CakePHP</title>
	<atom:link href="http://www.kalium.net/image/tag/cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kalium.net/image</link>
	<description></description>
	<lastBuildDate>Sun, 13 Nov 2011 03:36:10 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>CakePHP1.3でページタイトルの設定</title>
		<link>http://www.kalium.net/image/2011/05/18/cakephp1-3%e3%81%a7%e3%83%9a%e3%83%bc%e3%82%b8%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%ae%e8%a8%ad%e5%ae%9a/</link>
		<comments>http://www.kalium.net/image/2011/05/18/cakephp1-3%e3%81%a7%e3%83%9a%e3%83%bc%e3%82%b8%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%ae%e8%a8%ad%e5%ae%9a/#comments</comments>
		<pubDate>Wed, 18 May 2011 02:45:49 +0000</pubDate>
		<dc:creator>araken</dc:creator>
				<category><![CDATA[PHP, PostgreSQL]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.kalium.net/image/?p=1179</guid>
		<description><![CDATA[CakePHP1.3でページタイトルを設定する方法が変わった Controllerのアクション内で、 というように設定 View内では、 と、これまで通りに出力]]></description>
			<content:encoded><![CDATA[<p>CakePHP1.3でページタイトルを設定する方法が変わった</p>
<p>Controllerのアクション内で、</p>
<pre class="brush: php; title: ; notranslate">
$this-&gt;set('title_for_layout', &quot;ページタイトル&quot;);
</pre>
<p>というように設定</p>
<p>View内では、</p>
<pre class="brush: php; title: ; notranslate">
echo $title_for_layout;
</pre>
<p>と、これまで通りに出力</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalium.net/image/2011/05/18/cakephp1-3%e3%81%a7%e3%83%9a%e3%83%bc%e3%82%b8%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%ae%e8%a8%ad%e5%ae%9a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHPでhasOneな関連モデルも同時に削除する設定</title>
		<link>http://www.kalium.net/image/2011/02/20/hasone%e3%81%aa%e9%96%a2%e9%80%a3%e3%83%a2%e3%83%87%e3%83%ab%e3%82%82%e5%90%8c%e6%99%82%e3%81%ab%e5%89%8a%e9%99%a4%e3%81%99%e3%82%8b%e8%a8%ad%e5%ae%9a/</link>
		<comments>http://www.kalium.net/image/2011/02/20/hasone%e3%81%aa%e9%96%a2%e9%80%a3%e3%83%a2%e3%83%87%e3%83%ab%e3%82%82%e5%90%8c%e6%99%82%e3%81%ab%e5%89%8a%e9%99%a4%e3%81%99%e3%82%8b%e8%a8%ad%e5%ae%9a/#comments</comments>
		<pubDate>Sun, 20 Feb 2011 04:41:09 +0000</pubDate>
		<dc:creator>araken</dc:creator>
				<category><![CDATA[PHP, PostgreSQL]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.kalium.net/image/?p=1165</guid>
		<description><![CDATA[親Modelに、以下の様に記述する。]]></description>
			<content:encoded><![CDATA[<p>親Modelに、以下の様に記述する。</p>
<pre class="brush: php; title: ; notranslate">
  public $hasOne = array(
    &quot;Profile&quot; =&gt; array(
      &quot;className&quot; =&gt; 'Profile',
      &quot;dependent&quot;=&gt;true, //ここで同時に削除するように指定
      &quot;foreignKey&quot;=&gt;'user_id',
    );
  );
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kalium.net/image/2011/02/20/hasone%e3%81%aa%e9%96%a2%e9%80%a3%e3%83%a2%e3%83%87%e3%83%ab%e3%82%82%e5%90%8c%e6%99%82%e3%81%ab%e5%89%8a%e9%99%a4%e3%81%99%e3%82%8b%e8%a8%ad%e5%ae%9a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHPで、新規作成時に、関連するModelを一緒に追加する</title>
		<link>http://www.kalium.net/image/2011/02/20/%e6%96%b0%e8%a6%8f%e4%bd%9c%e6%88%90%e6%99%82%e3%81%ab%e3%80%81%e9%96%a2%e9%80%a3%e3%81%99%e3%82%8bmodel%e3%82%92%e4%b8%80%e7%b7%92%e3%81%ab%e8%bf%bd%e5%8a%a0%e3%81%99%e3%82%8b/</link>
		<comments>http://www.kalium.net/image/2011/02/20/%e6%96%b0%e8%a6%8f%e4%bd%9c%e6%88%90%e6%99%82%e3%81%ab%e3%80%81%e9%96%a2%e9%80%a3%e3%81%99%e3%82%8bmodel%e3%82%92%e4%b8%80%e7%b7%92%e3%81%ab%e8%bf%bd%e5%8a%a0%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Sun, 20 Feb 2011 04:35:32 +0000</pubDate>
		<dc:creator>araken</dc:creator>
				<category><![CDATA[PHP, PostgreSQL]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.kalium.net/image/?p=1160</guid>
		<description><![CDATA[Userテーブルに新規登録する時に、Userのメタ情報などが入っているUserProfileなどのテーブルに、同時にレコードを登録する方法。 データを保存する :: モデル :: CakePHPによる開発 :: マニュア [...]]]></description>
			<content:encoded><![CDATA[<p>Userテーブルに新規登録する時に、Userのメタ情報などが入っているUserProfileなどのテーブルに、同時にレコードを登録する方法。</p>
<p><a href="http://book.cakephp.org/ja/view/1031/%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E4%BF%9D%E5%AD%98%E3%81%99%E3%82%8B">データを保存する :: モデル :: CakePHPによる開発 :: マニュアル :: 1.3コレクション</a>からのコピペですがメモ。</p>
<pre class="brush: php; title: ; notranslate">
function add() {
	if (!empty($this-&gt;data)) {
		// User モデルのデータを保存します。
		// このデータは $this-&gt;data['User'] にあります。

		$user = $this-&gt;User-&gt;save($this-&gt;data);

		// User が保存されたら、Profile データに User の情報を追加し
		// 保存します。
		if (!empty($user)) {
			// 新しく生成した User の ID は、
			// $this-&gt;User-&gt;id にセットされます。
			$this-&gt;data['Profile']['user_id'] = $this-&gt;User-&gt;id;

			// User は Profile と hasOne のアソシエーションで関連付いているので
			// User モデルを通して Profile モデルにアクセスできます:
			$this-&gt;User-&gt;Profile-&gt;save($this-&gt;data);
		}
	}
}
</pre>
<p>要は、親Modelのaddに同時に追加する処理を書くと言うこと…。ここら辺も、自動化されると楽だなぁと思ったり。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalium.net/image/2011/02/20/%e6%96%b0%e8%a6%8f%e4%bd%9c%e6%88%90%e6%99%82%e3%81%ab%e3%80%81%e9%96%a2%e9%80%a3%e3%81%99%e3%82%8bmodel%e3%82%92%e4%b8%80%e7%b7%92%e3%81%ab%e8%bf%bd%e5%8a%a0%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1.3.xでは、Sessionは自動的に読み込まれない</title>
		<link>http://www.kalium.net/image/2010/10/17/1-3-x%e3%81%a7%e3%81%af%e3%80%81session%e3%81%af%e8%87%aa%e5%8b%95%e7%9a%84%e3%81%ab%e8%aa%ad%e3%81%bf%e8%be%bc%e3%81%be%e3%82%8c%e3%81%aa%e3%81%84/</link>
		<comments>http://www.kalium.net/image/2010/10/17/1-3-x%e3%81%a7%e3%81%af%e3%80%81session%e3%81%af%e8%87%aa%e5%8b%95%e7%9a%84%e3%81%ab%e8%aa%ad%e3%81%bf%e8%be%bc%e3%81%be%e3%82%8c%e3%81%aa%e3%81%84/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 14:34:03 +0000</pubDate>
		<dc:creator>araken</dc:creator>
				<category><![CDATA[PHP, PostgreSQL]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.kalium.net/image/?p=1100</guid>
		<description><![CDATA[CakePHP1.3では、Session Helper, Session Componentは自動的に読み込まれないので、明示的に読み込む必要がある。bakeしたview内で用いられているSetFlashメソッドすらエラ [...]]]></description>
			<content:encoded><![CDATA[<p>CakePHP1.3では、Session Helper, Session Componentは自動的に読み込まれないので、明示的に読み込む必要がある。bakeしたview内で用いられているSetFlashメソッドすらエラーが出る始末。慣れないとめんどい。</p>
<pre class="brush: php; title: ; notranslate">
	var $components = array('Session');
	var $helpers = array('Session');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kalium.net/image/2010/10/17/1-3-x%e3%81%a7%e3%81%af%e3%80%81session%e3%81%af%e8%87%aa%e5%8b%95%e7%9a%84%e3%81%ab%e8%aa%ad%e3%81%bf%e8%be%bc%e3%81%be%e3%82%8c%e3%81%aa%e3%81%84/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHPで使うDBのテーブル名に接頭辞</title>
		<link>http://www.kalium.net/image/2010/10/17/cakephp%e3%81%a7%e4%bd%bf%e3%81%86db%e3%81%ae%e3%83%86%e3%83%bc%e3%83%96%e3%83%ab%e5%90%8d%e3%81%ab%e6%8e%a5%e9%a0%ad%e8%be%9e/</link>
		<comments>http://www.kalium.net/image/2010/10/17/cakephp%e3%81%a7%e4%bd%bf%e3%81%86db%e3%81%ae%e3%83%86%e3%83%bc%e3%83%96%e3%83%ab%e5%90%8d%e3%81%ab%e6%8e%a5%e9%a0%ad%e8%be%9e/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 13:34:29 +0000</pubDate>
		<dc:creator>araken</dc:creator>
				<category><![CDATA[PHP, PostgreSQL]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.kalium.net/image/?p=1096</guid>
		<description><![CDATA[CakePHPで使うDBのテーブル名に接頭辞を付けて使うには、app/config/database.phpで以下のように記述する。]]></description>
			<content:encoded><![CDATA[<p>CakePHPで使うDBのテーブル名に接頭辞を付けて使うには、<i>app</i>/config/database.phpで以下のように記述する。</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
class DATABASE_CONFIG {

	var $default = array(
		'driver' =&gt; 'mysql',
		'persistent' =&gt; false,
		'host' =&gt; 'localhost',
		'login' =&gt; 'user_name',
		'password' =&gt; '',
		'database' =&gt; 'database',
		'encoding' =&gt; 'utf8',
	    'prefix' =&gt; 'prefix_', //here
	);
}
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kalium.net/image/2010/10/17/cakephp%e3%81%a7%e4%bd%bf%e3%81%86db%e3%81%ae%e3%83%86%e3%83%bc%e3%83%96%e3%83%ab%e5%90%8d%e3%81%ab%e6%8e%a5%e9%a0%ad%e8%be%9e/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP 1.3.x was released&#8230;</title>
		<link>http://www.kalium.net/image/2010/07/31/cakephp-1-3-x-was-released/</link>
		<comments>http://www.kalium.net/image/2010/07/31/cakephp-1-3-x-was-released/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 04:30:19 +0000</pubDate>
		<dc:creator>araken</dc:creator>
				<category><![CDATA[PHP, PostgreSQL]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.kalium.net/image/2010/07/31/cakephp-1-3-x-was-released/</guid>
		<description><![CDATA[CakePHP 1.3が出ていたとは、知らなかった。ここに、差分内容が載っている。 【CakePHP】1.2→1.3のマイグレーションガイド]]></description>
			<content:encoded><![CDATA[<p>CakePHP 1.3が出ていたとは、知らなかった。ここに、差分内容が載っている。</p>
<p><a href="http://planetcakephp.org/aggregator/items/2807-%E3%80%90cakephp%E3%80%9112%E2%86%9213%E3%81%AE%E3%83%9E%E3%82%A4%E3%82%B0%E3%83%AC%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%AC%E3%82%A4%E3%83%89">【CakePHP】1.2→1.3のマイグレーションガイド</a><br />
<blockquote></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.kalium.net/image/2010/07/31/cakephp-1-3-x-was-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pleskでつくるユーザの謎</title>
		<link>http://www.kalium.net/image/2010/07/21/plesk%e3%81%a7%e3%81%a4%e3%81%8f%e3%82%8b%e3%83%a6%e3%83%bc%e3%82%b6%e3%81%ae%e8%ac%8e/</link>
		<comments>http://www.kalium.net/image/2010/07/21/plesk%e3%81%a7%e3%81%a4%e3%81%8f%e3%82%8b%e3%83%a6%e3%83%bc%e3%82%b6%e3%81%ae%e8%ac%8e/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 10:12:57 +0000</pubDate>
		<dc:creator>araken</dc:creator>
				<category><![CDATA[PHP, PostgreSQL]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Plesk]]></category>

		<guid isPermaLink="false">http://www.kalium.net/image/?p=1049</guid>
		<description><![CDATA[Pleskでつくるドメイン毎のユーザでは、CakePHPのshellをうまく実行できない。こういうエラーが出てしまう。 PHP Fatal error: Class 'AppModel' not found in /va [...]]]></description>
			<content:encoded><![CDATA[<p>Pleskでつくるドメイン毎のユーザでは、CakePHPのshellをうまく実行できない。こういうエラーが出てしまう。</p>
<p><code>
<pre>
PHP Fatal error:  Class 'AppModel' not found in /var/www/vhosts/...
</pre>
<p></code></p>
<p>普通に、adduserなどで作ったユーザはうまく行くのだが。おそらく、PATHの関係なのだと思うが、未だ原因がわからない。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalium.net/image/2010/07/21/plesk%e3%81%a7%e3%81%a4%e3%81%8f%e3%82%8b%e3%83%a6%e3%83%bc%e3%82%b6%e3%81%ae%e8%ac%8e/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHPで静的ページへのユーザ認証を除去</title>
		<link>http://www.kalium.net/image/2010/04/08/cakephp%e3%81%a7%e9%9d%99%e7%9a%84%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%b8%e3%81%ae%e3%83%a6%e3%83%bc%e3%82%b6%e8%aa%8d%e8%a8%bc%e3%82%92%e9%99%a4%e5%8e%bb/</link>
		<comments>http://www.kalium.net/image/2010/04/08/cakephp%e3%81%a7%e9%9d%99%e7%9a%84%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%b8%e3%81%ae%e3%83%a6%e3%83%bc%e3%82%b6%e8%aa%8d%e8%a8%bc%e3%82%92%e9%99%a4%e5%8e%bb/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 14:01:59 +0000</pubDate>
		<dc:creator>araken</dc:creator>
				<category><![CDATA[PHP, PostgreSQL]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.kalium.net/image/?p=1024</guid>
		<description><![CDATA[CakePHPで認証付きの静的ページを作る &#124; Web活メモ帳を参考に、CakePHPでの静的ページへのユーザ認証を解除したのメモを。 なぜ、こんな処理が必要になったかというと、AppController内で、Authコ [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.verygoodtown.com/2010/02/cakephp1-2-admin-page/">CakePHPで認証付きの静的ページを作る | Web活メモ帳</a>を参考に、CakePHPでの静的ページへのユーザ認証を解除したのメモを。</p>
<p>なぜ、こんな処理が必要になったかというと、AppController内で、Authコンポーネントを有効にしたため。Controller全体にユーザ認証が効くようになったが、ユーザ認証無しでの公開を前提としている静的ページまでも、ユーザ認証が求められるようになったため、ユーザ認証を無効化する必要性が発生した。</p>
<p>AppControllerのbeforeFilterで、以下のように記述する。</p>
<pre class="brush: php; title: ; notranslate">
function beforeFilter()
{
        // pages controllerかどうかをチェック
        // Pagesだったら、ユーザ認証は行わない
        if ($this-&gt;name == 'Pages')
        {
            $this-&gt;Auth-&gt;allow('*');
        }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kalium.net/image/2010/04/08/cakephp%e3%81%a7%e9%9d%99%e7%9a%84%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%b8%e3%81%ae%e3%83%a6%e3%83%bc%e3%82%b6%e8%aa%8d%e8%a8%bc%e3%82%92%e9%99%a4%e5%8e%bb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHPのタイムゾーンをローカル設定にする方法</title>
		<link>http://www.kalium.net/image/2010/03/29/cakephp%e3%81%ae%e3%82%bf%e3%82%a4%e3%83%a0%e3%82%be%e3%83%bc%e3%83%b3%e3%82%92%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%ab%e8%a8%ad%e5%ae%9a%e3%81%ab%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95/</link>
		<comments>http://www.kalium.net/image/2010/03/29/cakephp%e3%81%ae%e3%82%bf%e3%82%a4%e3%83%a0%e3%82%be%e3%83%bc%e3%83%b3%e3%82%92%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%ab%e8%a8%ad%e5%ae%9a%e3%81%ab%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 20:04:41 +0000</pubDate>
		<dc:creator>araken</dc:creator>
				<category><![CDATA[PHP, PostgreSQL]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.kalium.net/image/?p=1004</guid>
		<description><![CDATA[PHP5.3対応とかで、初期設定のタイムゾーンが勝手にUTCになっている。これを解決するには、 app/config/core.phpの以下の部分をコメントアウトすれば、php.iniの設定が読み込まれる。特に、php. [...]]]></description>
			<content:encoded><![CDATA[<p>PHP5.3対応とかで、初期設定のタイムゾーンが勝手にUTCになっている。これを解決するには、<br />
app/config/core.phpの以下の部分をコメントアウトすれば、php.iniの設定が読み込まれる。特に、php.iniでタイムゾーンを設定していなければ、ローカルのタイムゾーン設定が反映される。</p>
<pre class="brush: php; title: ; notranslate">
/**
 * If you are on PHP 5.3 uncomment this line and correct your server timezone
 * to fix the date &amp; time related errors.
 */
//	date_default_timezone_set('UTC');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kalium.net/image/2010/03/29/cakephp%e3%81%ae%e3%82%bf%e3%82%a4%e3%83%a0%e3%82%be%e3%83%bc%e3%83%b3%e3%82%92%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%ab%e8%a8%ad%e5%ae%9a%e3%81%ab%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHPでModelの全削除</title>
		<link>http://www.kalium.net/image/2010/03/28/cakephp%e3%81%a7model%e3%81%ae%e5%85%a8%e5%89%8a%e9%99%a4/</link>
		<comments>http://www.kalium.net/image/2010/03/28/cakephp%e3%81%a7model%e3%81%ae%e5%85%a8%e5%89%8a%e9%99%a4/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 04:23:28 +0000</pubDate>
		<dc:creator>araken</dc:creator>
				<category><![CDATA[PHP, PostgreSQL]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.kalium.net/image/?p=998</guid>
		<description><![CDATA[ダミーの条件を入れると全削除。]]></description>
			<content:encoded><![CDATA[<pre class="brush: php; title: ; toolbar: true; notranslate">
$conditions = array( &quot;1 = 1&quot; ); //dummyの条件
$this-&gt;MyModel-&gt;deleteAll( $conditions, false ) ) //MyModelの全削除
</pre>
<p>ダミーの条件を入れると全削除。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalium.net/image/2010/03/28/cakephp%e3%81%a7model%e3%81%ae%e5%85%a8%e5%89%8a%e9%99%a4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

