FuelPHP

File::move() は存在してない。

FuelPHP のバージョンは 1.6 です。 ドキュメントの File_Handler_File::move() には The move method is a shortcut to File::move. http://fuelphp.com/docs/classes/file/handlers.html#/method_file_move つまり File::move() のショートカットだと書か…

FuelPHP1.6 の Orm\Model::find() で取得した Model からデータを取り出す。

$entry = Model_Hoge::find($id); とした時に、レコードを連想配列で取り出すには to_array()を使う。 これでViewに渡したりできるようになる。 $entry = Model_Hoge::find($id); $record = $entry->to_array(); return Response::forge(View::forge('view',…

FuelPHP1.6 の oil generate model で SET や ENUM 型のカラムを作る

MySQL は 5.5.31-0ubuntu0.12.04.2 $ oil generate model table_name column1:set['one','two','three'] column2:enum['a','b','c']とか。重要なのは要素の間にスペースを入れないこと。例えば column1:set['one', 'two', 'three']って書いちゃうと、中身が…