This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DumpSchemaCommand extends CConsoleCommand | |
{ | |
/** | |
* @see CConsoleCommand::getHelp() | |
*/ | |
public function getHelp() | |
{ | |
return <<<EOD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
skip-character-set-client-handshake | |
character-set-server=utf8 | |
[mysql] | |
default-character-set=utf8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /Applications/MAMP/bin/php/php5.4.4/bin | |
pear upgrade-all | |
sudo pear config-set auto_discover 1 | |
pear install --force --alldeps pear.phpunit.de/PHPUnit | |
pear install phpunit/PHPUnit_Selenium | |
pear install phpunit/DbUnit | |
pear install phpunit/PHPUnit_Story |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# エラー表示 | |
display_errors = On | |
# タイムゾーン | |
date.timezone = "Asia/Tokyo" | |
# 文字コード | |
default_charset = "UTF-8" | |
mbstring.language = Japanese | |
mbstring.internal_encoding = UTF-8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="form"> | |
<?php if ($item->scenario !== 'update'): ?> | |
<?php echo CHtml::statefulForm('', 'post', array('enctype' => 'multipart/form-data')); ?> | |
<?php echo CHtml::hiddenField('MAX_FILE_SIZE', '1000000'); ?> | |
<?php else: ?> | |
<?php echo CHtml::statefulForm(); ?> | |
<?php endif; ?> | |
<?php echo CHtml::errorSummary($item); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public $helpers = array( | |
'Form' => array( | |
'inputDefaults' => array( | |
'label' => false, | |
'div' => false, | |
'error' => false, | |
), | |
), | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ItemController extends Controller | |
{ | |
... | |
/** | |
* Creates a new item. | |
*/ | |
public function actionCreate1() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* データを全件取得。ついでにページネーションとソートも | |
*/ | |
public function getAll() | |
{ | |
$c = new CDbCriteria(); | |
return array( | |
$this->getPages($c), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="form"> | |
<?php echo CHtml::statefulForm(); ?> | |
<?php if ($item->scenario !== 'change'): ?> | |
<div class="row"> | |
<?php echo CHtml::activeLabel($item, 'title'); ?> | |
<?php echo CHtml::encode($item->title); ?> | |
</div><!-- /.row --> | |
<?php endif; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
private function resolveDestPath($fileDest) | |
{ | |
//if (strpos($fileDest, DIRECTORY_SEPARATOR)===false) | |
//return $this->dirname.DIRECTORY_SEPARATOR.$fileDest; | |
return $this->realPath($fileDest); | |
} |