svnno****@sourc*****
svnno****@sourc*****
2010年 1月 24日 (日) 00:04:30 JST
Revision: 799 http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=799 Author: rsk Date: 2010-01-24 00:04:30 +0900 (Sun, 24 Jan 2010) Log Message: ----------- expack: - P2KeyValueStoreã«Simple CSV Codecã追å ã - P2KeyValueStoreã§ãã¼ãã«ä½æåã«ããªãã¢ã¼ãã¹ãã¼ãã¡ã³ãã ã¯ãªã¢ããããã«ä¿®æ£ã Modified Paths: -------------- p2ex/trunk/lib/P2KeyValueStore.php p2ex/trunk/lib/bootstrap.php Added Paths: ----------- p2ex/trunk/lib/P2KeyValueStore/Codec/SimpleCSV.php -------------- next part -------------- Added: p2ex/trunk/lib/P2KeyValueStore/Codec/SimpleCSV.php =================================================================== --- p2ex/trunk/lib/P2KeyValueStore/Codec/SimpleCSV.php (rev 0) +++ p2ex/trunk/lib/P2KeyValueStore/Codec/SimpleCSV.php 2010-01-23 15:04:30 UTC (rev 799) @@ -0,0 +1,82 @@ +<?php + +// {{{ P2KeyValueStore_Codec_SimpleCSV + +/** + * zñÆCSVÌÝÏ·ð·éCodec + * + * PÉlðJ}Å implode()/explode() ·é¾¯ÅAf[^ÌØ͵ȢB + * zñÌSvfÍUTF-8 (ܽÍUS-ASCII) ̶ñÅȯêÎÈçÈ¢B + */ +class P2KeyValueStore_Codec_SimpleCSV implements P2KeyValueStore_Codec_Interface +{ + // {{{ encodeKey() + + /** + * L[Í»ÌÜÜ + * + * @param string $key + * @return string + */ + public function encodeKey($key) + { + return $key; + } + + // }}} + // {{{ decodeKey() + + /** + * L[Í»ÌÜÜ + * + * @param string $key + * @return string + */ + public function decodeKey($key) + { + return $key; + } + + // }}} + // {{{ encodeValue() + + /** + * lð·é + * + * @param array $array + * @return string + */ + public function encodeValue($array) + { + return implode(',', $array); + } + + // }}} + // {{{ decodeValue() + + /** + * lðª·é + * + * @param string $value + * @return array + */ + public function decodeValue($value) + { + return explode(',', $value); + } + + // }}} +} + +// }}} + +/* + * Local Variables: + * mode: php + * coding: cp932 + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ +// vim: set syn=php fenc=cp932 ai et ts=4 sw=4 sts=4 fdm=marker: Modified: p2ex/trunk/lib/P2KeyValueStore.php =================================================================== --- p2ex/trunk/lib/P2KeyValueStore.php 2010-01-22 12:22:01 UTC (rev 798) +++ p2ex/trunk/lib/P2KeyValueStore.php 2010-01-23 15:04:30 UTC (rev 799) @@ -45,6 +45,7 @@ const CODEC_ARRAYSHIFTJIS = 'P2KeyValueStore_Codec_ArrayShiftJIS'; const CODEC_JSON = 'P2KeyValueStore_Codec_JSON'; const CODEC_JSONSHIFTJIS = 'P2KeyValueStore_Codec_JSONShiftJIS'; + const CODEC_SIMPLECSV = 'P2KeyValueStore_Codec_SimpleCSV'; const MEMORY_DATABASE = ':memory:'; @@ -211,6 +212,8 @@ // ³¯êÎìé if (!$exists) { + // æÉì¬ÏÝvyA[hXe[ggðNA + self::$_stmtCache[$this->_pdoId] = array(); $pdo->exec(str_replace('$__table', $this->_quotedTableName, self::Q_CREATETABLE)); } } Modified: p2ex/trunk/lib/bootstrap.php =================================================================== --- p2ex/trunk/lib/bootstrap.php 2010-01-22 12:22:01 UTC (rev 798) +++ p2ex/trunk/lib/bootstrap.php 2010-01-23 15:04:30 UTC (rev 799) @@ -189,11 +189,8 @@ // NTT docomo i[h if ($mobile->isDoCoMo()) { - if (UA::isIModeBrowser2()) { - $_conf['use_cookies'] = true; - } else { - $_conf['use_cookies'] = false; - } + // i[huEU2.0©çCookieÉεĢé + $_conf['use_cookies'] = UA::isIModeBrowser2(); // au EZweb //} elseif ($mobile->isEZweb()) {