Ethna2.6のbeta2とbeta3の差分を調査してみた。
--- Ethna-2.6.2011010402/Ethna.php 2011-01-04 02:46:49.000000000 +0900
+++ Ethna-2.6.0beta2011102522/Ethna.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -53,3 +53,3 @@
/** バージョン定義 */
-define('ETHNA_VERSION', '2.6.0-beta2');
+define('ETHNA_VERSION', '2.6.0-beta3');
@@ -311,6 +311,2 @@
-/** PHP 5との互換保持定義 */
-if (defined('E_STRICT') == false) {
- define('E_STRICT', 2048);
-}
if (defined('E_DEPRECATED') == false) {
@@ -461,6 +457,6 @@
*/
- public static function handleError(&$error)
+ public static function handleError($error)
{
for ($i = 0; $i < count($GLOBALS['_Ethna_error_callback_list']); $i++) {
- $callback =& $GLOBALS['_Ethna_error_callback_list'][$i];
+ $callback = $GLOBALS['_Ethna_error_callback_list'][$i];
if (is_array($callback) == false) {
@@ -468,3 +464,3 @@
} else if (is_object($callback[0])) {
- $object =& $callback[0];
+ $object = $callback[0];
$method = $callback[1];
Only in Ethna-2.6.2011010402: README
Only in Ethna-2.6.0beta2011102522: README.rst
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/bin/ethna.bat Ethna-2.6.0beta2011102522/bin/ethna.bat
--- Ethna-2.6.2011010402/bin/ethna.bat 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/bin/ethna.bat 2011-10-25 22:50:53.000000000 +0900
@@ -7,3 +7,3 @@
rem
rem
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/bin/ethna.sh Ethna-2.6.0beta2011102522/bin/ethna.sh
--- Ethna-2.6.2011010402/bin/ethna.sh 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/bin/ethna.sh 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
#
#
@@ -20,2 +20,3 @@
ETHNA_HOME="$PWD""/lib/Ethna"
+ DOT_ETHNA="$PWD""/.ethna"
break
@@ -31,2 +32,3 @@
fi
+ DOT_ETHNA=""
break
@@ -56,2 +58,2 @@
-$PHP_COMMAND -d html_errors=off -qC $ETHNA_HOME/bin/ethna_handle.php $*
+DOT_ETHNA=$DOT_ETHNA $PHP_COMMAND -d html_errors=off -d error_reporting="E_ALL & ~E_DEPRECATED" -qC $ETHNA_HOME/bin/ethna_handle.php $*
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/bin/ethna_handle.php Ethna-2.6.0beta2011102522/bin/ethna_handle.php
--- Ethna-2.6.2011010402/bin/ethna_handle.php 2011-01-04 02:56:36.000000000 +0900
+++ Ethna-2.6.0beta2011102522/bin/ethna_handle.php 2011-10-25 22:50:53.000000000 +0900
@@ -9,3 +9,3 @@
* @package Ethna
*/
@@ -31,2 +31,6 @@
$eh = new Ethna_Handle();
+if ($dot_ethna = getenv('DOT_ETHNA')) {
+ $app_controller = Ethna_Handle::getAppController(dirname($dot_ethna));
+}
+
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/bin/ethna_make_package.php Ethna-2.6.0beta2011102522/bin/ethna_make_package.php
--- Ethna-2.6.2011010402/bin/ethna_make_package.php 2011-01-04 02:50:57.000000000 +0900
+++ Ethna-2.6.0beta2011102522/bin/ethna_make_package.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -40,9 +40,10 @@
-// x.0.y -> beta
-// x.1.y -> stable
-$major_version = "2.6";
-$minor_version = "0";
+require_once dirname(__FILE__) . '/../Ethna.php';
+
+$version_array = explode('.', ETHNA_VERSION);
+$major_version = implode('.', array_slice($version_array, 0, 2));
+$minor_version = implode('', array_slice(explode('-', $version_array[2]), 0, 1));
if ($state == 'alpha' || $state == 'beta') {
- $version = $major_version . strftime('.%Y%m%d%H');
+ $version = $major_version . "." . $minor_version . $state . strftime('%Y%m%d%H');
} else {
@@ -60,3 +61,6 @@
'filelistgenerator' => 'file',
- 'ignore' => array('CVS/', '.svn/', 'package.xml', 'ethna_make_package.php', 'ethna_make_package.sh', '*optional_package*', ),
+ 'ignore' => array(
+ 'CVS/', '.svn/', 'package.xml', 'ethna_make_package.php', 'ethna_make_package.sh', '*optional_package*', 'coverage/',
+ '.gitignore', '.gitattributes',
+ ),
'changelogoldtonew' => false,
@@ -85,4 +89,4 @@
-$packagexml->setPhpDep('4.1.0');
-$packagexml->setPearinstallerDep('1.3.5');
+$packagexml->setPhpDep('5.2.0');
+$packagexml->setPearinstallerDep('1.9.0');
$packagexml->addPackageDepWithChannel('optional', 'DB', 'pear.php.net');
@@ -90,2 +94,3 @@
$packagexml->addPackageDepWithChannel('optional', 'simpletest', $ethna_channel);
+$packagexml->addPackageDepWithChannel('optional', 'Smarty3', $ethna_channel);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/bin/ethna_make_package.sh Ethna-2.6.0beta2011102522/bin/ethna_make_package.sh
--- Ethna-2.6.2011010402/bin/ethna_make_package.sh 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/bin/ethna_make_package.sh 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
#
#
@@ -43,2 +43,4 @@
optpkg_dir="$targetdir/misc/optional_package"
+
+# Smarty2
mkdir $optpkg_dir/Smarty/release
@@ -50,2 +52,13 @@
cp $optpkg_dir/Smarty/release/*.tgz $tmpdir
+
+# Smarty3
+mkdir $optpkg_dir/Smarty3/release
+cd $optpkg_dir/Smarty3/src
+tar xvfz Smarty*.tar.gz
+cd $optpkg_dir/Smarty3/build
+chmod +x ./build
+./build
+cp $optpkg_dir/Smarty3/release/*.tgz $tmpdir
+
+# simpletest 1.0
mkdir $optpkg_dir/simpletest/release
@@ -57,2 +70,12 @@
cp $optpkg_dir/simpletest/release/*.tgz $tmpdir
+
+# simpletest 1.1
+mkdir $optpkg_dir/simpletest1.1/release
+cd $optpkg_dir/simpletest1.1/src
+tar xvfz simpletest*.tar.gz
+cd $optpkg_dir/simpletest1.1/build
+chmod +x ./build
+./build
+cp $optpkg_dir/simpletest1.1/release/*.tgz $tmpdir
+
rm -rf $optpkg_dir
@@ -60,3 +83,3 @@
-find $targetdir -name "CVS" -o -name ".svn" | xargs rm -fr
+find $targetdir -name "CVS" -o -name ".git*" | xargs rm -fr
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/bin/ethna_run_test.php Ethna-2.6.0beta2011102522/bin/ethna_run_test.php
--- Ethna-2.6.2011010402/bin/ethna_run_test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/bin/ethna_run_test.php 2011-10-25 22:50:53.000000000 +0900
@@ -9,3 +9,3 @@
* @package Ethna
*/
@@ -47,2 +47,8 @@
+// simpletest を使っているため、E_DEPRECATED, E_STRICT は解除
+error_reporting(error_reporting() & ~E_DEPRECATED & ~E_STRICT);
+if (extension_loaded('xdebug')) {
+ ini_set('xdebug.scream', 0);
+}
+
/** SimpleTestのインクルード */
@@ -50,2 +56,3 @@
require_once 'simpletest/reporter.php';
+require_once $test_dir . '/TextSimpleReporter.php';
require_once $test_dir . '/TextDetailReporter.php';
@@ -53,3 +60,3 @@
-$test = new GroupTest('Ethna All tests');
+$test = new TestSuite('Ethna All tests');
@@ -59,4 +66,24 @@
$args = $opt->readPHPArgv();
-list($args, $opts) = $opt->getopt($args, '', array());
-array_shift($opts);
+array_shift($args);
+$opt_ret = $opt->getopt($args, "", array('coverage', 'verbose'));
+if (Ethna::isError($opt_ret)) {
+ echo $opt_ret->getMessage(), PHP_EOL;
+ exit(255);
+}
+list($args, $opts) = $opt_ret;
+
+$coverage = false;
+$verbose = false;
+foreach ($args as $arg) {
+ switch ($arg[0]) {
+ case '--coverage':
+ $coverage = true;
+ break;
+
+ case '--verbose':
+ $verbose = true;
+ break;
+ }
+}
+
if (count($opts) > 0) {
@@ -69,3 +96,24 @@
foreach ($file_list as $file) {
- $test->addTestFile($file);
+ $test->addFile($file);
+}
+
+if ($coverage) {
+ // カバレッジ計測開始
+ require_once 'PHP/CodeCoverage.php';
+
+ $base = dirname(dirname(__FILE__));
+
+ $filter = PHP_CodeCoverage_Filter::getInstance();
+ $filter->addDirectoryToBlacklist($base.'/test');
+ $filter->addDirectoryToBlacklist($base . '/src');
+ $filter->addDirectoryToBlacklist($base . '/bin');
+ $filter->addFileToBlacklist(__FILE__);
+
+ require_once 'PEAR/Config.php';
+ $pear_config = PEAR_Config::singleton();
+ $pear_dir = $pear_config->get('php_dir');
+ $filter->addDirectoryToBlacklist($pear_dir);
+
+ $code_coverage = new PHP_CodeCoverage();
+ $code_coverage->start('ethna');
}
@@ -73,3 +121,7 @@
// 結果をコマンドラインに出力
+if ($verbose) {
$test->run(new TextDetailReporter());
+} else {
+ $test->run(new TextSimpleReporter());
+}
@@ -79,2 +131,12 @@
+if ($coverage) {
+ // カバレッジ計測終了
+ $code_coverage->stop();
+
+ require 'PHP/CodeCoverage/Report/HTML.php';
+ $writer = new PHP_CodeCoverage_Report_HTML();
+ $writer->process($code_coverage, getcwd().'/coverage');
+}
+
+
//{{{ getFileList
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/ActionError.php Ethna-2.6.0beta2011102522/class/ActionError.php
--- Ethna-2.6.2011010402/class/ActionError.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/ActionError.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -26,10 +26,10 @@
- /** @var array エラーオブジェクトの一覧 */
- var $error_list = array();
+ /** @protected array エラーオブジェクトの一覧 */
+ protected $error_list = array();
- /** @var object Ethna_ActionForm アクションフォームオブジェクト */
- var $action_form = null;
+ /** @protected object Ethna_ActionForm アクションフォームオブジェクト */
+ protected $action_form = null;
- /** @var object Ethna_Logger ログオブジェクト */
- var $logger = null;
+ /** @protected object Ethna_Logger ログオブジェクト */
+ protected $logger = null;
/**#@-*/
@@ -41,3 +41,3 @@
*/
- public function Ethna_ActionError()
+ public function __construct()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/ActionForm.php Ethna-2.6.0beta2011102522/class/ActionForm.php
--- Ethna-2.6.2011010402/class/ActionForm.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/ActionForm.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -29,3 +29,3 @@
/**#@+
- * @access private
+ * @access protected
*/
@@ -33,53 +33,53 @@
/** @var array フォーム値定義(デフォルト) */
- var $form_template = array();
+ protected $form_template = array();
/** @var array フォーム値定義 */
- var $form = array();
+ protected $form = array();
- /** @var array フォーム値 */
- var $form_vars = array();
+ /** @FIXME @protected array フォーム値 */
+ public $form_vars = array();
- /** @var array アプリケーション設定値 */
- var $app_vars = array();
+ /** @protected array アプリケーション設定値 */
+ protected $app_vars = array();
- /** @var array アプリケーション設定値(自動エスケープなし) */
- var $app_ne_vars = array();
+ /** @protected array アプリケーション設定値(自動エスケープなし) */
+ protected $app_ne_vars = array();
- /** @var object Ethna_Backend バックエンドオブジェクト */
- var $backend;
+ /** @protected object Ethna_Backend バックエンドオブジェクト */
+ protected $backend;
- /** @var object Ethna_ActionError アクションエラーオブジェクト */
- var $action_error;
+ /** @protected object Ethna_ActionError アクションエラーオブジェクト */
+ protected $action_error;
- /** @var object Ethna_ActionError アクションエラーオブジェクト(省略形) */
- var $ae;
+ /** @protected object Ethna_ActionError アクションエラーオブジェクト(省略形) */
+ protected $ae;
- /** @var object Ethna_I18N i18nオブジェクト */
- var $i18n;
+ /** @protected object Ethna_I18N i18nオブジェクト */
+ protected $i18n;
- /** @var object Ethna_Logger ログオブジェクト */
- var $logger;
+ /** @protected object Ethna_Logger ログオブジェクト */
+ protected $logger;
- /** @var object Ethna_Plugin プラグインオブジェクト */
- var $plugin;
+ /** @protected object Ethna_Plugin プラグインオブジェクト */
+ protected $plugin;
/** @var array フォーム定義要素 */
- var $def = array('name', 'required', 'max', 'min', 'regexp', 'mbregexp',
+ protected $def = array('name', 'required', 'max', 'min', 'regexp', 'mbregexp',
'custom', 'filter', 'form_type', 'type');
- /** @var array フォーム定義のうち非プラグイン要素とみなすprefix */
- var $def_noplugin = array('type', 'form', 'name', 'plugin', 'filter',
+ /** @protected array フォーム定義のうち非プラグイン要素とみなすprefix */
+ protected $def_noplugin = array('type', 'form', 'name', 'plugin', 'filter',
'option', 'default');
- /** @var bool 追加検証強制フラグ */
- var $force_validate_plus = false;
+ /** @protected bool 追加検証強制フラグ */
+ protected $force_validate_plus = false;
- /** @var array アプリケーションオブジェクト(helper) */
- var $helper_app_object = array();
+ /** @protected array アプリケーションオブジェクト(helper) */
+ protected $helper_app_object = array();
- /** @var array アプリケーションオブジェクト(helper)で利用しないフォーム名 */
- var $helper_skip_form = array();
+ /** @protected array アプリケーションオブジェクト(helper)で利用しないフォーム名 */
+ protected $helper_skip_form = array();
- /** @var int フォーム配列で使用可能な深さの上限 */
- var $max_form_deps = 10;
+ /** @protected int フォーム配列で使用可能な深さの上限 */
+ protected $max_form_deps = 10;
@@ -138,3 +138,3 @@
*/
- function get($name)
+ public function get($name)
{
@@ -150,3 +150,3 @@
*/
- function getDef($name = null)
+ public function getDef($name = null)
{
@@ -170,3 +170,3 @@
*/
- function getName($name)
+ public function getName($name)
{
@@ -191,3 +191,3 @@
*/
- function _getFormNameArray($name)
+ private function _getFormNameArray($name)
{
@@ -213,3 +213,3 @@
*/
- function _getVarsByFormName(&$target, $name)
+ private function _getVarsByFormName(&$target, $name)
{
@@ -228,3 +228,3 @@
*/
- function _setVarsByFormName(&$target, $name, $vars)
+ private function _setVarsByFormName(&$target, $name, $vars)
{
@@ -242,3 +242,3 @@
*/
- function _getVarsByKeys(&$target, $keys)
+ private function _getVarsByKeys(&$target, $keys)
{
@@ -259,3 +259,3 @@
- function _setVarsByKeys(&$target, $keys, &$var)
+ private function _setVarsByKeys(&$target, $keys, &$var)
{
@@ -291,3 +291,3 @@
*/
- function _getFilesInfoByFormName(&$target, $name, $key)
+ private function _getFilesInfoByFormName(&$target, $name, $key)
{
@@ -303,3 +303,3 @@
*/
- function setFormVars()
+ public function setFormVars()
{
@@ -430,3 +430,3 @@
*/
- function clearFormVars()
+ public function clearFormVars()
{
@@ -442,3 +442,3 @@
*/
- function set($name, $value)
+ public function set($name, $value)
{
@@ -455,3 +455,3 @@
*/
- function setDef($name, $value)
+ public function setDef($name, $value)
{
@@ -488,3 +488,3 @@
*/
- function getApp($name)
+ public function getApp($name)
{
@@ -503,3 +503,3 @@
*/
- function setApp($name, $value)
+ public function setApp($name, $value)
{
@@ -531,3 +531,3 @@
*/
- function getAppNE($name)
+ public function getAppNE($name)
{
@@ -546,3 +546,3 @@
*/
- function setAppNE($name, $value)
+ public function setAppNE($name, $value)
{
@@ -575,3 +575,3 @@
*/
- function _getArray(&$vars, &$retval, $escape)
+ public function _getArray(&$vars, &$retval, $escape)
{
@@ -594,3 +594,3 @@
*/
- function isForceValidatePlus()
+ public function isForceValidatePlus()
{
@@ -605,3 +605,3 @@
*/
- function setForceValidatePlus($force_validate_plus)
+ public function setForceValidatePlus($force_validate_plus)
{
@@ -616,3 +616,3 @@
*/
- function validate()
+ public function validate()
{
@@ -637,3 +637,3 @@
*/
- function _validateWithPlugin($form_name)
+ private function _validateWithPlugin($form_name)
{
@@ -763,3 +763,3 @@
*/
- function check($name)
+ public function check($name)
{
@@ -906,3 +906,3 @@
*/
- function getHiddenVars($include_list = null, $exclude_list = null)
+ public function getHiddenVars($include_list = null, $exclude_list = null)
{
@@ -972,3 +972,3 @@
*/
- function handleError($name, $code)
+ public function handleError($name, $code)
{
@@ -1097,3 +1097,3 @@
*/
- function _validatePlus()
+ protected function _validatePlus()
{
@@ -1108,3 +1108,3 @@
*/
- function _validateCustom($method_list, $name)
+ protected function _validateCustom($method_list, $name)
{
@@ -1123,3 +1123,3 @@
*
- * @access private
+ * @access protected
* @param mixed $value フォーム値
@@ -1128,3 +1128,3 @@
*/
- function _filter($value, $filter)
+ protected function _filter($value, $filter)
{
@@ -1154,3 +1154,3 @@
*/
- function _filter_alnum_zentohan($value)
+ protected function _filter_alnum_zentohan($value)
{
@@ -1166,3 +1166,3 @@
*/
- function _filter_numeric_zentohan($value)
+ protected function _filter_numeric_zentohan($value)
{
@@ -1178,3 +1178,3 @@
*/
- function _filter_alphabet_zentohan($value)
+ protected function _filter_alphabet_zentohan($value)
{
@@ -1190,3 +1190,3 @@
*/
- function _filter_ltrim($value)
+ protected function _filter_ltrim($value)
{
@@ -1202,3 +1202,3 @@
*/
- function _filter_rtrim($value)
+ protected function _filter_rtrim($value)
{
@@ -1214,3 +1214,3 @@
*/
- function _filter_ntrim($value)
+ protected function _filter_ntrim($value)
{
@@ -1226,3 +1226,3 @@
*/
- function _filter_kana_hantozen($value)
+ protected function _filter_kana_hantozen($value)
{
@@ -1238,3 +1238,3 @@
*/
- function _setFormTemplate($form_template)
+ protected function _setFormTemplate($form_template)
{
@@ -1255,3 +1255,3 @@
*/
- function setFormDef_PreHelper()
+ public function setFormDef_PreHelper()
{
@@ -1273,3 +1273,3 @@
*/
- function setFormDef_ViewHelper()
+ public function setFormDef_ViewHelper()
{
@@ -1286,3 +1286,3 @@
*/
- function _setFormDef_HelperObj()
+ protected function _setFormDef_HelperObj()
{
@@ -1324,3 +1324,3 @@
*/
- function _setFormDef()
+ protected function _setFormDef()
{
@@ -1351,3 +1351,3 @@
*/
- function _getPluginDef($form_name)
+ protected function _getPluginDef($form_name)
{
@@ -1413,3 +1413,3 @@
*/
- function _getHelperAppObject($key)
+ protected function _getHelperAppObject($key)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/AppManager.php Ethna-2.6.0beta2011102522/class/AppManager.php
--- Ethna-2.6.2011010402/class/AppManager.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/AppManager.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -44,22 +44,22 @@
- /** @var object Ethna_Backend backendオブジェクト */
- var $backend;
+ /** @protected object Ethna_Backend backendオブジェクト */
+ protected $backend;
- /** @var object Ethna_Config 設定オブジェクト */
- var $config;
+ /** @protected object Ethna_Config 設定オブジェクト */
+ protected $config;
- /** @var object Ethna_DB DBオブジェクト */
- var $db;
+ /** @protected object Ethna_DB DBオブジェクト */
+ protected $db;
- /** @var object Ethna_I18N i18nオブジェクト */
- var $i18n;
+ /** @protected object Ethna_I18N i18nオブジェクト */
+ protected $i18n;
- /** @var object Ethna_ActionForm アクションフォームオブジェクト */
- var $action_form;
+ /** @protected object Ethna_ActionForm アクションフォームオブジェクト */
+ protected $action_form;
- /** @var object Ethna_ActionForm アクションフォームオブジェクト(省略形) */
- var $af;
+ /** @protected object Ethna_ActionForm アクションフォームオブジェクト(省略形) */
+ protected $af;
- /** @var object Ethna_Session セッションオブジェクト */
- var $session;
+ /** @protected object Ethna_Session セッションオブジェクト */
+ protected $session;
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/AppObject.php Ethna-2.6.0beta2011102522/class/AppObject.php
--- Ethna-2.6.2011010402/class/AppObject.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/AppObject.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -29,43 +29,43 @@
- /** @var object Ethna_Backend backendオブジェクト */
- var $backend;
+ /** @protected object Ethna_Backend backendオブジェクト */
+ protected $backend;
- /** @var object Ethna_Config 設定オブジェクト */
- var $config;
+ /** @protected object Ethna_Config 設定オブジェクト */
+ protected $config;
- /** @var object Ethna_I18N i18nオブジェクト */
- var $i18n;
+ /** @protected object Ethna_I18N i18nオブジェクト */
+ protected $i18n;
- /** @var object Ethna_ActionForm アクションフォームオブジェクト */
- var $action_form;
+ /** @protected object Ethna_ActionForm アクションフォームオブジェクト */
+ protected $action_form;
- /** @var object Ethna_ActionForm アクションフォームオブジェクト(省略形) */
- var $af;
+ /** @protected object Ethna_ActionForm アクションフォームオブジェクト(省略形) */
+ protected $af;
- /** @var object Ethna_Session セッションオブジェクト */
- var $session;
+ /** @protected object Ethna_Session セッションオブジェクト */
+ protected $session;
- /** @var string DB定義プレフィクス */
- var $db_prefix = null;
+ /** @protected string DB定義プレフィクス */
+ protected $db_prefix = null;
- /** @var array テーブル定義。対応するDB上のテーブル名を指定します。*/
- var $table_def = null;
+ /** @protected array テーブル定義。対応するDB上のテーブル名を指定します。*/
+ protected $table_def = null;
- /** @var array プロパティ定義。テーブルのカラム定義を記述します。 */
- var $prop_def = null;
+ /** @protected array プロパティ定義。テーブルのカラム定義を記述します。 */
+ protected $prop_def = null;
- /** @var array プロパティ。各カラムに対応する実際の値です。 */
- var $prop = null;
+ /** @protected array プロパティ。各カラムに対応する実際の値です。 */
+ protected $prop = null;
- /** @var array プロパティ(バックアップ) */
- var $prop_backup = null;
+ /** @protected array プロパティ(バックアップ) */
+ protected $prop_backup = null;
- /** @var int プロパティ定義キャッシュ有効期間(sec) */
- var $prop_def_cache_lifetime = 86400;
+ /** @protected int プロパティ定義キャッシュ有効期間(sec) */
+ protected $prop_def_cache_lifetime = 86400;
- /** @var array プライマリキー定義 */
- var $id_def = null;
+ /** @protected array プライマリキー定義 */
+ protected $id_def = null;
- /** @var int オブジェクトID (プライマリーキーの値) */
- var $id = null;
+ /** @protected int オブジェクトID (プライマリーキーの値) */
+ protected $id = null;
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/AppSQL.php Ethna-2.6.0beta2011102522/class/AppSQL.php
--- Ethna-2.6.2011010402/class/AppSQL.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/AppSQL.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -25,4 +25,4 @@
- /** @var object Ethna_Controller controllerオブジェクト */
- var $controller;
+ /** @protected object Ethna_Controller controllerオブジェクト */
+ protected $controller;
@@ -53,3 +53,3 @@
- return call_user_func_array(array(&$this, $sqlid), $args);
+ return call_user_func_array(array($this, $sqlid), $args);
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/AppSearchObject.php Ethna-2.6.0beta2011102522/class/AppSearchObject.php
--- Ethna-2.6.2011010402/class/AppSearchObject.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/AppSearchObject.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -54,12 +54,12 @@
- /** @var string 検索値 */
- var $value;
+ /** @protected string 検索値 */
+ protected $value;
- /** @var int 検索条件 */
- var $condition;
+ /** @protected int 検索条件 */
+ protected $condition;
/**
- * @var array 追加検索条件を保持したEthna_AppSearchObjectの一覧
+ * @protected array 追加検索条件を保持したEthna_AppSearchObjectの一覧
*/
- var $object_list = array();
+ protected $object_list = array();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Backend.php Ethna-2.6.0beta2011102522/class/Backend.php
--- Ethna-2.6.2011010402/class/Backend.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Backend.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -25,46 +25,46 @@
- /** @var object Ethna_Controller controllerオブジェクト */
- var $controller;
+ /** @protected object Ethna_Controller controllerオブジェクト */
+ protected $controller;
- /** @var object Ethna_Controller controllerオブジェクト($controllerの省略形) */
- var $ctl;
+ /** @protected object Ethna_Controller controllerオブジェクト($controllerの省略形) */
+ protected $ctl;
- /** @var object Ethna_ClassFactory クラスファクトリオブジェクト */
- var $class_factory;
+ /** @protected object Ethna_ClassFactory クラスファクトリオブジェクト */
+ protected $class_factory;
- /** @var object Ethna_Config 設定オブジェクト */
- var $config;
+ /** @protected object Ethna_Config 設定オブジェクト */
+ protected $config;
- /** @var object Ethna_I18N i18nオブジェクト */
- var $i18n;
+ /** @protected object Ethna_I18N i18nオブジェクト */
+ protected $i18n;
- /** @var object Ethna_ActionError アクションエラーオブジェクト */
- var $action_error;
+ /** @protected object Ethna_ActionError アクションエラーオブジェクト */
+ protected $action_error;
- /** @var object Ethna_ActionError アクションエラーオブジェクト($action_errorの省略形) */
- var $ae;
+ /** @protected object Ethna_ActionError アクションエラーオブジェクト($action_errorの省略形) */
+ protected $ae;
- /** @var object Ethna_ActionForm アクションフォームオブジェクト */
- var $action_form;
+ /** @protected object Ethna_ActionForm アクションフォームオブジェクト */
+ protected $action_form;
- /** @var object Ethna_ActionForm アクションフォームオブジェクト($action_formの省略形) */
- var $af;
+ /** @protected object Ethna_ActionForm アクションフォームオブジェクト($action_formの省略形) */
+ protected $af;
- /** @var object Ethna_ActionClass アクションクラスオブジェクト */
- var $action_class;
+ /** @protected object Ethna_ActionClass アクションクラスオブジェクト */
+ protected $action_class;
- /** @var object Ethna_ActionClass アクションクラスオブジェクト($action_classの省略形) */
- var $ac;
+ /** @protected object Ethna_ActionClass アクションクラスオブジェクト($action_classの省略形) */
+ protected $ac;
- /** @var object Ethna_Session セッションオブジェクト */
- var $session;
+ /** @protected object Ethna_Session セッションオブジェクト */
+ protected $session;
- /** @var object Ethna_Plugin プラグインオブジェクト */
- var $plugin;
+ /** @protected object Ethna_Plugin プラグインオブジェクト */
+ protected $plugin;
- /** @var array Ethna_DBオブジェクトを格納した配列 */
- var $db_list;
+ /** @protected array Ethna_DBオブジェクトを格納した配列 */
+ protected $db_list;
- /** @var object Ethna_Logger ログオブジェクト */
- var $logger;
+ /** @protected object Ethna_Logger ログオブジェクト */
+ protected $logger;
@@ -77,5 +77,5 @@
* @access public
- * @param object Ethna_Controller &$controller コントローラオブジェクト
+ * @param object Ethna_Controller $controller コントローラオブジェクト
*/
- public function __construct(&$controller)
+ public function __construct($controller)
{
@@ -109,3 +109,3 @@
*/
- function getController()
+ public function getController()
{
@@ -120,3 +120,3 @@
*/
- function getConfig()
+ public function getConfig()
{
@@ -131,3 +131,3 @@
*/
- function getAppId()
+ public function getAppId()
{
@@ -142,3 +142,3 @@
*/
- function getI18N()
+ public function getI18N()
{
@@ -153,3 +153,3 @@
*/
- function getActionError()
+ public function getActionError()
{
@@ -164,3 +164,3 @@
*/
- function getActionForm()
+ public function getActionForm()
{
@@ -174,3 +174,3 @@
*/
- function setActionForm(&$action_form)
+ public function setActionForm($action_form)
{
@@ -186,3 +186,3 @@
*/
- function getActionClass()
+ public function getActionClass()
{
@@ -196,3 +196,3 @@
*/
- function setActionClass(&$action_class)
+ public function setActionClass($action_class)
{
@@ -208,3 +208,3 @@
*/
- function getLogger()
+ public function getLogger()
{
@@ -219,3 +219,3 @@
*/
- function getSession()
+ public function getSession()
{
@@ -230,3 +230,3 @@
*/
- function getPlugin()
+ public function getPlugin()
{
@@ -241,3 +241,3 @@
*/
- function getManager($type, $weak = false)
+ public function getManager($type, $weak = false)
{
@@ -253,3 +253,3 @@
*/
- function getObject($key)
+ public function getObject($key)
{
@@ -267,3 +267,3 @@
*/
- function getBasedir()
+ public function getBasedir()
{
@@ -278,3 +278,3 @@
*/
- function getTemplatedir()
+ public function getTemplatedir()
{
@@ -289,3 +289,3 @@
*/
- function getEtcdir()
+ public function getEtcdir()
{
@@ -300,3 +300,3 @@
*/
- function getTmpdir()
+ public function getTmpdir()
{
@@ -311,3 +311,3 @@
*/
- function getTemplateext()
+ public function getTemplateext()
{
@@ -323,3 +323,3 @@
*/
- function log($level, $message)
+ public function log($level, $message)
{
@@ -340,3 +340,3 @@
*/
- function perform($action_name)
+ public function perform($action_name)
{
@@ -376,3 +376,3 @@
*/
- function getDB($db_key = "")
+ public function getDB($db_key = "")
{
@@ -416,3 +416,3 @@
- register_shutdown_function(array(&$this, 'shutdownDB'));
+ register_shutdown_function(array($this, 'shutdownDB'));
@@ -427,3 +427,3 @@
*/
- function getDBList()
+ public function getDBList()
{
@@ -454,3 +454,3 @@
*/
- function shutdownDB()
+ public function shutdownDB()
{
@@ -475,3 +475,3 @@
*/
- function _getDBVarname($db_key = "")
+ protected function _getDBVarname($db_key = "")
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/CacheManager.php Ethna-2.6.0beta2011102522/class/CacheManager.php
--- Ethna-2.6.2011010402/class/CacheManager.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/CacheManager.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -27,3 +27,3 @@
*/
- function &getInstance($type)
+ public static function getInstance($type)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/ClassFactory.php Ethna-2.6.0beta2011102522/class/ClassFactory.php
--- Ethna-2.6.2011010402/class/ClassFactory.php 2011-01-04 02:31:14.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/ClassFactory.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -29,19 +29,19 @@
- /** @var object Ethna_Controller controllerオブジェクト */
- var $controller;
+ /** @protected object Ethna_Controller controllerオブジェクト */
+ protected $controller;
- /** @var object Ethna_Controller controllerオブジェクト(省略形) */
- var $ctl;
+ /** @protected object Ethna_Controller controllerオブジェクト(省略形) */
+ protected $ctl;
- /** @var array クラス定義 */
- var $class = array();
+ /** @protected array クラス定義 */
+ protected $class = array();
- /** @var array 生成済みオブジェクトキャッシュ */
- var $object = array();
+ /** @FIXME @protected array 生成済みオブジェクトキャッシュ */
+ public $object = array();
- /** @var array 生成済みアプリケーションマネージャオブジェクトキャッシュ */
- var $manager = array();
+ /** @protected array 生成済みアプリケーションマネージャオブジェクトキャッシュ */
+ protected $manager = array();
- /** @var array メソッド一覧キャッシュ */
- var $method_list = array();
+ /** @protected array メソッド一覧キャッシュ */
+ protected $method_list = array();
@@ -54,6 +54,6 @@
* @access public
- * @param object Ethna_Controller &$controller controllerオブジェクト
+ * @param object Ethna_Controller $controller controllerオブジェクト
* @param array $class クラス定義
*/
- public function __construct(&$controller, $class)
+ public function __construct($controller, $class)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Config.php Ethna-2.6.0beta2011102522/class/Config.php
--- Ethna-2.6.2011010402/class/Config.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Config.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -25,7 +25,7 @@
- /** @var object Ethna_Controller controllerオブジェクト */
- var $controller;
+ /** @protected object Ethna_Controller controllerオブジェクト */
+ protected $controller;
- /** @var array 設定内容 */
- var $config = null;
+ /** @FIXME @protected array 設定内容 */
+ public $config = null;
@@ -38,5 +38,5 @@
* @access public
- * @param object Ethna_Controller &$controller controllerオブジェクト
+ * @param object Ethna_Controller $controller controllerオブジェクト
*/
- public function __construct(&$controller)
+ public function __construct($controller)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Controller.php Ethna-2.6.0beta2011102522/class/Controller.php
--- Ethna-2.6.2011010402/class/Controller.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Controller.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -24,3 +24,3 @@
/**#@+
- * @access private
+ * @access protected
*/
@@ -28,18 +28,18 @@
/** @var string アプリケーションID */
- var $appid = 'ETHNA';
+ protected $appid = 'ETHNA';
/** @var string アプリケーションベースディレクトリ */
- var $base = '';
+ protected $base = '';
- /** @var string アプリケーションベースURL */
- var $url = '';
+ /** @protected string アプリケーションベースURL */
+ protected $url = '';
- /** @var string アプリケーションDSN(Data Source Name) */
- var $dsn;
+ /** @protected string アプリケーションDSN(Data Source Name) */
+ protected $dsn;
- /** @var array アプリケーションディレクトリ */
- var $directory = array();
+ /** @protected array アプリケーションディレクトリ */
+ protected $directory = array();
- /** @var array アプリケーションディレクトリ(デフォルト) */
- var $directory_default = array(
+ /** @protected array アプリケーションディレクトリ(デフォルト) */
+ protected $directory_default = array(
'action' => 'app/action',
@@ -63,4 +63,4 @@
- /** @var array DBアクセス定義 */
- var $db = array(
+ /** @protected array DBアクセス定義 */
+ protected $db = array(
'' => DB_TYPE_RW,
@@ -68,4 +68,4 @@
- /** @var array 拡張子設定 */
- var $ext = array(
+ /** @protected array 拡張子設定 */
+ protected $ext = array(
'php' => 'php',
@@ -74,7 +74,7 @@
- /** @var array クラス設定 */
- var $class = array();
+ /** @protected array クラス設定 */
+ public $class = array();
- /** @var array クラス設定(デフォルト) */
- var $class_default = array(
+ /** @protected array クラス設定(デフォルト) */
+ public $class_default = array(
'class' => 'Ethna_ClassFactory',
@@ -95,27 +95,27 @@
- /** @var array フィルタ設定 */
- var $filter = array(
+ /** @protected array フィルタ設定 */
+ protected $filter = array(
);
- /** @var string 使用ロケール設定 */
- var $locale;
+ /** @protected string 使用ロケール設定 */
+ protected $locale;
- /** @var string システム側エンコーディング */
- var $system_encoding;
+ /** @protected string システム側エンコーディング */
+ protected $system_encoding;
- /** @var string クライアント側エンコーディング */
+ /** @protected string クライアント側エンコーディング */
/** ブラウザからのエンコーディングを指す */
- var $client_encoding;
+ protected $client_encoding;
- /** @var string 現在実行中のアクション名 */
- var $action_name;
+ /** @protected string 現在実行中のアクション名 */
+ protected $action_name;
- /** @var string 現在実行中のXMLRPCメソッド名 */
- var $xmlrpc_method_name;
+ /** @protected string 現在実行中のXMLRPCメソッド名 */
+ protected $xmlrpc_method_name;
- /** @var array forward定義 */
- var $forward = array();
+ /** @protected array forward定義 */
+ protected $forward = array();
- /** @var array デフォルトのforward定義 */
- var $forward_default = array(
+ /** @protected array デフォルトのforward定義 */
+ protected $forward_default = array(
'403' => array( 'view_name' => 'Ethna_View_403',),
@@ -127,40 +127,40 @@
- /** @var array action定義 */
- var $action = array();
+ /** @protected array action定義 */
+ protected $action = array();
- /** @var array action(CLI)定義 */
- var $action_cli = array();
+ /** @protected array action(CLI)定義 */
+ protected $action_cli = array();
- /** @var array action(XMLRPC)定義 */
- var $action_xmlrpc = array();
+ /** @protected array action(XMLRPC)定義 */
+ protected $action_xmlrpc = array();
- /** @var array アプリケーションマネージャ定義 */
- var $manager = array();
+ /** @protected array アプリケーションマネージャ定義 */
+ protected $manager = array();
- /** @var object レンダラー */
- var $renderer = null;
+ /** @protected object レンダラー */
+ protected $renderer = null;
- /** @var array フィルターチェイン(Ethna_Filterオブジェクトの配列) */
- var $filter_chain = array();
+ /** @protected array フィルターチェイン(Ethna_Filterオブジェクトの配列) */
+ protected $filter_chain = array();
- /** @var object Ethna_ClassFactory クラスファクトリオブジェクト */
- var $class_factory = null;
+ /** @protected object Ethna_ClassFactory クラスファクトリオブジェクト */
+ protected $class_factory = null;
- /** @var object Ethna_ActionForm フォームオブジェクト */
- var $action_form = null;
+ /** @protected object Ethna_ActionForm フォームオブジェクト */
+ protected $action_form = null;
- /** @var object Ethna_View ビューオブジェクト */
- var $view = null;
+ /** @protected object Ethna_View ビューオブジェクト */
+ protected $view = null;
- /** @var object Ethna_Config 設定オブジェクト */
- var $config = null;
+ /** @protected object Ethna_Config 設定オブジェクト */
+ protected $config = null;
- /** @var object Ethna_Logger ログオブジェクト */
- var $logger = null;
+ /** @protected object Ethna_Logger ログオブジェクト */
+ protected $logger = null;
- /** @var object Ethna_Plugin プラグインオブジェクト */
- var $plugin = null;
+ /** @protected object Ethna_Plugin プラグインオブジェクト */
+ protected $plugin = null;
- /** @var string リクエストのゲートウェイ(www/cli/rest/xmlrpc/soap...) */
- var $gateway = GATEWAY_WWW;
+ /** @protected string リクエストのゲートウェイ(www/cli/rest/xmlrpc/soap...) */
+ protected $gateway = GATEWAY_WWW;
@@ -205,3 +205,3 @@
// エラーハンドラの設定
- Ethna::setErrorCallback(array(&$this, 'handleError'));
+ Ethna::setErrorCallback(array($this, 'handleError'));
@@ -242,2 +242,6 @@
$this->url = $this->config->get('url');
+ if (empty($this->url) && PHP_SAPI != 'cli') {
+ $this->url = Ethna_Util::getUrlFromRequestUri();
+ $this->config->set('url', $this->url);
+ }
@@ -268,3 +272,3 @@
*/
- function end()
+ protected function end()
{
@@ -297,3 +301,3 @@
*/
- function getAppId()
+ public function getAppId()
{
@@ -373,3 +377,3 @@
*/
- function getDSN($db_key = "")
+ public function getDSN($db_key = "")
{
@@ -388,3 +392,3 @@
*/
- function getDSN_persistent($db_key = "")
+ public function getDSN_persistent($db_key = "")
{
@@ -406,3 +410,3 @@
*/
- function getDBType($db_key = null)
+ public function getDBType($db_key = null)
{
@@ -425,3 +429,3 @@
*/
- function getURL()
+ public function getURL()
{
@@ -436,3 +440,3 @@
*/
- function getBasedir()
+ public function getBasedir()
{
@@ -450,3 +454,3 @@
*/
- function getTemplatedir()
+ public function getTemplatedir()
{
@@ -470,3 +474,3 @@
*/
- function getActiondir($gateway = null)
+ public function getActiondir($gateway = null)
{
@@ -495,3 +499,3 @@
*/
- function getViewdir()
+ public function getViewdir()
{
@@ -506,3 +510,3 @@
*/
- function getTestdir()
+ public function getTestdir()
{
@@ -518,3 +522,3 @@
*/
- function getDirectory($key)
+ public function getDirectory($key)
{
@@ -525,2 +529,14 @@
}
+ /**
+ * アプリケーションディレクトリ設定を返す
+ *
+ * @access public
+ * @param string $key type
+ * @return string $key directory
+ */
+ public function setDirectory($key, $value)
+ {
+ $this->directory[$key] = $value;
+ }
+
@@ -533,3 +549,3 @@
*/
- function getExt($key)
+ public function getExt($key)
{
@@ -547,3 +563,3 @@
*/
- function getClassFactory()
+ public function getClassFactory()
{
@@ -558,3 +574,3 @@
*/
- function getActionError()
+ public function getActionError()
{
@@ -564,3 +580,3 @@
/**
- * アクションフォームオブジェクトのアクセサ
+ * Accessor for ActionForm
*
@@ -569,3 +585,3 @@
*/
- function getActionForm()
+ public function getActionForm()
{
@@ -576,3 +592,20 @@
/**
- * ビューオブジェクトのアクセサ
+ * Setter for ActionForm
+ * if the ::$action_form class is not null, then cannot set the view
+ *
+ * @access public
+ * @return object Ethna_ActionForm アクションフォームオブジェクト
+ */
+ public function setActionForm($af)
+ {
+ if ($this->action_form !== null) {
+ return false;
+ }
+ $this->action_form = $af;
+ return true;
+ }
+
+
+ /**
+ * Accessor for ViewClass
*
@@ -581,3 +614,3 @@
*/
- function getView()
+ public function getView()
{
@@ -588,2 +621,19 @@
/**
+ * Setter for ViewClass
+ * if the ::$view class is not null, then cannot set the view
+ *
+ * @access public
+ * @param $view object Ethna_ViewClass
+ * @return boolean
+ */
+ public function setView($view)
+ {
+ if ($this->view !== null) {
+ return false;
+ }
+ $this->view = $view;
+ return true;
+ }
+
+ /**
* backendオブジェクトのアクセサ
@@ -593,3 +643,3 @@
*/
- function getBackend()
+ public function getBackend()
{
@@ -604,3 +654,3 @@
*/
- function getConfig()
+ public function getConfig()
{
@@ -615,3 +665,3 @@
*/
- function getI18N()
+ public function getI18N()
{
@@ -626,3 +676,3 @@
*/
- function getLogger()
+ public function getLogger()
{
@@ -637,3 +687,3 @@
*/
- function getSession()
+ public function getSession()
{
@@ -648,3 +698,3 @@
*/
- function getSQL()
+ public function getSQL()
{
@@ -659,3 +709,3 @@
*/
- function getPlugin()
+ public function getPlugin()
{
@@ -670,3 +720,3 @@
*/
- function getUrlHandler()
+ public function getUrlHandler()
{
@@ -682,3 +732,3 @@
*/
- function getManagerList()
+ public function getManagerList()
{
@@ -693,3 +743,3 @@
*/
- function getCurrentActionName()
+ public function getCurrentActionName()
{
@@ -704,3 +754,3 @@
*/
- function getXmlrpcMethodName()
+ public function getXmlrpcMethodName()
{
@@ -719,3 +769,3 @@
*/
- function getLanguage()
+ public function getLanguage()
{
@@ -731,3 +781,3 @@
*/
- function getLocale()
+ public function getLocale()
{
@@ -743,3 +793,3 @@
*/
- function setLocale($locale)
+ public function setLocale($locale)
{
@@ -756,3 +806,3 @@
*/
- function getClientEncoding()
+ public function getClientEncoding()
{
@@ -767,3 +817,3 @@
*/
- function setClientEncoding($client_encoding)
+ public function setClientEncoding($client_encoding)
{
@@ -779,3 +829,3 @@
*/
- function getGateway()
+ public function getGateway()
{
@@ -789,3 +839,3 @@
*/
- function setGateway($gateway)
+ public function setGateway($gateway)
{
@@ -869,3 +919,3 @@
*/
- function trigger($default_action_name = "", $fallback_action_name = "", $enable_filter = true)
+ public function trigger($default_action_name = "", $fallback_action_name = "", $enable_filter = true)
{
@@ -921,3 +971,3 @@
*/
- function _trigger_WWW($default_action_name = "", $fallback_action_name = "")
+ private function _trigger_WWW($default_action_name = "", $fallback_action_name = "")
{
@@ -965,5 +1015,5 @@
$this->action_form = new $form_name($this);
+ $backend->setActionForm($this->action_form);
$this->action_form->setFormDef_PreHelper();
$this->action_form->setFormVars();
- $backend->setActionForm($this->action_form);
@@ -1011,3 +1061,3 @@
*/
- function _trigger_CLI($default_action_name = "")
+ private function _trigger_CLI($default_action_name = "")
{
@@ -1023,3 +1073,3 @@
*/
- function _trigger_XMLRPC($action_name = "")
+ private function _trigger_XMLRPC($action_name = "")
{
@@ -1075,3 +1125,3 @@
*/
- function trigger_XMLRPC($method, $param)
+ private function trigger_XMLRPC($method, $param)
{
@@ -1114,3 +1164,3 @@
*/
- function _trigger_SOAP()
+ private function _trigger_SOAP()
{
@@ -1138,3 +1188,3 @@
*/
- function handleError(&$error)
+ public function handleError($error)
{
@@ -1153,3 +1203,3 @@
*/
- function getErrorMessage($code)
+ public function getErrorMessage($code)
{
@@ -1171,3 +1221,3 @@
*/
- function _getActionName($default_action_name, $fallback_action_name)
+ private function _getActionName($default_action_name, $fallback_action_name)
{
@@ -1224,3 +1274,3 @@
*/
- function _getActionName_Form()
+ protected function _getActionName_Form()
{
@@ -1292,3 +1342,3 @@
*/
- function getActionRequest($action, $type = "hidden")
+ public function getActionRequest($action, $type = "hidden")
{
@@ -1310,3 +1360,3 @@
*/
- function _getAction($action_name, $gateway = null)
+ public function _getAction($action_name, $gateway = null)
{
@@ -1377,3 +1427,3 @@
*/
- function _sortForward($action_name, $retval)
+ protected function _sortForward($action_name, $retval)
{
@@ -1385,5 +1435,5 @@
*
- * @access private
+ * @access protected
*/
- function _createFilterChain()
+ protected function _createFilterChain()
{
@@ -1408,3 +1458,3 @@
*/
- function _isAcceptableActionName($action_name, $default_action_name)
+ private function _isAcceptableActionName($action_name, $default_action_name)
{
@@ -1429,3 +1479,3 @@
*/
- function getActionFormName($action_name)
+ public function getActionFormName($action_name)
{
@@ -1448,3 +1498,3 @@
*/
- function getDefaultFormClass($action_name, $gateway = null)
+ public function getDefaultFormClass($action_name, $gateway = null)
{
@@ -1469,3 +1519,3 @@
*/
- function actionFormToName($class_name)
+ public function actionFormToName($class_name)
{
@@ -1494,3 +1544,3 @@
*/
- function getDefaultFormPath($action_name)
+ public function getDefaultFormPath($action_name)
{
@@ -1506,3 +1556,3 @@
*/
- function getActionClassName($action_name)
+ public function getActionClassName($action_name)
{
@@ -1525,3 +1575,3 @@
*/
- function getDefaultActionClass($action_name, $gateway = null)
+ public function getDefaultActionClass($action_name, $gateway = null)
{
@@ -1546,3 +1596,3 @@
*/
- function actionClassToName($class_name)
+ public function actionClassToName($class_name)
{
@@ -1569,3 +1619,3 @@
*/
- function getDefaultActionPath($action_name)
+ public function getDefaultActionPath($action_name)
{
@@ -1584,3 +1634,3 @@
*/
- function getViewClassName($forward_name)
+ public function getViewClassName($forward_name)
{
@@ -1633,3 +1683,3 @@
*/
- function getDefaultViewClass($forward_name, $gateway = null)
+ public function getDefaultViewClass($forward_name, $gateway = null)
{
@@ -1653,3 +1703,3 @@
*/
- function getDefaultViewPath($forward_name)
+ public function getDefaultViewPath($forward_name)
{
@@ -1671,3 +1721,3 @@
*/
- function getDefaultForwardPath($forward_name)
+ public function getDefaultForwardPath($forward_name)
{
@@ -1686,3 +1736,3 @@
*/
- function forwardPathToName($forward_path)
+ public function forwardPathToName($forward_path)
{
@@ -1701,3 +1751,3 @@
*/
- function _getForwardPath($forward_name)
+ public function _getForwardPath($forward_name)
{
@@ -1719,3 +1769,3 @@
/**
- * レンダラを取得する(getTemplateEngine()はそのうち廃止されgetRenderer()に統合される予定)
+ * レンダラを取得する
*
@@ -1724,6 +1774,28 @@
*/
- function getRenderer()
+ public function getRenderer()
{
- $_ret_object = $this->getTemplateEngine();
- return $_ret_object;
+ if ($this->renderer instanceof Ethna_Renderer) {
+ return $this->renderer;
+ }
+
+ // if action is __ethna_info__ or __ethna_unittest__, the renderer must be Smarty2
+ if ($this->action_name == '__ethna_info__'
+ || $this->action_name == '__ethna_unittest__') {
+ require_once ETHNA_BASE . '/class/Renderer/Smarty.php';
+ // force update delimiter setting
+ $renderer_setting = $this->getConfig()->get('renderer');
+ $smarty_setting = (isset($renreder_setting['smarty']) ? $renderer_setting['smarty'] : array());
+ $this->getConfig()->set('renderer', array_merge(
+ $smarty_setting,
+ array('smarty' => array(
+ 'left_delimiter' => '{',
+ 'right_delimiter' => '}',
+ )
+ )));
+ $this->renderer = new Ethna_Renderer_Smarty($this);
+ } else {
+ $this->renderer = $this->class_factory->getObject('renderer');
+ }
+ $this->_setDefaultTemplateEngine($this->renderer);
+ return $this->renderer;
}
@@ -1731,3 +1803,4 @@
/**
- * テンプレートエンジン取得する
+ * テンプレートエンジン取得する (DEPRECATED)
+ * getRenderer() を使ってください
*
@@ -1737,15 +1810,6 @@
*/
- function getTemplateEngine()
+ public function getTemplateEngine()
{
- if (is_object($this->renderer)) {
- return $this->renderer;
- }
-
- $this->renderer = $this->class_factory->getObject('renderer');
-
- //テンプレートエンジンのデフォルトの設定
- $this->_setDefaultTemplateEngine($this->renderer);
- // }}}
-
- return $this->renderer;
+ trigger_error('Method ' . __METHOD__ . ' is depreacted. Use getRenderer() instead.', E_USER_DEPRECATED);
+ return $this->getRenderer();
}
@@ -1759,3 +1823,3 @@
*/
- function _setDefaultTemplateEngine($renderer)
+ protected function _setDefaultTemplateEngine($renderer)
{
@@ -1776,3 +1840,3 @@
*/
- function _setLanguage($locale, $system_encoding = null, $client_encoding = null)
+ protected function _setLanguage($locale, $system_encoding = null, $client_encoding = null)
{
@@ -1805,3 +1869,3 @@
*/
- function _getDefaultLanguage()
+ protected function _getDefaultLanguage()
{
@@ -1816,3 +1880,3 @@
*/
- function _getDefaultGateway($gateway)
+ protected function _getDefaultGateway($gateway)
{
@@ -1831,3 +1895,3 @@
*/
- function _getGatewayPrefix($gateway = null)
+ protected function _getGatewayPrefix($gateway = null)
{
@@ -1859,3 +1923,3 @@
*/
- function getManagerClassName($name)
+ public function getManagerClassName($name)
{
@@ -1874,3 +1938,3 @@
*/
- function getObjectClassName($name)
+ public function getObjectClassName($name)
{
@@ -1894,3 +1958,3 @@
*/
- function _includeActionScript($action_obj, $action_name)
+ protected function _includeActionScript($action_obj, $action_name)
{
@@ -1969,3 +2033,3 @@
*/
- function _includeViewScript($forward_obj, $forward_name)
+ protected function _includeViewScript($forward_obj, $forward_name)
{
@@ -2005,3 +2069,3 @@
*/
- function _includeDirectory($dir)
+ protected function _includeDirectory($dir)
{
@@ -2037,3 +2101,3 @@
*/
- function _prepareDSN()
+ protected function _prepareDSN()
{
@@ -2066,3 +2130,3 @@
*/
- function _selectDSN($type, $dsn_list)
+ protected function _selectDSN($type, $dsn_list)
{
@@ -2087,3 +2151,3 @@
*/
- function _activateEthnaManager()
+ protected function _activateEthnaManager()
{
@@ -2095,7 +2159,2 @@
- // see if we have simpletest
- if (file_exists_ex('simpletest/unit_tester.php', true)) {
- require_once ETHNA_BASE . '/class/UnitTestManager.php';
- }
-
// action設定
@@ -2103,5 +2162,5 @@
'form_name' => 'Ethna_Form_Info',
- 'form_path' => sprintf('%s/class/Action/Ethna_Action_Info.php', ETHNA_BASE),
+ 'form_path' => sprintf('%s/class/Action/Info.php', ETHNA_BASE),
'class_name' => 'Ethna_Action_Info',
- 'class_path' => sprintf('%s/class/Action/Ethna_Action_Info.php', ETHNA_BASE),
+ 'class_path' => sprintf('%s/class/Action/Info.php', ETHNA_BASE),
);
@@ -2112,6 +2171,9 @@
'view_name' => 'Ethna_View_Info',
- 'view_path' => sprintf('%s/class/View/Ethna_View_Info.php', ETHNA_BASE),
+ 'view_path' => sprintf('%s/class/View/Info.php', ETHNA_BASE),
);
-
+ // see if we have simpletest
+ if (file_exists_ex('simpletest/unit_tester.php', true)) {
+ }
+ require_once ETHNA_BASE . '/class/UnitTestManager.php';
// action設定
@@ -2119,5 +2181,5 @@
'form_name' => 'Ethna_Form_UnitTest',
- 'form_path' => sprintf('%s/class/Action/Ethna_Action_UnitTest.php', ETHNA_BASE),
+ 'form_path' => sprintf('%s/class/Action/UnitTest.php', ETHNA_BASE),
'class_name' => 'Ethna_Action_UnitTest',
- 'class_path' => sprintf('%s/class/Action/Ethna_Action_UnitTest.php', ETHNA_BASE),
+ 'class_path' => sprintf('%s/class/Action/UnitTest.php', ETHNA_BASE),
);
@@ -2128,3 +2190,3 @@
'view_name' => 'Ethna_View_UnitTest',
- 'view_path' => sprintf('%s/class/View/Ethna_View_UnitTest.php', ETHNA_BASE),
+ 'view_path' => sprintf('%s/class/View/UnitTest.php', ETHNA_BASE),
);
@@ -2141,6 +2202,7 @@
*/
- function _ethnaManagerEnabledCheck($action_name)
+ protected function _ethnaManagerEnabledCheck($action_name)
{
if ($this->config->get('debug') == false
- && ($action_name == '__ethna_info__' || $action_name == '__ethna_unittest__')) {
+ && ($action_name == '__ethna_info__' || $action_name == '__ethna_unittest__'))
+ {
$this->ethnaManagerCheckErrorMsg($action_name);
@@ -2157,3 +2219,3 @@
*/
- function ethnaManagerCheckErrorMsg($action_name)
+ protected function ethnaManagerCheckErrorMsg($action_name)
{
@@ -2177,3 +2239,3 @@
*/
- function getCLI()
+ public function getCLI()
{
@@ -2189,3 +2251,3 @@
*/
- function setCLI($cli)
+ public function setCLI($cli)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/DB/ADOdb.php Ethna-2.6.0beta2011102522/class/DB/ADOdb.php
--- Ethna-2.6.2011010402/class/DB/ADOdb.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/DB/ADOdb.php 2011-10-25 22:50:53.000000000 +0900
@@ -7,3 +7,3 @@
* @author halt feits <halt.feits@gmail.com>
*/
@@ -39,7 +39,10 @@
- /** @var object DB DBオブジェクト */
- var $db;
+ /**
+ * @XXX stay public because of B.C.
+ * @protected object DB DBオブジェクト
+ */
+ public $db;
- /** @var string dsn */
- var $dsn;
+ /** @protected string dsn */
+ protected $dsn;
@@ -52,3 +55,3 @@
* @access public
- * @param object Ethna_Controller &$controller コントローラオブジェクト
+ * @param object Ethna_Controller $controller コントローラオブジェクト
* @param string $dsn DSN
@@ -68,5 +71,5 @@
* @access public
- * @return mixed 0:正常終了 Ethna_Error:エラー
+ * @return bool true:成功 false:失敗
*/
- function connect()
+ public function connect()
{
@@ -97,3 +100,3 @@
*/
- function disconnect()
+ public function disconnect()
{
@@ -111,3 +114,3 @@
*/
- function isValid()
+ public function isValid()
{
@@ -128,3 +131,3 @@
*/
- function begin()
+ public function begin()
{
@@ -141,3 +144,3 @@
*/
- function rollback()
+ public function rollback()
{
@@ -155,3 +158,3 @@
*/
- function commit()
+ public function commit()
{
@@ -170,3 +173,3 @@
*/
- function query($query, $inputarr = false)
+ public function query($query, $inputarr = false)
{
@@ -184,3 +187,3 @@
*/
- function _query($query, $inputarr = false)
+ private function _query($query, $inputarr = false)
{
@@ -207,7 +210,10 @@
/**
- * getAll
+ * 結果レコードセットを返す
*
* @access public
+ * @param string $query SQL
+ * @param mixed $inputarr プレースホルダ(スカラまたは配列)
+ * @return array $rows 連想配列のリスト
*/
- function getAll($query, $inputarr = false)
+ public function getAll($query, $inputarr = false)
{
@@ -219,3 +225,11 @@
//{{{ getOne
- function getOne($query, $inputarr = false)
+ /**
+ * 結果レコードセットのうち第1行第1列目の値を返す
+ *
+ * @access public
+ * @param string $query SQL
+ * @param mixed $inputarr プレースホルダ(スカラまたは配列)
+ * @return string $value
+ */
+ public function getOne($query, $inputarr = false)
{
@@ -226,3 +240,11 @@
//{{{ getRow
- function getRow($query, $inputarr = false)
+ /**
+ * 結果レコードセットのうち第1行目を返す
+ *
+ * @access public
+ * @param string $query SQL
+ * @param mixed $inputarr プレースホルダ(スカラまたは配列)
+ * @return array $row 連想配列
+ */
+ public function getRow($query, $inputarr = false)
{
@@ -233,3 +255,10 @@
//{{{ getCol
- function getCol($query, $inputarr = false)
+ /**
+ * 結果レコードセットのうち第1列目の値リストを返す
+ *
+ * @param string $query SQL
+ * @param mixed $inputarr プレースホルダ(スカラまたは配列)
+ * @return array $values 値リスト
+ */
+ public function getCol($query, $inputarr = false)
{
@@ -239,4 +268,17 @@
+ /**
+ * 結果レコードセットを連想配列の連想配列にして返す
+ *
+ * @param string $query SQL
+ * @param mixed $inputarr プレースホルダ(スカラまたは配列)
+ * @return array $rows 第一カラムの値をキーとする連想配列
+ */
+ public function getAssoc($sql, $inputarr = false, $force_array = false, $first2cols = false)
+ {
+ return $this->db->GetAssoc($sql, $inputarr, $force_array, $first2cols);
+ }
+
+
//{{{ execute
- function execute($query, $inputarr = false)
+ public function execute($query, $inputarr = false)
{
@@ -247,3 +289,3 @@
//{{{ replace
- function replace($table, $arrFields, $keyCols, $autoQuote = false)
+ public function replace($table, $arrFields, $keyCols, $autoQuote = false)
{
@@ -254,3 +296,3 @@
//{{{ autoExecute
- function autoExecute($table, $fields, $mode, $where = false, $forceUpdate = true, $magicq = false)
+ public function autoExecute($table, $fields, $mode, $where = false, $forceUpdate = true, $magicq = false)
{
@@ -269,3 +311,3 @@
*/
- function pageExecute($query, $nrows, $page, $inputarr = false)
+ public function pageExecute($query, $nrows, $page, $inputarr = false)
{
@@ -275,157 +317,2 @@
- // {{{ parseDSN()
-
- /**
- * Parse a data source name
- *
- * Additional keys can be added by appending a URI query string to the
- * end of the DSN.
- *
- * The format of the supplied DSN is in its fullest form:
- * <code>
- * phptype(dbsyntax)://username:password@protocol+hostspec/database?option=8&another=true
- * </code>
- *
- * Most variations are allowed:
- * <code>
- * phptype://username:password@protocol+hostspec:110//usr/db_file.db?mode=0644
- * phptype://username:password@hostspec/database_name
- * phptype://username:password@hostspec
- * phptype://username@hostspec
- * phptype://hostspec/database
- * phptype://hostspec
- * phptype(dbsyntax)
- * phptype
- * </code>
- *
- * @param string $dsn Data Source Name to be parsed
- *
- * @return array an associative array with the following keys:
- * + phptype: Database backend used in PHP (mysql, odbc etc.)
- * + dbsyntax: Database used with regards to SQL syntax etc.
- * + protocol: Communication protocol to use (tcp, unix etc.)
- * + hostspec: Host specification (hostname[:port])
- * + database: Database to use on the DBMS server
- * + username: User name for login
- * + password: Password for login
- */
- function parseDSN($dsn)
- {
- $parsed = array(
- 'phptype' => false,
- 'dbsyntax' => false,
- 'username' => false,
- 'password' => false,
- 'protocol' => false,
- 'hostspec' => false,
- 'port' => false,
- 'socket' => false,
- 'database' => false,
- );
-
- if (is_array($dsn)) {
- $dsn = array_merge($parsed, $dsn);
- if (!$dsn['dbsyntax']) {
- $dsn['dbsyntax'] = $dsn['phptype'];
- }
- return $dsn;
- }
-
- // Find phptype and dbsyntax
- if (($pos = strpos($dsn, '://')) !== false) {
- $str = substr($dsn, 0, $pos);
- $dsn = substr($dsn, $pos + 3);
- } else {
- $str = $dsn;
- $dsn = null;
- }
-
- // Get phptype and dbsyntax
- // $str => phptype(dbsyntax)
- if (preg_match('|^(.+?)\((.*?)\)$|', $str, $arr)) {
- $parsed['phptype'] = $arr[1];
- $parsed['dbsyntax'] = !$arr[2] ? $arr[1] : $arr[2];
- } else {
- $parsed['phptype'] = $str;
- $parsed['dbsyntax'] = $str;
- }
-
- if (!count($dsn)) {
- return $parsed;
- }
-
- // Get (if found): username and password
- // $dsn => username:password@protocol+hostspec/database
- if (($at = strrpos($dsn, '@')) !== false) {
- $str = substr($dsn, 0, $at);
- $dsn = substr($dsn, $at + 1);
- if (($pos = strpos($str, ':')) !== false) {
- $parsed['username'] = rawurldecode(substr($str, 0, $pos));
- $parsed['password'] = rawurldecode(substr($str, $pos + 1));
- } else {
- $parsed['username'] = rawurldecode($str);
- }
- }
-
- // Find protocol and hostspec
- if (preg_match('|^([^(]+)\((.*?)\)/?(.*?)$|', $dsn, $match)) {
- // $dsn => proto(proto_opts)/database
- $proto = $match[1];
- $proto_opts = $match[2] ? $match[2] : false;
- $dsn = $match[3];
- } else {
- // $dsn => protocol+hostspec/database (old format)
- if (strpos($dsn, '+') !== false) {
- list($proto, $dsn) = explode('+', $dsn, 2);
- }
- if (strpos($dsn, '/') !== false) {
- list($proto_opts, $dsn) = explode('/', $dsn, 2);
- } else {
- $proto_opts = $dsn;
- $dsn = null;
- }
- }
-
- // process the different protocol options
- $parsed['protocol'] = (!empty($proto)) ? $proto : 'tcp';
- $proto_opts = rawurldecode($proto_opts);
- if ($parsed['protocol'] == 'tcp') {
- if (strpos($proto_opts, ':') !== false) {
- list($parsed['hostspec'], $parsed['port']) = explode(':', $proto_opts);
- } else {
- $parsed['hostspec'] = $proto_opts;
- }
- } elseif ($parsed['protocol'] == 'unix') {
- $parsed['socket'] = $proto_opts;
- }
-
- // Get dabase if any
- // $dsn => database
- if ($dsn) {
- if (($pos = strpos($dsn, '?')) === false) {
- // /database
- $parsed['database'] = rawurldecode($dsn);
- } else {
- // /database?param1=value1¶m2=value2
- $parsed['database'] = rawurldecode(substr($dsn, 0, $pos));
- $dsn = substr($dsn, $pos + 1);
- if (strpos($dsn, '&') !== false) {
- $opts = explode('&', $dsn);
- } else { // database?param1=value1
- $opts = array($dsn);
- }
- foreach ($opts as $opt) {
- list($key, $value) = explode('=', $opt);
- if (!isset($parsed[$key])) {
- // don't allow params overwrite
- $parsed[$key] = rawurldecode($value);
- }
- }
- }
- }
-
- return $parsed;
- }
-
- // }}}
}
Only in Ethna-2.6.2011010402/class/DB: Creole.php
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/DB/PEAR.php Ethna-2.6.0beta2011102522/class/DB/PEAR.php
--- Ethna-2.6.2011010402/class/DB/PEAR.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/DB/PEAR.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -27,26 +27,29 @@
- /** @var object DB PEAR DBオブジェクト */
- var $db;
+ /**
+ * @XXX stay public because of B.C.
+ * @protected object DB DBオブジェクト
+ */
+ public $db;
- /** @var array トランザクション管理スタック */
- var $transaction = array();
+ /** @protected array トランザクション管理スタック */
+ protected $transaction = array();
- /** @var object Ethna_Logger ログオブジェクト */
- var $logger;
+ /** @protected object Ethna_Logger ログオブジェクト */
+ protected $logger;
- /** @var object Ethna_AppSQL SQLオブジェクト */
- var $sql;
+ /** @protected object Ethna_AppSQL SQLオブジェクト */
+ protected $sql;
- /** @var string DBタイプ(mysql, pgsql...) */
- var $type;
+ /** @protected string DBタイプ(mysql, pgsql...) */
+ protected $type;
- /** @var string DSN */
- var $dsn;
+ /** @protected string DSN */
+ protected $dsn;
- /** @var array DSN (DB::parseDSN()の返り値) */
- var $dsninfo;
+ /** @protected array DSN (DB::parseDSN()の返り値) */
+ protected $dsninfo;
- /** @var bool 持続接続フラグ */
- var $persistent;
+ /** @protected bool 持続接続フラグ */
+ protected $persistent;
@@ -86,3 +89,3 @@
*/
- function connect()
+ public function connect()
{
@@ -108,3 +111,3 @@
*/
- function disconnect()
+ public function disconnect()
{
@@ -124,3 +127,3 @@
*/
- function isValid()
+ public function isValid()
{
@@ -142,3 +145,3 @@
*/
- function begin()
+ public function begin()
{
@@ -166,3 +169,3 @@
*/
- function rollback()
+ public function rollback()
{
@@ -190,3 +193,3 @@
*/
- function commit()
+ public function commit()
{
@@ -217,3 +220,3 @@
*/
- function getMetaData($table)
+ public function getMetaData($table)
{
@@ -289,3 +292,3 @@
*/
- function getType()
+ public function getType()
{
@@ -303,3 +306,3 @@
*/
- function query($query)
+ public function query($query)
{
@@ -317,3 +320,3 @@
*/
- function getNextId($table_name, $field_name)
+ public function getNextId($table_name, $field_name)
{
@@ -339,3 +342,3 @@
*/
- function getInsertId()
+ public function getInsertId()
{
@@ -360,3 +363,3 @@
*/
- function fetchRow(&$res, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum = null)
+ public function fetchRow($res, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum = null)
{
@@ -392,3 +395,3 @@
*/
- function affectedRows()
+ public function affectedRows()
{
@@ -406,3 +409,3 @@
*/
- function quoteIdentifier($identifier)
+ public function quoteIdentifier($identifier)
{
@@ -439,3 +442,3 @@
*/
- function sqlquery($sqlid)
+ public function sqlquery($sqlid)
{
@@ -457,3 +460,3 @@
*/
- function sql($sqlid)
+ public function sql($sqlid)
{
@@ -475,3 +478,3 @@
*/
- function lock($tables)
+ public function lock($tables)
{
@@ -498,3 +501,3 @@
*/
- function unlock()
+ public function unlock()
{
@@ -509,3 +512,3 @@
*
- * @access private
+ * @access protected
* @param string $query SQL文
@@ -513,3 +516,3 @@
*/
- function _query($query)
+ protected _query($query)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/DB.php Ethna-2.6.0beta2011102522/class/DB.php
--- Ethna-2.6.2011010402/class/DB.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/DB.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,6 +8,5 @@
* @package Ethna
*/
-// {{{ Ethna_DB
/**
@@ -28,7 +27,10 @@
- /** @var object DB DBオブジェクト */
- var $db;
+ /**
+ * @XXX stay public because of B.C.
+ * @protected object DB DBオブジェクト
+ */
+ public $db;
- /** @var array トランザクション管理スタック */
- var $transaction = array();
+ /** @protected array トランザクション管理スタック */
+ protected $transaction = array();
@@ -41,3 +43,3 @@
* @access public
- * @param object Ethna_Controller &$controller コントローラオブジェクト
+ * @param object Ethna_Controller $controller コントローラオブジェクト
* @param string $dsn DSN
@@ -45,3 +47,3 @@
*/
- public function __construct(&$controller, $dsn, $persistent)
+ public function __construct($controller, $dsn, $persistent)
{
@@ -57,3 +59,3 @@
*/
- function connect()
+ public function connect()
{
@@ -66,3 +68,3 @@
*/
- function disconnect()
+ public function disconnect()
{
@@ -76,3 +78,3 @@
*/
- function isValid()
+ public function isValid()
{
@@ -86,3 +88,3 @@
*/
- function begin()
+ public function begin()
{
@@ -96,3 +98,3 @@
*/
- function rollback()
+ public function rollback()
{
@@ -106,3 +108,3 @@
*/
- function commit()
+ public function commit()
{
@@ -117,3 +119,3 @@
*/
- function getMetaData()
+ public function getMetaData()
{
@@ -129,3 +131,3 @@
*/
- function getDSN()
+ public function getDSN()
{
@@ -133,3 +135,156 @@
}
+
+ // {{{ parseDSN()
+ /**
+ * Parse a data source name
+ *
+ * Additional keys can be added by appending a URI query string to the
+ * end of the DSN.
+ *
+ * The format of the supplied DSN is in its fullest form:
+ * <code>
+ * phptype(dbsyntax)://username:password@protocol+hostspec/database?option=8&another=true
+ * </code>
+ *
+ * Most variations are allowed:
+ * <code>
+ * phptype://username:password@protocol+hostspec:110//usr/db_file.db?mode=0644
+ * phptype://username:password@hostspec/database_name
+ * phptype://username:password@hostspec
+ * phptype://username@hostspec
+ * phptype://hostspec/database
+ * phptype://hostspec
+ * phptype(dbsyntax)
+ * phptype
+ * </code>
+ *
+ * @param string $dsn Data Source Name to be parsed
+ *
+ * @return array an associative array with the following keys:
+ * + phptype: Database backend used in PHP (mysql, odbc etc.)
+ * + dbsyntax: Database used with regards to SQL syntax etc.
+ * + protocol: Communication protocol to use (tcp, unix etc.)
+ * + hostspec: Host specification (hostname[:port])
+ * + database: Database to use on the DBMS server
+ * + username: User name for login
+ * + password: Password for login
+ */
+ public function parseDSN($dsn)
+ {
+ $parsed = array(
+ 'phptype' => false,
+ 'dbsyntax' => false,
+ 'username' => false,
+ 'password' => false,
+ 'protocol' => false,
+ 'hostspec' => false,
+ 'port' => false,
+ 'socket' => false,
+ 'database' => false,
+ );
+
+ if (is_array($dsn)) {
+ $dsn = array_merge($parsed, $dsn);
+ if (!$dsn['dbsyntax']) {
+ $dsn['dbsyntax'] = $dsn['phptype'];
+ }
+ return $dsn;
+ }
+
+ // Find phptype and dbsyntax
+ if (($pos = strpos($dsn, '://')) !== false) {
+ $str = substr($dsn, 0, $pos);
+ $dsn = substr($dsn, $pos + 3);
+ } else {
+ $str = $dsn;
+ $dsn = null;
+ }
+
+ // Get phptype and dbsyntax
+ // $str => phptype(dbsyntax)
+ if (preg_match('|^(.+?)\((.*?)\)$|', $str, $arr)) {
+ $parsed['phptype'] = $arr[1];
+ $parsed['dbsyntax'] = !$arr[2] ? $arr[1] : $arr[2];
+ } else {
+ $parsed['phptype'] = $str;
+ $parsed['dbsyntax'] = $str;
+ }
+
+ if (!count($dsn)) {
+ return $parsed;
+ }
+
+ // Get (if found): username and password
+ // $dsn => username:password@protocol+hostspec/database
+ if (($at = strrpos($dsn, '@')) !== false) {
+ $str = substr($dsn, 0, $at);
+ $dsn = substr($dsn, $at + 1);
+ if (($pos = strpos($str, ':')) !== false) {
+ $parsed['username'] = rawurldecode(substr($str, 0, $pos));
+ $parsed['password'] = rawurldecode(substr($str, $pos + 1));
+ } else {
+ $parsed['username'] = rawurldecode($str);
+ }
+ }
+
+ // Find protocol and hostspec
+ if (preg_match('|^([^(]+)\((.*?)\)/?(.*?)$|', $dsn, $match)) {
+ // $dsn => proto(proto_opts)/database
+ $proto = $match[1];
+ $proto_opts = $match[2] ? $match[2] : false;
+ $dsn = $match[3];
+ } else {
+ // $dsn => protocol+hostspec/database (old format)
+ if (strpos($dsn, '+') !== false) {
+ list($proto, $dsn) = explode('+', $dsn, 2);
+ }
+ if (strpos($dsn, '/') !== false) {
+ list($proto_opts, $dsn) = explode('/', $dsn, 2);
+ } else {
+ $proto_opts = $dsn;
+ $dsn = null;
+ }
+ }
+
+ // process the different protocol options
+ $parsed['protocol'] = (!empty($proto)) ? $proto : 'tcp';
+ $proto_opts = rawurldecode($proto_opts);
+ if ($parsed['protocol'] == 'tcp') {
+ if (strpos($proto_opts, ':') !== false) {
+ list($parsed['hostspec'], $parsed['port']) = explode(':', $proto_opts);
+ } else {
+ $parsed['hostspec'] = $proto_opts;
+ }
+ } elseif ($parsed['protocol'] == 'unix') {
+ $parsed['socket'] = $proto_opts;
+ }
+
+ // Get dabase if any
+ // $dsn => database
+ if ($dsn) {
+ if (($pos = strpos($dsn, '?')) === false) {
+ // /database
+ $parsed['database'] = rawurldecode($dsn);
+ } else {
+ // /database?param1=value1¶m2=value2
+ $parsed['database'] = rawurldecode(substr($dsn, 0, $pos));
+ $dsn = substr($dsn, $pos + 1);
+ if (strpos($dsn, '&') !== false) {
+ $opts = explode('&', $dsn);
+ } else { // database?param1=value1
+ $opts = array($dsn);
+ }
+ foreach ($opts as $opt) {
+ list($key, $value) = explode('=', $opt);
+ if (!isset($parsed[$key])) {
+ // don't allow params overwrite
+ $parsed[$key] = rawurldecode($value);
+ }
+ }
+ }
+ }
+
+ return $parsed;
}
// }}}
+}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Error.php Ethna-2.6.0beta2011102522/class/Error.php
--- Ethna-2.6.2011010402/class/Error.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Error.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -22,4 +22,3 @@
{
- if ($errno === E_STRICT || $errno === E_DEPRECATED
- || ($errno & error_reporting()) === 0) {
+ if (($errno & error_reporting()) === 0) {
return;
@@ -44,4 +43,9 @@
case E_STRICT:
- case E_DEPRECATED:
$php_errno = 'Notice'; break;
+ case E_USER_DEPRECATED:
+ case E_DEPRECATED:
+ $php_errno = 'Deprecated'; break;
+ case E_RECOVERABLE_ERROR:
+ $php_errno = 'Recoverable error'; break;
+ break;
default:
@@ -68,2 +72,10 @@
+ // ignore these errors because so many errors occurs in external libraries (like PEAR)
+ if ($errno === E_STRICT) {
+ return true;
+ }
+ if ($errno === E_RECOVERABLE_ERROR) {
+ return true;
+ }
+
// printf()
@@ -79,4 +91,5 @@
}
- if ($is_debug == true && $has_echo === false) {
- return true;
+ if ($is_debug == true && $has_echo === false
+ && $errno !== E_DEPRECATED) {
+ return false;
}
@@ -105,22 +118,22 @@
- /** @var object Ethna_I18N i18nオブジェクト */
- var $i18n;
+ /** @protected object Ethna_I18N i18nオブジェクト */
+ protected $i18n;
- /** @var object Ethna_Logger loggerオブジェクト */
- var $logger;
+ /** @protected object Ethna_Logger loggerオブジェクト */
+ protected $logger;
- /** @var string エラーメッセージ */
- var $message;
+ /** @protected string エラーメッセージ */
+ protected $message;
- /** @var integer エラーコード */
- var $code;
+ /** @protected integer エラーコード */
+ protected $code;
- /** @var integer エラーモード */
- var $mode;
+ /** @protected integer エラーモード */
+ protected $mode;
- /** @var array エラーモード依存のオプション */
- var $options;
+ /** @protected array エラーモード依存のオプション */
+ protected $options;
- /** @var string ユーザー定義もしくはデバッグ関連の追加情報を記した文字列。 */
- var $userinfo;
+ /** @protected string ユーザー定義もしくはデバッグ関連の追加情報を記した文字列。 */
+ protected $userinfo;
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Filter.php Ethna-2.6.0beta2011102522/class/Filter.php
--- Ethna-2.6.2011010402/class/Filter.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Filter.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -29,13 +29,13 @@
- /** @var object Ethna_Controller controllerオブジェクト */
- var $controller;
+ /** @protected object Ethna_Controller controllerオブジェクト */
+ protected $controller;
- /** @var object Ethna_Controller controllerオブジェクト($controllerの省略形) */
- var $ctl;
+ /** @protected object Ethna_Controller controllerオブジェクト($controllerの省略形) */
+ protected $ctl;
- /** @var object Ethna_Config 設定オブジェクト */
- var $config;
+ /** @protected object Ethna_Config 設定オブジェクト */
+ protected $config;
- /** @var object Ethna_Logger ログオブジェクト */
- var $logger;
+ /** @protected object Ethna_Logger ログオブジェクト */
+ protected $logger;
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Generator.php Ethna-2.6.0beta2011102522/class/Generator.php
--- Ethna-2.6.2011010402/class/Generator.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Generator.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -57,3 +57,3 @@
// 引数はプラグイン依存とする
- $ret = call_user_func_array(array(&$generator, 'generate'), $arg_list);
+ $ret = call_user_func_array(array($generator, 'generate'), $arg_list);
return $ret;
@@ -97,3 +97,3 @@
// 引数はプラグイン依存とする
- $ret = call_user_func_array(array(&$generator, 'remove'), $arg_list);
+ $ret = call_user_func_array(array($generator, 'remove'), $arg_list);
return $ret;
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Getopt.php Ethna-2.6.0beta2011102522/class/Getopt.php
--- Ethna-2.6.2011010402/class/Getopt.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Getopt.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -46,3 +46,3 @@
*/
- function readPHPArgv()
+ public function readPHPArgv()
{
@@ -68,3 +68,3 @@
*/
- function getopt($args, $shortoptions, $longoptions = NULL)
+ public function getopt($args, $shortoptions, $longoptions = NULL)
{
@@ -253,5 +253,5 @@
* エラーの場合は Ethna_Error
- * @access private
+ * @access protected
*/
- function _parseShortOption($sopts)
+ protected function _parseShortOption($sopts)
{
@@ -299,5 +299,5 @@
* エラーの場合は Ethna_Error
- * @access private
+ * @access protected
*/
- function _parseLongOption($lopts)
+ protected function _parseLongOption($lopts)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Handle.php Ethna-2.6.0beta2011102522/class/Handle.php
--- Ethna-2.6.2011010402/class/Handle.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Handle.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -25,10 +25,10 @@
- /** @var object Ethna_Controller controllerオブジェクト */
- var $controller;
+ /** @protected object Ethna_Controller controllerオブジェクト */
+ protected $controller;
- /** @var object Ethna_Controller controllerオブジェクト($controllerの省略形) */
- var $ctl;
+ /** @protected object Ethna_Controller controllerオブジェクト($controllerの省略形) */
+ protected $ctl;
- /** @var object Ethna_Pluguin pluginオブジェクト */
- var $plugin;
+ /** @protected object Ethna_Pluguin pluginオブジェクト */
+ protected $plugin;
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/I18N.php Ethna-2.6.0beta2011102522/class/I18N.php
--- Ethna-2.6.2011010402/class/I18N.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/I18N.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -50,28 +50,28 @@
- /** @var Ethna_Controller コントローラーオブジェクト */
- var $ctl;
+ /** @protected Ethna_Controller コントローラーオブジェクト */
+ protected $ctl;
- /** @var bool gettextフラグ */
- var $use_gettext;
+ /** @protected bool gettextフラグ */
+ protected $use_gettext;
- /** @var string ロケール */
- var $locale;
+ /** @protected string ロケール */
+ protected $locale;
- /** @var string プロジェクトのロケールディレクトリ */
- var $locale_dir;
+ /** @protected string プロジェクトのロケールディレクトリ */
+ protected $locale_dir;
- /** @var string アプリケーションID */
- var $appid;
+ /** @protected string アプリケーションID */
+ protected $appid;
- /** @var string システム側エンコーディング */
- var $systemencoding;
+ /** @protected string システム側エンコーディング */
+ protected $systemencoding;
- /** @var string クライアント側エンコーディング */
- var $clientencoding;
+ /** @protected string クライアント側エンコーディング */
+ protected $clientencoding;
- /** @var mixed Ethna独自のメッセージカタログ */
- var $messages;
+ /** @protected mixed Ethna独自のメッセージカタログ */
+ protected $messages;
- /** @var mixed ロガーオブジェクト */
- var $logger;
+ /** @protected mixed ロガーオブジェクト */
+ protected $logger;
@@ -135,3 +135,3 @@
*/
- function setLanguage($locale, $systemencoding = null, $clientencoding = null)
+ public function setLanguage($locale, $systemencoding = null, $clientencoding = null)
{
@@ -162,3 +162,3 @@
*/
- function get($msg)
+ public function get($msg)
{
@@ -227,3 +227,3 @@
*/
- function _makeEthnaMsgCatalog()
+ private function _makeEthnaMsgCatalog()
{
@@ -273,3 +273,3 @@
*/
- function parseEthnaMsgCatalog($file)
+ public function parseEthnaMsgCatalog($file)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/InfoManager.php Ethna-2.6.0beta2011102522/class/InfoManager.php
--- Ethna-2.6.2011010402/class/InfoManager.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/InfoManager.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -56,3 +56,3 @@
* @access public
- * @param object Ethna_Backend &$backend Ethna_Backendオブジェクト
+ * @param object Ethna_Backend $backend Ethna_Backendオブジェクト
*/
@@ -89,3 +90,4 @@
if (file_exists($this->cache_class_list_file)
- && filesize($this->cache_class_list_file) > 0) {
+ && filesize($this->cache_class_list_file) > 0)
+ {
$fp = fopen($this->cache_class_list_file, 'r');
@@ -343,4 +345,4 @@
$manifest_class_list = array();
- foreach ($this->ctl->action as $action_name => $action) {
- if ($action_name == '__ethna_info__') {
+ foreach ($this->_getInvisibleProperty($this->ctl, 'action') as $action_name => $action) {
+ if ($action_name == '__ethna_info__' || $action_name == '__ethna_unittest__') {
continue;
@@ -371,2 +373,5 @@
}
+ else {
+ $elt['action_class_info'] = array('undef' => false);
+ }
}
@@ -377,2 +383,5 @@
}
+ else {
+ $elt['action_form_info'] = array('undef' => false);
+ }
}
@@ -528,4 +537,4 @@
$manifest_forward_list = array();
- foreach ($this->ctl->forward as $forward_name => $forward) {
- if ($forward_name == '__ethna_info__') {
+ foreach ($this->_getInvisibleProperty($this->ctl, 'forward') as $forward_name => $forward) {
+ if ($forward_name == '__ethna_info__' || $forward_name == '__ethna_unittest__') {
continue;
@@ -538,2 +547,5 @@
}
+ else {
+ $elt['template_file_info'] = array('undef' => false);
+ }
@@ -542,2 +554,3 @@
$elt['view_class'] = null;
+ $elt['view_class_info'] = array('undef' => false);
} else if (class_exists($elt['view_class']) == false) {
@@ -650,3 +663,3 @@
$db_list = array();
- foreach ($this->ctl->db as $key => $db) {
+ foreach ($dbl = $this->_getInvisibleProperty($this->ctl, 'db') as $key => $db) {
if ($key == "") {
@@ -700,3 +713,3 @@
$n = 1;
- foreach ($this->ctl->filter as $filter) {
+ foreach ($this->_getInvisibleProperty($this->ctl, 'filter') as $filter) {
$key = sprintf(_et('Filter(%d)'), $n);
@@ -733,5 +746,6 @@
$plugin->searchAllPluginSrc($type);
- if (isset($plugin->src_registry[$type])) {
+ $src_registry = $this->_getInvisibleProperty($plugin, 'src_registry');
+ if (isset($src_registry[$type])) {
$elts = array();
- foreach ($plugin->src_registry[$type] as $name => $src) {
+ foreach ($src_registry[$type] as $name => $src) {
if (empty($src)) {
@@ -748,2 +762,11 @@
}
+
+ private function _getInvisibleProperty($obj, $prop_name)
+ {
+ $ref = new ReflectionClass($obj);
+ $prop = $ref->getProperty($prop_name);
+ $prop->setAccessible(true);
+ $prop_ret = $prop->getValue($obj);
+ return $prop_ret;
+ }
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Logger.php Ethna-2.6.0beta2011102522/class/Logger.php
--- Ethna-2.6.2011010402/class/Logger.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Logger.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -36,4 +36,4 @@
- /** @var array ログファシリティ一覧 */
- var $log_facility_list = array(
+ /** @protected array ログファシリティ一覧 */
+ protected $log_facility_list = array(
'auth' => array('name' => 'LOG_AUTH'),
@@ -52,4 +52,4 @@
- /** @var array ログレベル一覧 */
- var $log_level_list = array(
+ /** @protected array ログレベル一覧 */
+ protected $log_level_list = array(
'emerg' => array('name' => 'LOG_EMERG', 'value' => 7),
@@ -64,37 +64,37 @@
- /** @var object Ethna_Controller controllerオブジェクト */
- var $controller;
+ /** @protected object Ethna_Controller controllerオブジェクト */
+ protected $controller;
- /** @var object Ethna_Controller controllerオブジェクト($controllerの省略形) */
- var $ctl;
+ /** @protected object Ethna_Controller controllerオブジェクト($controllerの省略形) */
+ protected $ctl;
- /** @var array ログファシリティ */
- var $facility = array();
+ /** @protected array ログファシリティ */
+ protected $facility = array();
- /** @var array ログレベル */
- var $level = array();
+ /** @protected array ログレベル */
+ protected $level = array();
- /** @var array ログオプション */
- var $option = array();
+ /** @protected array ログオプション */
+ protected $option = array();
- /** @var array メッセージフィルタ(出力) */
- var $message_filter_do = array();
+ /** @protected array メッセージフィルタ(出力) */
+ protected $message_filter_do = array();
- /** @var array メッセージフィルタ(無視) */
- var $message_filter_ignore = array();
+ /** @protected array メッセージフィルタ(無視) */
+ protected $message_filter_ignore = array();
- /** @var int アラートレベル */
- var $alert_level;
+ /** @protected int アラートレベル */
+ protected $alert_level;
- /** @var string アラートメールアドレス */
- var $alert_mailaddress;
+ /** @protected string アラートメールアドレス */
+ protected $alert_mailaddress;
- /** @var array Ethna_LogWriter ログ出力オブジェクト */
- var $writer = array();
+ /** @protected array Ethna_LogWriter ログ出力オブジェクト */
+ protected $writer = array();
- /** @var bool ログ出力開始フラグ */
- var $is_begin = false;
+ /** @protected bool ログ出力開始フラグ */
+ protected $is_begin = false;
- /** @var array ログスタック(begin()前にlog()が呼び出された場合のスタック) */
- var $log_stack = array();
+ /** @protected array ログスタック(begin()前にlog()が呼び出された場合のスタック) */
+ protected $log_stack = array();
@@ -110,3 +110,3 @@
*/
- public function __construct(&$controller)
+ public function __construct($controller)
{
@@ -202,3 +202,3 @@
*/
- function getLogFacility()
+ public function getLogFacility()
{
@@ -247,3 +247,3 @@
*/
- function begin()
+ public function begin()
{
@@ -287,3 +287,3 @@
*/
- function log($level, $message)
+ public function log($level, $message)
{
@@ -339,3 +339,3 @@
*/
- function end()
+ public function end()
{
@@ -358,3 +358,3 @@
*/
- function _getLogWriter($option, $facility = null)
+ protected function _getLogWriter($option, $facility = null)
{
@@ -408,3 +408,3 @@
*/
- function _alert($message)
+ protected function _alert($message)
{
@@ -451,3 +451,3 @@
*/
- function _evalMessageMask($filter, $message)
+ private function _evalMessageMask($filter, $message)
{
@@ -472,3 +472,3 @@
*/
- function _evalLevelMask($src, $dst)
+ private function _evalLevelMask($src, $dst)
{
@@ -511,3 +511,3 @@
*/
- function _parseLogOption($option)
+ private function _parseLogOption($option)
{
@@ -541,3 +541,3 @@
*/
- function _parseLogFacility($facility)
+ private function _parseLogFacility($facility)
{
@@ -556,3 +556,3 @@
*/
- function _parseLogLevel($level)
+ private function _parseLogLevel($level)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/MailSender.php Ethna-2.6.0beta2011102522/class/MailSender.php
--- Ethna-2.6.2011010402/class/MailSender.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/MailSender.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -54,5 +54,5 @@
* @access public
- * @param object Ethna_Backend &$backend backendオブジェクト
+ * @param object Ethna_Backend $backend backendオブジェクト
*/
- public function __construct(&$backend)
+ public function __construct($backend)
{
@@ -272,3 +272,3 @@
*/
- function &getRenderer()
+ function getRenderer()
{
@@ -284,3 +284,3 @@
*/
- function &getTemplateEngine()
+ function getTemplateEngine()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/PearWrapper.php Ethna-2.6.0beta2011102522/class/PearWrapper.php
--- Ethna-2.6.2011010402/class/PearWrapper.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/PearWrapper.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -32,22 +32,22 @@
- /** @var string channel url of ethna repositry */
- var $channel;
+ /** @protected string channel url of ethna repositry */
+ protected $channel;
- /** @var string target, 'master' or 'local' */
- var $target;
+ /** @protected string target, 'master' or 'local' */
+ protected $target;
- /** @var object controller object collesponding to the target */
- var $target_ctl;
+ /** @protected object controller object collesponding to the target */
+ protected $target_ctl;
- /** @var object PEAR_Config PEAR_Config object */
- var $config;
+ /** @protected object PEAR_Config PEAR_Config object */
+ protected $config;
- /** @var object PEAR_Registry PEAR_Registry object */
- var $registry;
+ /** @protected object PEAR_Registry PEAR_Registry object */
+ protected $registry;
- /** @var object PEAR_Frontend PEAR_Frontend(_CLI) object */
- var $ui;
+ /** @protected object PEAR_Frontend PEAR_Frontend(_CLI) object */
+ protected $ui;
- /** @var array options for pearcmd */
- var $_pearopt;
+ /** @protected array options for pearcmd */
+ protected $_pearopt;
@@ -96,3 +96,3 @@
// TODO: if PEAR/Command/Install.php is newer than 1.117, displayError goes well.
- PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array(&$this->ui, 'displayFatalError'));
+ PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($this->ui, 'displayFatalError'));
@@ -646,3 +646,3 @@
*/
- private function _getPearOpt(&$cmd_obj, $cmd_str, $opt_array)
+ private function _getPearOpt($cmd_obj, $cmd_str, $opt_array)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Abstract.php Ethna-2.6.0beta2011102522/class/Plugin/Abstract.php
--- Ethna-2.6.2011010402/class/Plugin/Abstract.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Abstract.php 2011-10-25 22:50:53.000000000 +0900
@@ -7,3 +7,3 @@
* @package Ethna
*/
@@ -19,3 +19,3 @@
// abstract class Ethna_Plugin_Abstract
-class Ethna_Plugin_Abstract
+abstract class Ethna_Plugin_Abstract
{
@@ -25,30 +25,30 @@
- /** @var string plugin type */
- var $type = null;
+ /** @protected string plugin type */
+ protected $type = null;
- /** @var string plugin name */
- var $name = null;
+ /** @protected string plugin name */
+ protected $name = null;
- /** @var object Ethna_Controller Controller Object */
- var $controller;
- var $ctl; /* Alias */
+ /** @protected object Ethna_Controller Controller Object */
+ protected $controller;
+ protected $ctl; /* Alias */
- /** @var object Ethna_Backend Backend Object */
- var $backend;
+ /** @protected object Ethna_Backend Backend Object */
+ protected $backend;
- /** @var object Ethna_ActionForm ActionForm Object */
- var $action_form;
- var $af; /* Alias */
+ /** @protected object Ethna_ActionForm ActionForm Object */
+ protected $action_form;
+ protected $af; /* Alias */
- /** @var object Ethna_Session Session Object */
- var $session;
+ /** @protected object Ethna_Session Session Object */
+ protected $session;
- /** @var array plugin configure */
- var $config;
+ /** @protected array plugin configure */
+ protected $config;
- /** @var array plugin configure for default */
- var $config_default = array();
+ /** @protected array plugin configure for default */
+ protected $config_default = array();
- /** @var object Ethna_Logger Logger Object */
- var $logger;
+ /** @protected object Ethna_Logger Logger Object */
+ protected $logger;
@@ -58,6 +58,5 @@
* @access public
- * @param object Ethna_Controller &$controller Controller Object
+ * @param object Ethna_Controller $controller Controller Object
*/
- // function __construct(&$controller)
- function Ethna_Plugin_Abstract($controller, $type = null, $name = null)
+ public function __construct($controller, $type = null, $name = null)
{
@@ -96,3 +95,3 @@
*/
- function getType()
+ public function getType()
{
@@ -106,3 +105,3 @@
*/
- function getName()
+ public function getName()
{
@@ -112,2 +111,12 @@
/**
+ * getConfig
+ *
+ * @return array $config
+ */
+ public function getConfig()
+ {
+ return $this->config;
+ }
+
+ /**
* _load
@@ -116,3 +125,3 @@
*/
- function _load()
+ protected function _load()
{
@@ -125,3 +134,3 @@
*/
- function _loadConfig()
+ protected function _loadConfig()
{
@@ -152,3 +161,3 @@
*/
- function _detectType($type = null)
+ protected function _detectType($type = null)
{
@@ -172,3 +181,3 @@
*/
- function _detectName($name = null)
+ protected function _detectName($name = null)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Cachemanager/Localfile.php Ethna-2.6.0beta2011102522/class/Plugin/Cachemanager/Localfile.php
--- Ethna-2.6.2011010402/class/Plugin/Cachemanager/Localfile.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Cachemanager/Localfile.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -38,3 +38,3 @@
*/
- function get($key, $lifetime = null, $namespace = null)
+ public function get($key, $lifetime = null, $namespace = null)
{
@@ -47,3 +47,3 @@
|| ($st = stat($cache_file)) === false) {
- return Ethna::raiseError('fopen failed', E_CACHE_NO_VALUE);
+ return Ethna::raiseError("No such cache (key=%s, file=%s)", E_CACHE_NO_VALUE, $key, $cache_file);
}
@@ -51,3 +51,3 @@
if (($st[9]+$lifetime) < time()) {
- return Ethna::raiseError('fopen failed', E_CACHE_EXPIRED);
+ return Ethna::raiseError("Cache expired (key=%s, file=%s)", E_CACHE_EXPIRED, $key, $cache_file);
}
@@ -103,3 +103,3 @@
*/
- function getLastModified($key, $namespace = null)
+ public function getLastModified($key, $namespace = null)
{
@@ -124,3 +124,3 @@
*/
- function isCached($key, $lifetime = null, $namespace = null)
+ public function isCached($key, $lifetime = null, $namespace = null)
{
@@ -153,3 +153,3 @@
*/
- function set($key, $value, $timestamp = null, $namespace = null)
+ public function set($key, $value, $timestamp = null, $namespace = null)
{
@@ -207,3 +207,3 @@
*/
- function clear($key, $namespace = null)
+ public function clear($key, $namespace = null)
{
@@ -222,3 +222,3 @@
*/
- function _getCacheDir($namespace, $key)
+ private function _getCacheDir($namespace, $key)
{
@@ -262,3 +262,3 @@
*/
- function _getCacheFile($namespace, $key)
+ private function _getCacheFile($namespace, $key)
{
@@ -277,3 +277,3 @@
*/
- function _escape($string)
+ private function _escape($string)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Cachemanager/Memcache.php Ethna-2.6.0beta2011102522/class/Plugin/Cachemanager/Memcache.php
--- Ethna-2.6.2011010402/class/Plugin/Cachemanager/Memcache.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Cachemanager/Memcache.php 2011-10-25 22:50:53.000000000 +0900
@@ -12,3 +12,3 @@
* @package Ethna
*/
@@ -26,10 +26,10 @@
- /** @var object MemCache MemCacheオブジェクト */
- var $memcache = null;
+ /** @var object Memcache Memcacheオブジェクト */
+ private $memcache = null;
/** @var bool 圧縮フラグ */
- var $compress = true;
+ protected $compress = true;
/** @var array plugin configure */
- var $config_default = array(
+ protected $config_default = array(
'host' => 'localhost',
@@ -47,3 +47,3 @@
*/
- function _load()
+ protected function _load()
{
@@ -58,3 +58,3 @@
*/
- function _getMemcache($cache_key, $namespace = null)
+ protected function _getMemcache($cache_key, $namespace = null)
{
@@ -101,3 +101,3 @@
*/
- function _getMemcacheInfo($cache_key, $namespace)
+ protected function _getMemcacheInfo($cache_key, $namespace)
{
@@ -144,3 +144,3 @@
*/
- function get($key, $lifetime = null, $namespace = null)
+ public function get($key, $lifetime = null, $namespace = null)
{
@@ -183,3 +183,3 @@
*/
- function getLastModified($key, $namespace = null)
+ public function getLastModified($key, $namespace = null)
{
@@ -210,3 +210,3 @@
*/
- function isCached($key, $lifetime = null, $namespace = null)
+ public function isCached($key, $lifetime = null, $namespace = null)
{
@@ -226,3 +226,3 @@
*/
- function set($key, $value, $timestamp = null, $namespace = null)
+ public function set($key, $value, $timestamp = null, $namespace = null)
{
@@ -251,3 +251,3 @@
*/
- function clear($key, $namespace = null)
+ public function clear($key, $namespace = null)
{
@@ -277,3 +277,3 @@
*/
- function lock($key, $timeout = 5, $namespace = null)
+ public function lock($key, $timeout = 5, $namespace = null)
{
@@ -313,3 +313,3 @@
*/
- function unlock($key, $namespace = null)
+ public function unlock($key, $namespace = null)
{
@@ -331,3 +331,3 @@
*/
- function _getCacheKey($namespace, $key)
+ private function _getCacheKey($namespace, $key)
{
@@ -350,3 +350,3 @@
*/
- function setCompress($flag) {
+ public function setCompress($flag) {
$this->compress = $flag;
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Cachemanager/Memcached.php Ethna-2.6.0beta2011102522/class/Plugin/Cachemanager/Memcached.php
--- Ethna-2.6.2011010402/class/Plugin/Cachemanager/Memcached.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Cachemanager/Memcached.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package Ethna
*/
@@ -41,3 +41,3 @@
*/
- function _load()
+ protected function _load()
{
@@ -77,3 +77,3 @@
*/
- function get($key, $lifetime = null, $namespace = null)
+ public function get($key, $lifetime = null, $namespace = null)
{
@@ -120,3 +120,3 @@
*/
- function getLastModified($key, $namespace = null)
+ public function getLastModified($key, $namespace = null)
{
@@ -143,3 +143,3 @@
*/
- function isCached($key, $lifetime = null, $namespace = null)
+ public function isCached($key, $lifetime = null, $namespace = null)
{
@@ -160,3 +160,3 @@
*/
- function set($key, $value, $timestamp = null, $namespace = null, $expiration = null)
+ public function set($key, $value, $timestamp = null, $namespace = null, $expiration = null)
{
@@ -212,3 +212,3 @@
*/
- function lock($key, $timeout = 5, $namespace = null)
+ public function lock($key, $timeout = 5, $namespace = null)
{
@@ -226,3 +226,3 @@
*/
- function unlock($key, $namespace = null)
+ public function unlock($key, $namespace = null)
{
@@ -241,3 +241,3 @@
*/
- function setMemcachedOption($opt, $value)
+ public function setMemcachedOption($opt, $value)
{
@@ -254,3 +254,3 @@
*/
- function getMemcachedOption($opt)
+ public function getMemcachedOption($opt)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Cachemanager.php Ethna-2.6.0beta2011102522/class/Plugin/Cachemanager.php
--- Ethna-2.6.2011010402/class/Plugin/Cachemanager.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Cachemanager.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -23,9 +23,3 @@
/** @var string 現在のネームスペース */
- var $namespace = '';
-
- /** @var object Ethna_Backend backendオブジェクト */
- //var $backend;
-
- /** @var object Ethna_Config 設定オブジェクト */
- //var $config;
+ protected $namespace = '';
@@ -34,14 +28,2 @@
/**
- * Cachemanagerクラスのコンストラクタ
- *
- * @access public
- */
- /*
- function Ethna_Plugin_Cachemanager($controller)
- {
- parent::__construct($controller);
- }
- */
-
- /**
* _load
@@ -50,3 +32,3 @@
*/
- function _load()
+ protected function _load()
{
@@ -63,3 +45,3 @@
*/
- function getNamespace($namespace = null)
+ public function getNamespace($namespace = null)
{
@@ -79,3 +61,3 @@
*/
- function setNamespace($namespace)
+ public function setNamespace($namespace)
{
@@ -98,3 +80,3 @@
*/
- function get($key, $lifetime = null, $namespace = null)
+ public function get($key, $lifetime = null, $namespace = null)
{
@@ -110,3 +92,3 @@
*/
- function getLastModified($key, $namespace = null)
+ public function getLastModified($key, $namespace = null)
{
@@ -123,3 +105,3 @@
*/
- function set($key, $value, $timestamp = null, $namespace = null)
+ public function set($key, $value, $timestamp = null, $namespace = null)
{
@@ -135,3 +117,3 @@
*/
- function isCached($key, $timestamp = null, $namespace = null)
+ public function isCached($key, $timestamp = null, $namespace = null)
{
@@ -146,3 +128,3 @@
*/
- function clear($key, $namespace = null)
+ public function clear($key, $namespace = null)
{
@@ -159,3 +141,3 @@
*/
- function lock($key, $timeout = 5, $namespace = null)
+ public function lock($key, $timeout = 5, $namespace = null)
{
@@ -172,3 +154,3 @@
*/
- function unlock($key, $namespace = null)
+ public function unlock($key, $namespace = null)
{
@@ -185,3 +167,3 @@
*/
- function setCompress($flag) {
+ public function setCompress($flag) {
return false;
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Csrf/Session.php Ethna-2.6.0beta2011102522/class/Plugin/Csrf/Session.php
--- Ethna-2.6.2011010402/class/Plugin/Csrf/Session.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Csrf/Session.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -29,3 +29,3 @@
*/
- function set()
+ public function set()
{
@@ -52,3 +52,3 @@
*/
- function get()
+ public function get()
{
@@ -66,3 +66,3 @@
*/
- function remove()
+ public function remove()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Csrf.php Ethna-2.6.0beta2011102522/class/Plugin/Csrf.php
--- Ethna-2.6.2011010402/class/Plugin/Csrf.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Csrf.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -27,15 +27,4 @@
- //var $controller;
-
- /** @var object Ethna_Controller controllerオブジェクト($controllerの省略形) */
- //var $ctl;
-
- /** @var object Ethna_Config 設定オブジェクト */
- //var $config;
-
- /** @var object Ethna_Logger ログオブジェクト */
- //var $logger;
-
/** @var string 共有トークン名 */
- var $token_name = 'ethna_csrf';
+ protected $token_name = 'ethna_csrf';
@@ -56,3 +45,3 @@
*/
- function set()
+ public function set()
{
@@ -67,3 +56,3 @@
*/
- function get()
+ public function get()
{
@@ -78,3 +67,3 @@
*/
- function remove()
+ public function remove()
{
@@ -89,3 +78,3 @@
*/
- function getTokenName()
+ public function getTokenName()
{
@@ -100,3 +89,3 @@
*/
- function isValid()
+ public function isValid()
{
@@ -123,3 +112,3 @@
*/
- function _generateKey()
+ protected function _generateKey()
{
@@ -134,3 +123,3 @@
*/
- function _get_token()
+ protected function _get_token()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Filter.php Ethna-2.6.0beta2011102522/class/Plugin/Filter.php
--- Ethna-2.6.2011010402/class/Plugin/Filter.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Filter.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -33,3 +33,3 @@
*/
- function preFilter()
+ public function preFilter()
{
@@ -44,3 +44,3 @@
*/
- function preActionFilter($action_name)
+ public function preActionFilter($action_name)
{
@@ -57,3 +57,3 @@
*/
- function postActionFilter($action_name, $forward_name)
+ public function postActionFilter($action_name, $forward_name)
{
@@ -68,3 +68,3 @@
*/
- function postFilter()
+ public function postFilter()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Generator/Action.php Ethna-2.6.0beta2011102522/class/Plugin/Generator/Action.php
--- Ethna-2.6.2011010402/class/Plugin/Generator/Action.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Generator/Action.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -30,3 +30,3 @@
*/
- function &generate($action_name, $skelton = null, $gateway = GATEWAY_WWW)
+ function generate($action_name, $skelton = null, $gateway = GATEWAY_WWW)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Generator/ActionTest.php Ethna-2.6.0beta2011102522/class/Plugin/Generator/ActionTest.php
--- Ethna-2.6.2011010402/class/Plugin/Generator/ActionTest.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Generator/ActionTest.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -31,3 +31,3 @@
*/
- function &generate($action_name, $skelton = null, $gateway = GATEWAY_WWW)
+ function generate($action_name, $skelton = null, $gateway = GATEWAY_WWW)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Generator/CreatePlugin.php Ethna-2.6.0beta2011102522/class/Plugin/Generator/CreatePlugin.php
--- Ethna-2.6.2011010402/class/Plugin/Generator/CreatePlugin.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Generator/CreatePlugin.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -31,3 +31,3 @@
*/
- function &generate($basedir, $types = array(), $forpackage = false, $plugin_name)
+ function generate($basedir, $types = array(), $forpackage = false, $plugin_name)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Generator/EntryPoint.php Ethna-2.6.0beta2011102522/class/Plugin/Generator/EntryPoint.php
--- Ethna-2.6.2011010402/class/Plugin/Generator/EntryPoint.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Generator/EntryPoint.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -29,3 +29,3 @@
*/
- function &generate($action_name, $skelton = null, $gateway = GATEWAY_WWW)
+ function generate($action_name, $skelton = null, $gateway = GATEWAY_WWW)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Generator/I18n.php Ethna-2.6.0beta2011102522/class/Plugin/Generator/I18n.php
--- Ethna-2.6.2011010402/class/Plugin/Generator/I18n.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Generator/I18n.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -25,16 +25,16 @@
- /** @var array 解析済みトークン */
- var $tokens = array();
+ /** @protected array 解析済みトークン */
+ protected $tokens = array();
- /** @var string ロケール名 */
- var $locale;
+ /** @protected string ロケール名 */
+ protected $locale;
- /** @var boolean gettext利用フラグ */
- var $use_gettext;
+ /** @protected boolean gettext利用フラグ */
+ protected $use_gettext;
- /** @var boolean 既存ファイルが存在した場合にtrue */
- var $file_exists;
+ /** @protected boolean 既存ファイルが存在した場合にtrue */
+ protected $file_exists;
- /** @var string 実行時のUnix Time(ファイル名生成用) */
- var $time;
+ /** @protected string 実行時のUnix Time(ファイル名生成用) */
+ protected $time;
@@ -51,3 +51,3 @@
*/
- function &generate($locale, $use_gettext, $ext_dirs = array())
+ function generate($locale, $use_gettext, $ext_dirs = array())
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Generator/Template.php Ethna-2.6.0beta2011102522/class/Plugin/Generator/Template.php
--- Ethna-2.6.2011010402/class/Plugin/Generator/Template.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Generator/Template.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -31,3 +31,3 @@
*/
- function &generate($forward_name, $skelton = null, $locale, $encoding)
+ function generate($forward_name, $skelton = null, $locale, $encoding)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Generator/Test.php Ethna-2.6.0beta2011102522/class/Plugin/Generator/Test.php
--- Ethna-2.6.2011010402/class/Plugin/Generator/Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Generator/Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -29,3 +29,3 @@
*/
- function &generate($skelfile, $name)
+ function generate($skelfile, $name)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Generator/ViewTest.php Ethna-2.6.0beta2011102522/class/Plugin/Generator/ViewTest.php
--- Ethna-2.6.2011010402/class/Plugin/Generator/ViewTest.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Generator/ViewTest.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -29,3 +29,3 @@
*/
- function &generate($forward_name, $skelton = null, $gateway = GATEWAY_WWW)
+ function generate($forward_name, $skelton = null, $gateway = GATEWAY_WWW)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Handle/MakePluginPackage.php Ethna-2.6.0beta2011102522/class/Plugin/Handle/MakePluginPackage.php
--- Ethna-2.6.2011010402/class/Plugin/Handle/MakePluginPackage.php 2011-01-04 02:46:01.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Handle/MakePluginPackage.php 2011-10-25 22:50:53.000000000 +0900
@@ -11,3 +11,3 @@
* @package Ethna
*/
@@ -30,3 +30,3 @@
*/
- function &_parseArgList()
+ function _parseArgList()
{
@@ -175,3 +175,3 @@
*/
- function &_makePackage($setting, $workdir)
+ function _makePackage($setting, $workdir)
{
@@ -221,3 +221,3 @@
foreach ($setting['callback'] as $method => $params) {
- $r = call_user_func_array(array(&$packagexml, $method), $params);
+ $r = call_user_func_array(array($packagexml, $method), $params);
}
@@ -234,3 +234,3 @@
$ui->setConfig($config);
- PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array(&$ui, 'displayFatalError'));
+ PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, 'displayFatalError'));
$cmd = PEAR_Command::factory('package', $config);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Handle/PearLocal.php Ethna-2.6.0beta2011102522/class/Plugin/Handle/PearLocal.php
--- Ethna-2.6.2011010402/class/Plugin/Handle/PearLocal.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Handle/PearLocal.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -134,3 +134,3 @@
*/
- function &_parseArgList()
+ function _parseArgList()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Handle.php Ethna-2.6.0beta2011102522/class/Plugin/Handle.php
--- Ethna-2.6.2011010402/class/Plugin/Handle.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Handle.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -23,7 +23,7 @@
{
- /** @var handler's id */
- var $id;
+ /** @protected handler's id */
+ protected $id;
- /** @var command line arguments */
- var $arg_list;
+ /** @protected command line arguments */
+ protected $arg_list;
@@ -34,3 +34,3 @@
*/
- function Ethna_Plugin_Handle($controller, $type, $name)
+ public function __construct($controller, $type, $name)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Logwriter/Alertmail.php Ethna-2.6.0beta2011102522/class/Plugin/Logwriter/Alertmail.php
--- Ethna-2.6.2011010402/class/Plugin/Logwriter/Alertmail.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Logwriter/Alertmail.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -26,4 +26,4 @@
- /** @var array アラート送信先メールアドレス */
- var $mailaddress = array();
+ /** @private array アラート送信先メールアドレス */
+ private $mailaddress = array();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Logwriter/File.php Ethna-2.6.0beta2011102522/class/Plugin/Logwriter/File.php
--- Ethna-2.6.2011010402/class/Plugin/Logwriter/File.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Logwriter/File.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -25,7 +25,7 @@
- /** @var int ログファイルハンドル */
- var $fp;
+ /** @private int ログファイルハンドル */
+ private $fp;
- /** @var int ログファイルパーミッション */
- var $mode = 0666;
+ /** @private int ログファイルパーミッション */
+ private $mode = 0666;
@@ -38,3 +38,3 @@
*/
- function Ethna_Plugin_Logwriter_File()
+ public function __construct()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Logwriter.php Ethna-2.6.0beta2011102522/class/Plugin/Logwriter.php
--- Ethna-2.6.2011010402/class/Plugin/Logwriter.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Logwriter.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -25,16 +25,16 @@
- /** @var string ログアイデンティティ文字列 */
- var $ident;
+ /** @protected string ログアイデンティティ文字列 */
+ protected $ident;
- /** @var int ログファシリティ */
- var $facility;
+ /** @protected int ログファシリティ */
+ protected $facility;
- /** @var int ログオプション */
- var $option;
+ /** @protected int ログオプション */
+ protected $option;
- /** @var bool バックトレースが取得可能かどうか */
- var $have_backtrace;
+ /** @protected bool バックトレースが取得可能かどうか */
+ protected $have_backtrace;
- /** @var array ログレベル名テーブル */
- var $level_name_table = array(
+ /** @protected array ログレベル名テーブル */
+ protected $level_name_table = array(
LOG_EMERG => 'EMERG',
@@ -51,16 +51,2 @@
- /**
- * Logwriterクラスのコンストラクタ
- *
- * @access public
- * @param string $log_ident ログアイデンティティ文字列(プロセス名等)
- * @param int $log_facility ログファシリティ
- * @param string $log_file ログ出力先ファイル名(LOG_FILEオプションが指定されている場合のみ)
- * @param int $log_option ログオプション(LOG_FILE,LOG_FUNCTION...)
- */
- /*
- function Ethna_Plugin_Logwriter()
- {
- }
- */
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Smarty/block.form.php Ethna-2.6.0beta2011102522/class/Plugin/Smarty/block.form.php
--- Ethna-2.6.2011010402/class/Plugin/Smarty/block.form.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Smarty/block.form.php 2011-10-25 22:50:53.000000000 +0900
@@ -14,2 +14,3 @@
+ $tag_stack = $smarty->_tag_stack;
// {form default=... }
@@ -22,4 +23,4 @@
// c.f. http://smarty.net/manual/en/plugins.block.functions.php
- $smarty->_tag_stack[count($smarty->_tag_stack)-1][1]['default']
- = $af->getArray(false);
+ $tag_stack[count($tag_stack)-1][1]['default'] = $af->getArray(false);
+ $smarty->_tag_stack = $tag_stack;
}
@@ -30,4 +31,4 @@
// c.f. http://smarty.php.net/manual/en/plugins.block.functions.php
- $smarty->_tag_stack[count($smarty->_tag_stack)-1][1]['name']
- = 'default';
+ $tag_stack[count($tag_stack)-1][1]['name'] = 'default';
+ $smarty->_tag_stack = $tag_stack;
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Smarty/function.form_input.php Ethna-2.6.0beta2011102522/class/Plugin/Smarty/function.form_input.php
--- Ethna-2.6.2011010402/class/Plugin/Smarty/function.form_input.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Smarty/function.form_input.php 2011-10-25 22:50:53.000000000 +0900
@@ -23,7 +23,9 @@
+ $tag_stack = $smarty->_tag_stack;
+
// 現在の{form_input}を囲むform blockがあればパラメータを取得しておく
$block_params = null;
- for ($i = count($smarty->_tag_stack); $i >= 0; --$i) {
- if ($smarty->_tag_stack[$i][0] === 'form') {
- $block_params = $smarty->_tag_stack[$i][1];
+ for ($i = count($tag_stack) - 1; $i >= 0; --$i) {
+ if ($tag_stack[$i][0] === 'form') {
+ $block_params = $tag_stack[$i][1];
break;
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Smarty/function.url.php Ethna-2.6.0beta2011102522/class/Plugin/Smarty/function.url.php
--- Ethna-2.6.2011010402/class/Plugin/Smarty/function.url.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Smarty/function.url.php 2011-10-25 22:50:53.000000000 +0900
@@ -34,3 +34,3 @@
- $url = sprintf('%s%s', $config->get('url'), $path);
+ $url = sprintf('%s%s', $c->getUrl(), $path);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Urlhandler.php Ethna-2.6.0beta2011102522/class/Plugin/Urlhandler.php
--- Ethna-2.6.2011010402/class/Plugin/Urlhandler.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Urlhandler.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -25,8 +25,2 @@
- /** @var object Ethna_Backend backendオブジェクト */
- //var $backend;
-
- /** @var object Ethna_Logger ログオブジェクト */
- //var $logger;
-
/**#@-*/
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Custom.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Custom.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Custom.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Custom.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -22,3 +22,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = true;
+ public $accept_array = true;
@@ -32,3 +32,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/File.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/File.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/File.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/File.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -45,3 +45,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -56,3 +56,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Max.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Max.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Max.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Max.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -22,3 +22,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -32,3 +32,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Mbregexp.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Mbregexp.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Mbregexp.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Mbregexp.php 2011-10-25 22:50:53.000000000 +0900
@@ -12,3 +12,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -22,3 +22,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Mbstrmax.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Mbstrmax.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Mbstrmax.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Mbstrmax.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -26,3 +26,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -37,3 +37,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Mbstrmin.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Mbstrmin.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Mbstrmin.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Mbstrmin.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -26,3 +26,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -37,3 +37,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Min.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Min.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Min.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Min.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -22,3 +22,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -32,3 +32,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Regexp.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Regexp.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Regexp.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Regexp.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -22,3 +22,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -32,3 +32,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Required.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Required.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Required.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Required.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -22,3 +22,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = true;
+ public $accept_array = true;
@@ -35,3 +35,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Strmax.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Strmax.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Strmax.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Strmax.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -26,3 +26,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -37,3 +37,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Strmaxcompat.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Strmaxcompat.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Strmaxcompat.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Strmaxcompat.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -29,3 +29,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -40,3 +40,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Strmin.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Strmin.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Strmin.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Strmin.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -26,3 +26,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -36,3 +36,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Strmincompat.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Strmincompat.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Strmincompat.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Strmincompat.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -28,4 +28,4 @@
{
- /** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ /** @public bool 配列を受け取るかフラグ */
+ public $accept_array = false;
@@ -39,3 +39,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator/Type.php Ethna-2.6.0beta2011102522/class/Plugin/Validator/Type.php
--- Ethna-2.6.2011010402/class/Plugin/Validator/Type.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator/Type.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -22,3 +22,3 @@
/** @var bool 配列を受け取るかフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -32,3 +32,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin/Validator.php Ethna-2.6.0beta2011102522/class/Plugin/Validator.php
--- Ethna-2.6.2011010402/class/Plugin/Validator.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin/Validator.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -30,16 +30,4 @@
- /** @var object Ethna_Backend backendオブジェクト */
- //var $backend;
-
- /** @var object Ethna_Logger ログオブジェクト */
- //var $logger;
-
- /** @var object Ethna_ActionForm フォームオブジェクト */
- //var $action_form;
-
- /** @var object Ethna_ActionForm フォームオブジェクト */
- //var $af;
-
/** @var bool 配列を受け取るバリデータかどうかのフラグ */
- var $accept_array = false;
+ public $accept_array = false;
@@ -48,18 +36,2 @@
/**
- * コンストラクタ
- *
- * @access public
- * @param object Ethna_Controller $controller コントローラオブジェクト
- */
- /*
- function Ethna_Plugin_Validator(&$controller)
- {
- $this->backend = $controller->getBackend();
- $this->logger = $controller->getLogger();
- $this->action_form = $controller->getActionForm();
- $this->af = $this->action_form;
- }
- */
-
- /**
* フォーム値検証のためにActionFormから呼び出されるメソッド
@@ -71,3 +43,3 @@
*/
- function validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
@@ -82,3 +54,3 @@
*/
- function getFormDef($name)
+ public function getFormDef($name)
{
@@ -93,3 +65,3 @@
*/
- function getFormType($name)
+ public function getFormType($name)
{
@@ -114,3 +86,3 @@
*/
- function isEmpty($var, $type)
+ protected function isEmpty($var, $type)
{
@@ -135,3 +107,3 @@
/**
- * true を参照で返す
+ * return true
*
@@ -139,3 +111,3 @@
*/
- function &ok()
+ protected function ok()
{
@@ -146,3 +118,3 @@
/**
- * エラーを返す
+ * return error
*
@@ -153,3 +125,3 @@
*/
- function &error($msg, $code, $info = null)
+ protected function error($msg, $code, $info = null)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Plugin.php Ethna-2.6.0beta2011102522/class/Plugin.php
--- Ethna-2.6.2011010402/class/Plugin.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Plugin.php 2011-10-25 22:50:53.000000000 +0900
@@ -9,3 +9,3 @@
* @package Ethna
*/
@@ -27,19 +27,19 @@
- /** @var object Ethna_Controller コントローラオブジェクト */
- var $controller;
+ /** @protected object Ethna_Controller コントローラオブジェクト */
+ protected $controller;
- /** @var object Ethna_Controller コントローラオブジェクト($controllerの省略形) */
- var $ctl;
+ /** @protected object Ethna_Controller コントローラオブジェクト($controllerの省略形) */
+ protected $ctl;
- /** @var object Ethna_Logger ログオブジェクト */
- var $logger;
+ /** @protected object Ethna_Logger ログオブジェクト */
+ protected $logger;
- /** @var array プラグインのオブジェクト(インスタンス)を保存する配列 */
- var $obj_registry = array();
+ /** @public array プラグインのオブジェクト(インスタンス)を保存する配列 */
+ public $obj_registry = array();
- /** @var array プラグインのクラス名、ソースファイル名を保存する配列 */
- var $src_registry = array();
+ /** @protected array プラグインのクラス名、ソースファイル名を保存する配列 */
+ protected $src_registry = array();
- /** @var array 検索対象ディレクトリを,プラグインの優先順に保存する配列 */
- var $_dirlist = array();
+ /** @protected array 検索対象ディレクトリを,プラグインの優先順に保存する配列 */
+ protected $_dirlist = array();
@@ -54,3 +54,3 @@
*/
- public function __construct(&$controller)
+ public function __construct($controller)
{
@@ -74,3 +74,3 @@
*/
- function setLogger(&$logger)
+ public function setLogger($logger)
{
@@ -91,3 +91,3 @@
*/
- function &getPlugin($type, $name)
+ public function getPlugin($type, $name)
{
@@ -103,3 +103,3 @@
*/
- function getPluginList($type)
+ public function getPluginList($type)
{
@@ -130,3 +130,3 @@
*/
- function &_getPlugin($type, $name)
+ private function _getPlugin($type, $name)
{
@@ -165,3 +165,3 @@
*/
- function setPlugin($plugin_alias_name, $plugin)
+ public function setPlugin($plugin_alias_name, $plugin)
{
@@ -182,3 +182,3 @@
*/
- function _loadPlugin($type, $name)
+ private function _loadPlugin($type, $name)
{
@@ -221,3 +221,3 @@
*/
- function _unloadPlugin($type, $name)
+ public function _unloadPlugin($type, $name)
{
@@ -234,3 +234,3 @@
*/
- function _loadPluginDirList()
+ private function _loadPluginDirList()
{
@@ -264,3 +264,3 @@
*/
- function _getPluginSrc($type, $name)
+ private function _getPluginSrc($type, $name)
{
@@ -290,3 +290,3 @@
*/
- function getPluginNaming($type, $name = null, $appid = 'Ethna')
+ public function getPluginNaming($type, $name = null, $appid = 'Ethna')
{
@@ -323,3 +323,3 @@
*/
- function &_includePluginSrc($class, $dir, $file, $parent = false)
+ private function _includePluginSrc($class, $dir, $file, $parent = false)
{
@@ -366,3 +366,3 @@
*/
- function _searchPluginSrcDir($type, $name = null)
+ public function _searchPluginSrcDir($type, $name = null)
{
@@ -396,3 +396,3 @@
*/
- function _searchPluginSrc($type, $name)
+ private function _searchPluginSrc($type, $name)
{
@@ -440,3 +440,3 @@
*/
- function searchAllPluginType()
+ public function searchAllPluginType()
{
@@ -463,3 +463,3 @@
*/
- function searchAllPluginSrc($type)
+ public function searchAllPluginSrc($type)
{
@@ -511,3 +511,3 @@
*/
- function includePlugin($type, $name = null)
+ public function includePlugin($type, $name = null)
{
Only in Ethna-2.6.2011010402/class/Renderer: Rhaco.php
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Renderer/Smarty.php Ethna-2.6.0beta2011102522/class/Renderer/Smarty.php
--- Ethna-2.6.2011010402/class/Renderer/Smarty.php 2011-01-04 02:31:14.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Renderer/Smarty.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,5 +8,4 @@
* @package Ethna
*/
-require_once 'Smarty/Smarty.class.php';
@@ -14,3 +13,3 @@
/**
- * Smartyレンダラクラス(Mojaviのまね)
+ * Smarty rendere class
*
@@ -22,4 +21,7 @@
{
- /** @var string compile directory */
- var $compile_dir;
+ /** @private string compile directory */
+ private $compile_dir;
+
+ /** @protected engine path (library) */
+ protected $engine_path = 'Smarty/Smarty.class.php';
@@ -34,2 +36,10 @@
+ // get renderer config
+ $smarty_config = isset($this->config['smarty'])
+ ? $this->config['smarty']
+ : array();
+
+ // load template engine
+ $this->loadEngine($smarty_config);
+
$this->engine = new Smarty;
@@ -47,6 +57,3 @@
- // デリミタは Ethna_Config を見る
- $smarty_config = isset($this->config['smarty'])
- ? $this->config['smarty']
- : array();
+ // delimiter setting
if (array_key_exists('left_delimiter', $smarty_config)) {
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Renderer/Smarty3.php Ethna-2.6.0beta2011102522/class/Renderer/Smarty3.php
--- Ethna-2.6.2011010402/class/Renderer/Smarty3.php 2011-01-04 02:31:14.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Renderer/Smarty3.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,7 +8,5 @@
* @package Ethna
*/
-require_once 'Smarty/Smarty.class.php';
-
// {{{ Ethna_Renderer_Smarty3
@@ -22,4 +20,7 @@
{
- /** @var string compile directory */
- var $compile_dir;
+ /** @private string compile directory */
+ private $compile_dir;
+
+ /** @protected string path of smarty3 */
+ protected $engine_path = 'Smarty3/Smarty.class.php';
@@ -34,2 +35,8 @@
+ // get renderer config
+ $smarty_config = isset($this->config['smarty3'])
+ ? $this->config['smarty3']
+ : array();
+ $this->loadEngine($smarty_config);
+
$this->engine = new Smarty();
@@ -47,6 +54,2 @@
- // デリミタは Ethna_Config を見る
- $smarty_config = isset($this->config['smarty3'])
- ? $this->config['smarty3']
- : array();
if (isset($smarty_config['left_delimiter'])) {
@@ -100,4 +103,3 @@
} catch (SmartyCompilerException $e) {
- $this->logger->log(LOG_ERR, "smarty compile error: msg='{$e->getMessage()}'");
- return Ethna::raiseError("smarty compile error: msg='{$e->getMessage()}'", 500);
+ return Ethna::raiseWarning("smarty compile error: msg='{$e->getMessage()}'", 500);
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Renderer.php Ethna-2.6.0beta2011102522/class/Renderer.php
--- Ethna-2.6.2011010402/class/Renderer.php 2011-01-04 02:31:14.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Renderer.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -13,3 +13,3 @@
/**
- * レンダラクラス(Mojaviのまね)
+ * Template Renderer
*
@@ -25,22 +25,25 @@
- /** @var object Ethna_Controller controllerオブジェクト */
- var $controller;
+ /** @protected object Ethna_Controller controllerオブジェクト */
+ protected $controller;
- /** @var object Ethna_Controller controllerオブジェクト($controllerの省略形) */
- var $ctl;
+ /** @protected object Ethna_Controller controllerオブジェクト($controllerの省略形) */
+ protected $ctl;
- /** @var array [appid]-ini.phpのレンダラ設定 */
- var $config;
+ /** @protected array [appid]-ini.phpのレンダラ設定 */
+ protected $config;
- /** @var string template directory */
- var $template_dir;
+ /** @protected string template directory */
+ protected $template_dir;
- /** @var string template engine */
- var $engine;
+ /** @protected string template engine */
+ protected $engine;
- /** @var string template file */
- var $template;
+ /** @protected string path of template engine */
+ protected $engine_path = false;
- /** @var string テンプレート変数 */
- var $prop;
+ /** @protected string template file */
+ protected $template;
+
+ /** @protected string テンプレート変数 */
+ protected $prop;
@@ -286,2 +289,3 @@
}
+ // }}}
@@ -307,2 +311,25 @@
// }}}
+
+ // {{{ loadEngine
+ /**
+ * ビューを出力する
+ *
+ * @access public
+ */
+ protected function loadEngine(array $config)
+ {
+ // load template engine
+ $engine_path = isset($config['path'])
+ ? $config['path']
+ : $this->engine_path;
+ if ($engine_path) {
+ if (file_exists_ex($engine_path)) {
+ require_once $engine_path;
+ }
+ else {
+ trigger_error("template engine is not available: path=" . $engine_path, E_USER_ERROR);
+ }
+ }
+ }
+ // }}}
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Session.php Ethna-2.6.0beta2011102522/class/Session.php
--- Ethna-2.6.2011010402/class/Session.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Session.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -25,19 +25,19 @@
- /** @var object Ethna_Logger loggerオブジェクト */
- var $logger;
+ /** @protected object Ethna_Logger loggerオブジェクト */
+ protected $logger;
- /** @var string セッション名 */
- var $session_name;
+ /** @protected string セッション名 */
+ protected $session_name;
- /** @var string セッションデータ保存ディレクトリ */
- var $session_save_dir;
+ /** @protected string セッションデータ保存ディレクトリ */
+ protected $session_save_dir;
- /** @var bool セッション開始フラグ */
- var $session_start = false;
+ /** @protected bool セッション開始フラグ */
+ protected $session_start = false;
- /** @var bool 匿名セッションフラグ */
- var $anonymous = false;
+ /** @protected bool 匿名セッションフラグ */
+ protected $anonymous = false;
- /** @var array Configuration for session */
- var $config = array(
+ /** @protected array Configuration for session */
+ protected $config = array(
'handler' => 'files',
@@ -46,3 +46,3 @@
'cache_limiter' => 'nocache',
- 'cache_expier' => '180',
+ 'cache_expire' => '180',
'suffix' => 'SESSID',
@@ -80,3 +80,3 @@
session_cache_limiter($this->config['cache_limiter']);
- session_cache_expire($this->config['cache_expier']);
+ session_cache_expire($this->config['cache_expire']);
@@ -103,3 +104,3 @@
*/
- function restore()
+ public function restore()
{
@@ -128,2 +129,13 @@
/**
+ * セッションIDを取得する
+ *
+ * @access public
+ * @return string session id
+ */
+ public function getId()
+ {
+ return session_id();
+ }
+
+ /**
* セッションの正当性チェック
@@ -133,3 +145,3 @@
*/
- function isValid()
+ public function isValid()
{
@@ -163,3 +175,3 @@
*/
- function start($lifetime = 0, $anonymous = false)
+ public function start($lifetime = 0, $anonymous = false)
{
@@ -198,3 +210,3 @@
*/
- function destroy()
+ public function destroy()
{
@@ -217,3 +229,3 @@
*/
- function regenerateId($lifetime = 0, $anonymous = false)
+ public function regenerateId($lifetime = 0, $anonymous = false)
{
@@ -244,3 +256,3 @@
*/
- function get($name)
+ public function get($name)
{
@@ -264,3 +276,3 @@
*/
- function set($name, $value)
+ public function set($name, $value)
{
@@ -283,3 +295,3 @@
*/
- function remove($name)
+ public function remove($name)
{
@@ -301,3 +313,3 @@
*/
- function isStart($anonymous = false)
+ public function isStart($anonymous = false)
{
@@ -320,3 +332,3 @@
*/
- function isAnonymous()
+ public function isAnonymous()
{
@@ -334,3 +346,3 @@
*/
- function _validateRemoteAddr($src_ip, $dst_ip)
+ private function _validateRemoteAddr($src_ip, $dst_ip)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/UnitTestManager.php Ethna-2.6.0beta2011102522/class/UnitTestManager.php
--- Ethna-2.6.2011010402/class/UnitTestManager.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/UnitTestManager.php 2011-10-25 22:50:53.000000000 +0900
@@ -7,3 +7,3 @@
* @package Ethna
*/
@@ -33,3 +33,3 @@
* @access public
- * @param object Ethna_Backend &$backend Ethna_Backendオブジェクト
+ * @param object Ethna_Backend $backend Ethna_Backendオブジェクト
*/
@@ -366,5 +366,4 @@
// ActionFormのリストア
- $this->ctl->action_form = $af;
- $this->backend->action_form = $af;
- $this->backend->af = $af;
+ $this->ctl->setActionForm($af);
+ $this->backend->setActionForm($af);
Only in Ethna-2.6.0beta2011102522/class: UrlHandler
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/UrlHandler.php Ethna-2.6.0beta2011102522/class/UrlHandler.php
--- Ethna-2.6.2011010402/class/UrlHandler.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/UrlHandler.php 2011-10-25 22:50:53.000000000 +0900
@@ -7,3 +7,3 @@
* @package Ethna
*/
@@ -20,3 +20,3 @@
/** @var array アクションマッピング */
- var $action_map = array(
+ protected $action_map = array(
/*
@@ -77,3 +77,3 @@
*/
- function actionToRequest($action, $param)
+ public function actionToRequest($action, $param)
{
@@ -194,3 +194,3 @@
*/
- function requestToAction($http_vars)
+ public function requestToAction($http_vars)
{
@@ -224,2 +224,3 @@
foreach ($action_map as $key => $value) {
+ if (isset($value['path'])) {
$match_length = strlen($value['path']);
@@ -244,5 +245,5 @@
}
+ }
- // try regexp
- if ($value['path_regexp']) {
+ if (isset($value['path_regexp']) && $value['path_regexp']) {
if (is_array($value['path_regexp'])) {
@@ -264,2 +265,4 @@
}
+
+ // else, continue
}
@@ -327,3 +330,3 @@
*/
- function _normalizePath($path)
+ protected function _normalizePath($path)
{
@@ -352,3 +355,3 @@
*/
- function buildActionParameter($http_vars, $action)
+ public function buildActionParameter($http_vars, $action)
{
@@ -367,3 +370,3 @@
*/
- function buildQueryParameter($query)
+ public function buildQueryParameter($query)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/Util.php Ethna-2.6.0beta2011102522/class/Util.php
--- Ethna-2.6.2011010402/class/Util.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/Util.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -240,3 +240,3 @@
{
- if (preg_match('/^([a-z0-9_]|\-|\.|\+)+@(([a-z0-9_]|\-)+\.)+[a-z]{2,6}$/i',
+ if (preg_match('#^([a-z0-9_]|\-|\.|\+|\/)+@(([a-z0-9_]|\-)+\.)+[a-z]{2,6}$#i',
$mailaddress)) {
@@ -935,2 +935,20 @@
// }}}
+
+ /**
+ * Site url from request uri (instead of a config)
+ */
+ public static function getUrlFromRequestUri()
+ {
+ if (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1)
+ || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'
+ ) {
+ $protocol = 'https://';
+ }
+ else {
+ $protocol = 'http://';
+ }
+
+ $url = $protocol . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/';
+ return $url;
+ }
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/View/403.php Ethna-2.6.0beta2011102522/class/View/403.php
--- Ethna-2.6.2011010402/class/View/403.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/View/403.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -34,3 +34,3 @@
*/
- function preforward($param = array())
+ public function preforward($param = array())
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/View/404.php Ethna-2.6.0beta2011102522/class/View/404.php
--- Ethna-2.6.2011010402/class/View/404.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/View/404.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -34,3 +34,3 @@
*/
- function preforward($param = array())
+ public function preforward($param = array())
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/View/500.php Ethna-2.6.0beta2011102522/class/View/500.php
--- Ethna-2.6.2011010402/class/View/500.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/View/500.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -34,3 +34,3 @@
*/
- function preforward($param = array())
+ public function preforward($param = array())
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/View/Info.php Ethna-2.6.0beta2011102522/class/View/Info.php
--- Ethna-2.6.2011010402/class/View/Info.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/View/Info.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -26,3 +26,3 @@
/** @var boolean レイアウトテンプレートの使用フラグ */
- var $use_layout = false;
+ public $use_layout = false;
@@ -35,3 +35,3 @@
*/
- function preforward()
+ public function preforward()
{
@@ -56,2 +56,6 @@
}
+
+ protected function _setDefault($renderer)
+ {
+ }
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/View/Json.php Ethna-2.6.0beta2011102522/class/View/Json.php
--- Ethna-2.6.2011010402/class/View/Json.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/View/Json.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -24,2 +24,3 @@
*/
+ public $has_default_header = false;
@@ -33,3 +34,3 @@
*/
- function preforward($encode_param = array())
+ public function preforward($encode_param = array(), $header = false)
{
@@ -41,3 +42,7 @@
+ if (!$header) {
$this->header(array('Content-Type' => 'application/json; charset=UTF-8'));
+ } else {
+ $this->header($header);
+ }
echo $encoded_param;
@@ -45,3 +50,3 @@
- function forward()
+ public function forward()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/View/List.php Ethna-2.6.0beta2011102522/class/View/List.php
--- Ethna-2.6.2011010402/class/View/List.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/View/List.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -22,19 +22,19 @@
/**#@+
- * @access private
+ * @access protected
*/
- /** @var int 表示開始オフセット */
- var $offset = 0;
+ /** @protected int 表示開始オフセット */
+ protected $offset = 0;
- /** @var int 表示件数 */
- var $count = 25;
+ /** @protected int 表示件数 */
+ protected $count = 25;
- /** @var array 検索対象項目一覧 */
- var $search_list = array();
+ /** @protected array 検索対象項目一覧 */
+ protected $search_list = array();
- /** @var string 検索マネージャクラス名 */
- var $manager_name = null;
+ /** @protected string 検索マネージャクラス名 */
+ protected $manager_name = null;
- /** @var string 表示対象クラス名 */
- var $class_name = null;
+ /** @protected string 表示対象クラス名 */
+ protected $class_name = null;
@@ -47,3 +47,3 @@
*/
- function preforward()
+ public function preforward()
{
@@ -106,3 +106,3 @@
*/
- function _fixNameObject($value, $obj)
+ protected function _fixNameObject($value, $obj)
{
@@ -119,3 +119,3 @@
*/
- function _getNavigation($total, &$list)
+ protected function _getNavigation($total, &$list)
{
@@ -150,3 +150,3 @@
*/
- function _setQueryOption()
+ protected function _setQueryOption()
{
@@ -161,3 +161,3 @@
*/
- function _getQueryParameter()
+ protected function _getQueryParameter()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/View/Redirect.php Ethna-2.6.0beta2011102522/class/View/Redirect.php
--- Ethna-2.6.2011010402/class/View/Redirect.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/View/Redirect.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -33,3 +33,3 @@
*/
- function preforward($url = NULL)
+ public function preforward($url = NULL)
{
@@ -62,3 +62,3 @@
- function isAbsoluteUrl($url)
+ public function isAbsoluteUrl($url)
{
@@ -77,3 +77,3 @@
*/
- function forward()
+ public function forward()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/View/UnitTest.php Ethna-2.6.0beta2011102522/class/View/UnitTest.php
--- Ethna-2.6.2011010402/class/View/UnitTest.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/View/UnitTest.php 2011-10-25 22:50:53.000000000 +0900
@@ -7,3 +7,3 @@
* @package Ethna
*/
@@ -24,3 +24,3 @@
/** @var boolean レイアウトテンプレートの使用フラグ */
- var $use_layout = false;
+ public $use_layout = false;
@@ -33,3 +33,3 @@
*/
- function preforward()
+ public function preforward()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/class/ViewClass.php Ethna-2.6.0beta2011102522/class/ViewClass.php
--- Ethna-2.6.2011010402/class/ViewClass.php 2011-01-04 02:31:14.000000000 +0900
+++ Ethna-2.6.0beta2011102522/class/ViewClass.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna
*/
@@ -80,3 +80,3 @@
/** @var string レイアウト(HTMLの外枠を記述するファイル)のテンプレートファイルを指定(拡張子は除く) */
- var $_layout_file = 'layout';
+ protected $_layout_file = 'layout';
@@ -89,3 +89,3 @@
/** @var boolean レイアウトテンプレートの使用フラグ */
- var $use_layout = true;
+ public $use_layout = true;
@@ -93,7 +93,6 @@
/** ヘッダ出力を改造する場合はfalseにする */
- var $has_default_header = true;
+ public $has_default_header = true;
- /** @var array デフォルトのヘッダ出力を使用するか否か */
- /** ヘッダ出力を改造する場合はfalseにする */
- var $default_header = array(
+ /** @var array default header */
+ public $default_header = array(
'Pragma' => 'no-cache',
@@ -150,3 +149,3 @@
*/
- function preforward($params = NULL)
+ public function preforward()
{
@@ -164,3 +163,3 @@
*/
- function forward()
+ public function forward()
{
@@ -226,3 +225,3 @@
*/
- function header($status)
+ public function header($status)
{
@@ -297,3 +296,3 @@
*/
- function redirect($url, $staus_code = 302)
+ public function redirect($url, $staus_code = 302)
{
@@ -315,6 +314,6 @@
*/
- function setLayout($filename)
+ public function setLayout($filename)
{
// check layout file existance
- if ($this->templateExists($filename . '.' . $this->ctl->ext['tpl'])) {
+ if ($this->templateExists($filename . '.' . $this->ctl->getExt('tpl'))) {
$this->_layout_file = $filename;
@@ -322,3 +321,3 @@
} else {
- return Ethna::raiseWarning('file "'. $filename . '.' . $this->ctl->ext['tpl'] . '" not found');
+ return Ethna::raiseWarning('file "'. $filename . '.' . $this->ctl->getExt('tpl') . '" not found');
}
@@ -334,5 +333,17 @@
*/
- function getLayout()
+ public function getLayout()
{
- return $this->_layout_file . '.' . $this->ctl->ext['tpl'];
+ return $this->_layout_file . '.' . $this->ctl->getExt('tpl');
+ }
+ // }}}
+
+ // {{{ getCurrentForwardName()
+ /**
+ * getCurrentForwardName
+ *
+ * @access public
+ */
+ public function getCurrentForwardName()
+ {
+ return $this->forward_name;
}
@@ -349,3 +360,3 @@
*/
- function templateExists($filename)
+ public function templateExists($filename)
{
@@ -368,5 +379,4 @@
*/
- function error($code)
+ public function error($code)
{
- $this->has_default_header = false;
$this->header($code);
@@ -387,3 +397,3 @@
*/
- function addActionFormHelper($action, $dynamic_helper = false)
+ public function addActionFormHelper($action, $dynamic_helper = false)
{
@@ -427,3 +437,3 @@
*/
- function clearActionFormHelper($action)
+ public function clearActionFormHelper($action)
{
@@ -444,3 +454,3 @@
*/
- function _getHelperActionForm($action = null, $name = null)
+ protected function _getHelperActionForm($action = null, $name = null)
{
@@ -490,3 +500,3 @@
*/
- function resetFormCounter()
+ public function resetFormCounter()
{
@@ -502,3 +512,3 @@
*/
- function getFormName($name, $action, $params)
+ public function getFormName($name, $action, $params)
{
@@ -525,3 +535,3 @@
*/
- function getFormSubmit($params)
+ public function getFormSubmit($params)
{
@@ -541,3 +551,3 @@
*/
- function getFormInput($name, $action, $params)
+ public function getFormInput($name, $action, $params)
{
@@ -630,3 +640,3 @@
*/
- function getFormBlock($content, $params)
+ public function getFormBlock($content, $params)
{
@@ -647,3 +657,3 @@
*/
- function _getSelectorOptions(&$af, $def, $params)
+ protected function _getSelectorOptions($af, $def, $params)
{
@@ -703,3 +713,3 @@
*/
- function _getFormInput_Button($name, $def, $params)
+ protected function _getFormInput_Button($name, $def, $params)
{
@@ -731,3 +741,3 @@
*/
- function _getFormInput_Checkbox($name, $def, $params)
+ protected function _getFormInput_Checkbox($name, $def, $params)
{
@@ -978,3 +988,3 @@
} else {
- $current_value = array();
+ $current_value = array(0 => 0,);
}
@@ -1207,3 +1217,3 @@
*/
- function _setDefault(&$renderer)
+ protected function _setDefault($renderer)
{
Only in Ethna-2.6.2011010402/extlib: .gitignore
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/extlib/Plugin/Filter/Debugtoolbar.php Ethna-2.6.0beta2011102522/extlib/Plugin/Filter/Debugtoolbar.php
--- Ethna-2.6.2011010402/extlib/Plugin/Filter/Debugtoolbar.php 2011-01-04 02:04:54.000000000 +0900
+++ Ethna-2.6.0beta2011102522/extlib/Plugin/Filter/Debugtoolbar.php 2011-10-25 22:50:53.000000000 +0900
@@ -1,2 +1,3 @@
<?php
+// vim: foldmethod=marker
/**
@@ -18,5 +19,5 @@
{
- var $type_mapping = array(
+ private $_type_mapping = array(
VAR_TYPE_INT => 'VAR_TYPE_INT',
@@ -29,3 +30,3 @@
- var $form_type_mapping = array(
+ private $_form_type_mapping = array(
FORM_TYPE_TEXT => 'FORM_TYPE_TEXT',
@@ -42,2 +43,13 @@
+ private $_stime;
+
+ public function __destruct() {
+ }
+
+ public function preFilter()
+ {
+ $stime = microtime(true);
+ $this->_stime = $stime;
+ }
+
/**
@@ -49,3 +61,3 @@
{
- if (!$this->ctl->view->has_default_header) {
+ if (!is_null($view = $this->ctl->getView()) && !$view->has_default_header) {
return null;
@@ -68,14 +80,331 @@
- // jquery がロードされてるかどうか調べる
- // なければ google.load
- // めんどくせー常にloadでいい?
+ // {{{ CSS
+ echo '<style type="text/css">';
+ echo <<<EOF
+
+.xdebug-var-dump {
+ background: #f0f0f0;
+ padding: 2px;
+ font-family: monospace;
+ line-height: 150%;
+}
+
+/* ethna debug style
+ */
+
+/*
+0 => string 'EMERG' (length=5)
+1 => string 'ALERT' (length=5)
+2 => string 'CRIT' (length=4)
+3 => string 'ERR' (length=3)
+4 => string 'WARNING' (length=7)
+5 => string 'NOTICE' (length=6)
+6 => string 'INFO' (length=4)
+7 => string 'DEBUG' (length=5)
+*/
+.ethna-debug-pre
+{
+ line-height: 55%;
+ border: solid 2px #333;
+ padding: 8px;
+ margin: 10px;
+}
+.ethna-debug-pre-blink
+{
+ color: #f00;
+}
+.ethna-debug-title ,
+.ethna-debug-subtitle {
+ font-family: Verdana, "Hiragino Kaku Gothic Pro W3", "Meiryo" !important;
+ font-size: 18px;
+ font-weight: bold;
+ line-height: 2.6em;
+}
+
+.ethna-debug {
+ font-family: Verdana !important;
+ position: fixed;
+ bottom: 0px;
+ left: 0px;
+ width: 100%;
+ max-height: 50%;
+ padding-top: 20px;
+ padding-bottom: 50px;
+ overflow: auto;
+ background: #ccc !important;
+ border-top: solid 3px #fff;
+ color: #333 !important;
+ display:none;
+ font-size: 12px;
+ opacity: 0.9;
+}
+.ethna-debug td,
+.ethna-debug th {
+ color: #333 !important;
+}
+.ethna-debug div {
+ padding-left: 20px;
+}
+
+#ethna-debug-switch-outline {
+ background: #666;
+ color: #fff;
+ margin: 0;
+ padding: 0;
+ position: fixed;
+ bottom: 0px;
+ left: 0px;
+ font-size: 14px;
+ font-family: Verdana, "Hiragino Kaku Gothic Pro W3", "Meiryo" !important;
+ opacity: 0.8;
+}
+#ethna-debug-switch-outline li {
+ padding: 7px 10px 7px 22px;
+ margin: 0;
+ float:left;
+ list-style:none;
+ z-index: 1000;
+}
+li.ethna-debug-switch {
+ /* background-position: 2px 12px; */
+ background-position: 4px 50%;
+ background-repeat: no-repeat;
+}
+li.ethna-debug-switch:hover {
+ background-color: #fff !important;
+ color: #333 !important;
+}
+
+li#ethna-debug-switch-EthnaClose {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHdSURBVDjLpZNraxpBFIb3a0ggISmmNISWXmOboKihxpgUNGWNSpvaS6RpKL3Ry//Mh1wgf6PElaCyzq67O09nVjdVlJbSDy8Lw77PmfecMwZg/I/GDw3DCo8HCkZl/RlgGA0e3Yfv7+DbAfLrW+SXOvLTG+SHV/gPbuMZRnsyIDL/OASziMxkkKkUQTJJsLaGn8/iHz6nd+8mQv87Ahg2H9Th/BxZqxEkEgSrq/iVCvLsDK9awtvfxb2zjD2ARID+lVVlbabTgWYTv1rFL5fBUtHbbeTJCb3EQ3ovCnRC6xAgzJtOE+ztheYIEkqbFaS3vY2zuIj77AmtYYDusPy8/zuvunJkDKXM7tYWTiyGWFjAqeQnAD6+7ueNx/FLpRGAru7mcoj5ebqzszil7DggeF/DX1nBN82rzPqrzbRayIsLhJqMPT2N83Sdy2GApwFqRN7jFPL0tF+10cDd3MTZ2AjNUkGCoyO6y9cRxfQowFUbpufr1ct4ZoHg+Dg067zduTmEbq4yi/UkYidDe+kaTcP4ObJIajksPd/eyx3c+N2rvPbMDPbUFPZSLKzcGjKPrbJaDsu+dQO3msfZzeGY2TCvKGYQhdSYeeJjUt21dIcjXQ7U7Kv599f4j/oF55W4g/2e3b8AAAAASUVORK5CYII=");
+ background-position: center 3px;
+ border: none;
+ text-indent: -9999px;
+}
+li#ethna-debug-switch-Ethna {
+ padding-right: 4px;;
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABUSURBVHjaYvz//z8DKYCJgVSA34b/YPC+zO0/DLAQo40iJzECzWZkZMRqw4dyd5x++I8XIPuBZCdBPQ10FZFhiM8P1AmlQaiB5FBiISkhAQFAgAEA1FBb2xYZTGEAAAAASUVORK5CYII=");
+ /* background-image: url(../images/ethna-debug-switch-Ethna.png); */
+}
+#ethna-debug-switch-outline li.ethna-debug-switch:nth-of-type(2) {
+ padding: 7px 10px;
+}
+#ethna-debug-switch-Timer {
+ background-image: url("data:image/png;base64,");
+}
+#ethna-debug-switch-ActionForm {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZdJREFUeNqcUz2LwkAQfdFFEAQRRU1zrXYWgiCineX1Xi+50srOwn8gtv4OewsRBTsR/0CKgKCFH/gRNbczR5bEeCD3IOy+nZnH28ms1u12PwHoeAOPx8PHHcex0Ol0vp03MZvNfLzdbhvifr+TEn8uxuMxLMtSXNd11Go12LbNeYPBAIZhYL/fQ8hDjayNRiMkEgkUCgVEIhE0Gg0lMJ1O2f71emWBZrPJ6263g7jdbixQrVY5mRxlMhmsVislQJxyDocDhsOhOjdNkx1wkApdZLPZlw28XC6+2Ha7hZC2tGeB+XyO9XqteDqdRrlcVg694B7Q4WKxwPl8RrFYRDQaDfTALQwIuA7y+bxKSKVSvh4Qd2cgICDvFbhCPB7/c4j+dOANLJdLbDYbxZPJJF+NIP9a0AEVTyYTnoNcLodYLIZ6vf6yB5VKhffhcPhX4Hg8ajQUpVJJWSUhbw+IUw7FyEGr1UK/3ychTciRFaFQiKfPhXfvgnJOpxOvvV6PVzmJQpMN+5LKH2++RvtJ1NS8j+g/+BFgAJmwQl7DhC7TAAAAAElFTkSuQmCC");
+}
+#ethna-debug-switch-Log {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJxSURBVHjajJPLbxJBHMe/+wCk0gJKbW0DxERbG+qD9CAeSjzIAUNibJuY9OaFxIvnXvgnqgkJdy9cDBcS8WT0YNCaphEjjUSgLa+Wx5ZdBJZdnKEBS4uJ32Qyu/Ob32fm9xim2+0iGo0ysVgs4PF4nnSIQETXVVVFq9Vid3Z2kqFQaKNSqWSpTaPRIBKJwOv1gseJWKvVeuMukSzL6APoaLfbsFgsToZhNMFg8EWtVsvjlFicEdl4YiAzz7HkNC0BgVlbW1sNBAIvTSbTDAWfA1BHlmUH41BsIp7Ko1bchXCYQTqdYVyu+yt+v3/TbDYPIPxpAMdx6CgKfhQEvN4u4Ft6D5uLCUwV4ijiGiTDOuPz+VYFQfhJABtDAHoqR66cKUt4mxLwIXsMtlqFtlPB1YsFmEpf0ZAcmJp7CrvdPksO5IibMhSCogJfcnXE8w3sFctQGwIYMQteLoNTJIjJCOSmBJ1Odz4HNGltQvh8UMd2uggSPKxGGb+7TTRECS1SHKmaQ5NAaah9DeWAJ4ZiRYBFKcP3QAvHvIitjgWp/UVYxDTarBG8Vj+o1BCArGJ87AKeLY2jdOsIBnMBpcYvlNs5fNdL0E9O4t6EF6ZLV4bKfuYGPDx3FvBu9z0+ZT/iuF5Bq6FCEbW4bHRifmkFBoNh9A3oIsMyMIyZ8PD6c0yyDiT3t9DSyZi134RzbhnT0zO9+P8JoEba/8YJM5ZvP4Zr4VHvn+M5Umam19q03CMB1Lmf3UGXabihd0EHz/Ojq5DL5WqJROJIUZROHzBqJs58Pp+v2Wy2vwDSGGo4HH71hgj/IfJCD9xut0q//wgwALyXGwTcoR6SAAAAAElFTkSuQmCC");
+}
+#ethna-debug-switch-Info {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH2SURBVHjapFPPS1RRFP7uvfOQQnRsnGkR4iJkwEUFiZsBBXPllHshaJP0w6WgCP0HLURhxkD/gaBFigaSi+El0bJWYRQ0iWI9JycJdebNvNe5P971RbSaB9+99z3O953vnHseC8MQrTwJuTDG7Ifr+Yc9tE0R8oSs+bxD2CAUPmw8241iZXKmFiNA5PvJjvZibuCa09d7BfVGA4xznNUbKO99x5b7zqewxySy8o+AJPf39S7fGcmhfHCIn9XfOCUiJwGJy6kkAoR4XXqLo+qvSSliBW7cftRDmb88mBh3Pn7dR4XIEZFzAS70uf3iBQRBiNVXm9LJ1ffrS7vclDM1PppzvKNjlVlQsBACC3P3MD97l96FQs1voK3NweDATcf0CZFAPpXswKfyAWUTGpzbxioHQrs5qzeRyXTDNFnfAtnPshgxsj0z/1yfY2XIs2CKlrUCKgvjymYU+HR6wjp4UnxphLQTxmLu5EI1f675vrUpMbf4wgapHgjdF3mGHr4dK1CpHq992/eQSXWaerXIeQ9EzIGAd1iBGSzbxMLqZsmXuulLnbZpVsAQJYIggPtmW15jQU1xfJC6upLLY6NDaAZMTd95SbovTYotlVx4nvf3IMVHmbbireGck06nkUgkFPGk5uOH58F1t/8/yi39TK08fwQYAJFWzPPb9QZyAAAAAElFTkSuQmCC");
+}
+#ethna-debug-switch-SmartyDebug {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJcSURBVHjabFJLT1NREJ7zuo8+eFRAqYoESi0aEgwJaqxRXBQTEzDGiAsNO7f+ALdsTPwFunHlygUbE6NBVBAXjUYN8rCgUIjIK1Sgpff23jOee6sJqJNZzDmZx/d9MyT3+jzsNkTCTJRFFQEQ+MfoX29EW9R28X1JdK0/XxKk7df/pwAJ1Vg4rkd7qXkY3aI3igpW0UZYSDVTGdxPc1CWPADoUuOAFmoAs66ipX/n60MMJngkSQjbydwrg+ReUijGAo3obKOb16taZ+ZyE1PDACzefD3RdEK6YC8/k84WocKfgIhOQdSliBbhnL4YfpWdvXHm5DoV7WPp8Pzi5VSq2938rPoCaD4HymUhay08YlRmMovZ2Tv9fUuxI3ZT9P3NvoX11ccT4+NcCEIIeLB90oQZzkaabIxMTn1Idq4oqKWSckfuZJKdm9NfJvXYLb2hn5oHFRz6WzhFhhqIkuyRXpV+AnCAmmL/RSN2WwnIwSeh1fdg1enWxPzYaE1T45oqUxpSBm/SgbaODln4bq+m3dw7WVyiIF2t9oJe3+M6pfjR5trowNOhSqGDFoDnL8PByMDxlkh+4q4i6W7PoLQVEiGtH8Vv94FQRxin2rsGnxxbWX4rOCwsNfZeSQH8ROl4mhJeXhy6W5MKvRegRerCH6cSo+lqzpimGVevFYBXUjPqbG6U6fmkiSBUJ9RQjtYyFTV68Gyoptvk1Jp74OE2D3nC+MZ3iyKRmKJ46Vx0ZGiQWqw9XgyUWH46S0SlurFyDtlz3qoNDxvBaizMoTotwu0S+jvGMgFlvwQYAL5QCxf9wMU0AAAAAElFTkSuQmCC");
+}
+#ethna-debug-switch-Config {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAoJJREFUeNqkU01oE1EQnk02iTFQE7QihUKRkKTF1iU9+FdQCoWYgAcPegkIeiiIWiHgwUvpQXs1Ggo99OYlFwUhWAhYhZJWUmhMxJbYYk1LFDcmJraSv911vjQbevPgg9kZ5vu+eW9n3hM0TaP/WSI+gUCADAYDmUwmEgSBUNRoNJ5jaKjNSyuKsqRjjUaDVFWlWCy2X0BfDJ5nd5r9KxZI0Wh0BuRgMHibcznGrrD/wD6hawwHxBdcLte12dnZGYfDcYOFhkJBpnL5F3Y0IAcMHHB1nYAj+Xw+xHeZ8FSWf1BPTw+trqY2JElyAkilUhsej8dZKhWpu/s4jY+P3+P0s/n5+f0TVCoVqlarL0Oh0KTZbCZZlmlgoN+pqgrBEO/u/iZg4IALTecX+BQX6/X69Xw+v8e7bYqiSMvLy+t+f2AGhhg5YOCAC43+7+T1eh+srCS1hYU32tJSQkun09rg4NA0TwLTIMTIAQMHXGigbU2hVqsZq9UaNZsKKYrKoxRZKDYwKizEyAEDB1xoOk3kzo6xP4PExMT9WyMjl/q2t7+npqYevkBucvLx1d7eE9Li4tutcPjJXEsoCO+z2WxcP0GcC3zmDt8ZHj7bVyyWyO32SLHYOwl4ufyTdna+ELCuriN2nlSEC2x1mshdRZGbkchcSJaLfCOtFI+//prLbRIMMXLAwAEXmk4T+ZLALo+Ojj1PJtc1t7s/bLfbHyUSGQ2GGDlg4IALTesd6Y8JY7JarX6bzTZtsVhOwq+tfdMymZx2MAcOuPrmrSYKaDHRUbZjbIcA8sM6xQ9sADFP4xNf54/t21tnk9kKrG3qBdCLw20T//GCFbY9tj+sVf8KMAACOoVxz9PPRwAAAABJRU5ErkJggg==");
+}
+
+#ethna-debug-timewindow {
+}
+#ethna-debug-logwindow {
+}
+
+.ethna-debug-log {
+ margin: 0;
+ padding: 2px 10px;
+ color: #000;
+}
+
+.ethna-debug-log-EMERG {
+}
+.ethna-debug-log-ALERM {
+}
+.ethna-debug-log-CRIT {
+}
+.ethna-debug-log-ERR {
+ background: #ffaaaa;
+}
+.ethna-debug-log-WARNING {
+ background: #ffaaaa;
+}
+.ethna-debug-log-NOTICE {
+ background: #ffcccc;
+}
+.ethna-debug-log-INFO {
+ background: #ccccff;
+}
+.ethna-debug-log-DEBUG {
+ background: #ccc;
+}
+
+.ethna-debug-log-loglevel {
+ font-weight: bold;
+}
+
+.ethna-debug-log-loglevel-EMERG {
+ color: #f00;
+}
+.ethna-debug-log-loglevel-ALERM {
+ color: #f00;
+}
+.ethna-debug-log-loglevel-CRIT {
+ color: #f00;
+}
+.ethna-debug-log-loglevel-ERR {
+ color: #f00;
+}
+.ethna-debug-log-loglevel-WARNING {
+ color: #f00;
+}
+.ethna-debug-log-loglevel-NOTICE {
+ color: #f66;
+}
+.ethna-debug-log-loglevel-INFO {
+ color: #00f;
+}
+.ethna-debug-log-loglevel-DEBUG {
+}
+
+.ethna-debug-window {
+
+}
+
+.ethna-debug-table {
+ border-collapse: collapse;
+ border: solid 1px #333;
+}
+.ethna-debug-table th ,
+.ethna-debug-table td {
+ padding: 3px 5px;
+ border-collapse: collapse;
+ border: solid 1px #333;
+ font-size: 12px;
+}
+.ethna-debug-table th {
+ background: #9c9;
+}
+.ethna-debug-table td.e {
+ background: #aca;
+}
+EOF;
+ echo '</style>';
+ // }}}
+
+ // {{{ load JavaScript
echo <<<EOL
-<link rel="stylesheet" href="{$url}Debugtoolbar/css/ether.css" type="text/css" />
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
- google.load("jquery", "1.2");
+ google.load("jquery", "1.3");
</script>
-<script type="text/javascript" src="{$url}Debugtoolbar/js/jquery.cookie.js"></script>
EOL;
+ // }}}
+
+ // {{{ jquery.cookie.plugin
+ echo <<<EOF
+<script type="text/javascript">
+/**
+ * Cookie plugin
+ *
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+/**
+ * Create a cookie with the given name and value and other optional parameters.
+ *
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Set the value of a cookie.
+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
+ * @desc Create a cookie with all available options.
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Create a session cookie.
+ * @example $.cookie('the_cookie', null);
+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
+ * used when the cookie was set.
+ *
+ * @param String name The name of the cookie.
+ * @param String value The value of the cookie.
+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
+ * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
+ * If set to null or omitted, the cookie will be a session cookie and will not be retained
+ * when the the browser exits.
+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
+ * require a secure protocol (like HTTPS).
+ * @type undefined
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+
+/**
+ * Get the value of a cookie with the given name.
+ *
+ * @example $.cookie('the_cookie');
+ * @desc Get the value of a cookie.
+ *
+ * @param String name The name of the cookie.
+ * @return The value of the cookie.
+ * @type String
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+jQuery.cookie = function(name, value, options) {
+ if (typeof value != 'undefined') { // name and value given, set cookie
+ options = options || {};
+ if (value === null) {
+ value = '';
+ options.expires = -1;
+ }
+ var expires = '';
+ if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+ var date;
+ if (typeof options.expires == 'number') {
+ date = new Date();
+ date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+ } else {
+ date = options.expires;
+ }
+ expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+ }
+ // CAUTION: Needed to parenthesize options.path and options.domain
+ // in the following expressions, otherwise they evaluate to undefined
+ // in the packed version for some reason...
+ var path = options.path ? '; path=' + (options.path) : '';
+ var domain = options.domain ? '; domain=' + (options.domain) : '';
+ var secure = options.secure ? '; secure' : '';
+ document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+ } else { // only name given, get cookie
+ var cookieValue = null;
+ if (document.cookie && document.cookie != '') {
+ var cookies = document.cookie.split(';');
+ for (var i = 0; i < cookies.length; i++) {
+ var cookie = jQuery.trim(cookies[i]);
+ // Does this cookie string begin with the name we want?
+ if (cookie.substring(0, name.length + 1) == (name + '=')) {
+ cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+ break;
+ }
+ }
+ }
+ return cookieValue;
+ }
+};
+</script>
+EOF;
+ // }}}
+
+ // {{{ JavaScript for Debugtoolbar
echo <<<EOL
@@ -184,4 +513,11 @@
EOL;
+ // }}}
+
+ // time
+ $etime = microtime(true);
+ $time = sprintf("%.4f", $etime - $this->_stime);
+
echo '<div class="ethna-debug" id="ethna-debug-evwindow">';
- echo '<div class="ethna-debug-title">' . ETHNA_VERSION . ' : ' . $this->controller->action_name . '</div>';
+ echo '<div class="ethna-debug-title">' . ETHNA_VERSION
+ . ': ' . $this->controller->getCurrentActionName() . '</div>';
echo "<div class=\"ethna-debug-log\">";
@@ -192,2 +528,25 @@
echo "</div> \n";
+
+ $time_warning_class ="";
+ if (0.5 < $time) {
+ $time_warning_class =" ethna-debug-log-WARNING";
+ }
+ elseif (2 < $time) {
+ $time_warning_class =" ethna-debug-log-ERR";
+ }
+ echo '<div class="ethna-debug-subtitle">Time Elapsed</div>';
+ echo "<div class=\"ethna-debug-log $time_warning_class\">" . "${time} sec.";
+ echo "</div> \n";
+
+ echo '<div class="ethna-debug-subtitle">Action/View/Forward</div>';
+ echo '<div id="ethna-debug-info-actionenv" style="">';
+ $info = array(
+ 'action' => $this->ctl->getCurrentActionName(),
+ 'action_form' => get_class($this->ctl->getActionForm()),
+ 'view' => get_class($this->ctl->getView()),
+ 'forward' => (is_null($view = $this->ctl->getView())) ? "" : $view->getCurrentForwardName(),
+ 'encoding' => $this->controller->getClientEncoding(),
+ );
+ self::dumpArray($info);
+ echo "</div> \n";
echo '</div>';
@@ -253,3 +612,5 @@
- $info_html = @simplexml_import_dom(DOMDOcument::loadHTML($info));
+ $dom = new DOMDocument();
+ $dom->loadHTML($info);
+ $info_html = @simplexml_import_dom($dom);
$body = $info_html->xpath("//body");
@@ -265,2 +626,6 @@
{
+ $af = $this->ctl->getActionForm();
+ if ($af === null) {
+ return ;
+ }
echo '<div class="ethna-debug" id="ethna-debug-afwindow">';
@@ -269,4 +635,4 @@
echo "<div class=\"ethna-debug-log\">";
- //var_dump($this->controller->action_form->getArray());
- self::dumpArray($this->controller->action_form->getArray());
+ $action_form_array = $this->ctl->getActionForm()->getArray();
+ self::dumpArray($action_form_array);
echo "</div> \n";
@@ -274,4 +641,16 @@
echo "<div class=\"ethna-debug-log\">";
- //var_dump($this->controller->action_form->getArray());
- self::dumpArray($this->controller->action_form->form);
+ $action_form_def = $this->controller->getActionForm()->getDef();
+ self::dumpArray($action_form_def);
+ echo "</div> \n";
+
+ echo '<div class="ethna-debug-subtitle">App</div>';
+ echo "<div class=\"ethna-debug-log\">";
+ $app_vars = $this->controller->getActionForm()->getAppArray();
+ self::dumpArray($app_vars);
+ echo "</div> \n";
+
+ echo '<div class="ethna-debug-subtitle">AppNe</div>';
+ echo "<div class=\"ethna-debug-log\">";
+ $app_ne_vars = $this->controller->getActionForm()->getAppNEArray();
+ self::dumpArray($app_ne_vars);
echo "</div> \n";
@@ -279,3 +659,2 @@
echo "<div class=\"ethna-debug-log\">";
- //var_dump($this->controller->action_form->getArray());
self::dumpArray($_GET);
@@ -284,3 +664,2 @@
echo "<div class=\"ethna-debug-log\">";
- //var_dump($this->controller->action_form->getArray());
self::dumpArray($_POST);
@@ -304,9 +684,13 @@
{
- $c =& Ethna_Controller::getInstance();
+ if (!defined('Smarty::SMARTY_VERSION')) {
+ return ;
+ }
+ $c = Ethna_Controller::getInstance();
$debug_tpl = $c->getDirectory('template') . "/smarty_debug.tpl";
- if (!file_exists($debug_tpl)) {
- Ethna::raiseWarning(sprintf("Smarty debug template not found, please set %s.", $debug_tpl), E_USER_WARNING);
- return null;
- }
+ //if smarty2
+ //if (!file_exists($debug_tpl)) {
+ // Ethna::raiseWarning(sprintf("Smarty debug template not found, please set %s.", $debug_tpl), E_USER_WARNING);
+ // return null;
+ //}
@@ -316,3 +700,3 @@
$r = $c->getRenderer();
- $smarty = $r->engine;
+ $smarty = $r->getEngine();
@@ -333,4 +717,4 @@
foreach ($vars->tpl_vars as $k => $v) {
- echo "$k<br />";
- self::dumpArray($v->value);
+ $v = array($k => $v->value);
+ self::dumpArray($v);
}
@@ -341,4 +725,5 @@
foreach ($vars->config_vars as $k => $v) {
- echo "$k<br />";
- self::dumpArray($v->value);
+ $v = array($k => $v->value);
+ self::dumpArray($v);
+ //self::dumpArray($v->value);
}
@@ -353,18 +738,6 @@
- function dumpArray(&$array)
+ public static function dumpArray(&$array)
{
echo "<table class=\"ethna-debug-table\">";
- if (is_scalar($array)) {
- echo "<tr>\n";
- echo "<th>Scalar</th>";
- echo "<td>{$array}</td>";
- echo "</tr>\n";
- }
- elseif (is_object($array)) {
- echo "<tr>\n";
- echo "<th>Object</th>";
- echo "<td>" . get_class($array) . "</td>";
- echo "</tr>\n";
- }
- else foreach ($array as $k => $v) {
+ foreach ($array as $k => $v) {
echo "<tr>\n";
@@ -376,7 +749,15 @@
}
- else {
- if (is_bool($v)) {
+ elseif (is_bool($v)) {
echo "<td>" . ($v ? '<span style="color: #090;">true</span>' : '<span style="color: #900;">false</span>') . "</td>";
}
- else if ($k === 'type' || $k === 'form_type') {
+ elseif (is_null($array)) {
+ echo "<td>NULL</td>";
+ }
+ elseif (is_scalar($v)) {
+ // form type mapping check
+ $key = '_' . $k . '_mapping';
+ $ar = isset(self::$key) ? self::$key : array();
+ if (($k === 'type' || $k === 'form_type')
+ && isset($ar[$v]))
+ {
echo "<td>";
@@ -384,6 +765,3 @@
echo "Undefined";
- }
- else {
- $key = $k . "_mapping";
- $ar = $this->$key;
+ } else {
echo $ar[$v];
@@ -397,2 +774,8 @@
}
+ elseif (is_object($v)) {
+ echo "<td>(Object) " . get_class($v) . "</td>";
+ }
+ else {
+ echo "<td>" . gettype($v) . "</td>";
+ }
echo "</tr>\n";
@@ -403,2 +786 @@
}
-?>
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/extlib/Plugin/Logwriter/Debugtoolbar.php Ethna-2.6.0beta2011102522/extlib/Plugin/Logwriter/Debugtoolbar.php
--- Ethna-2.6.2011010402/extlib/Plugin/Logwriter/Debugtoolbar.php 2011-01-04 02:41:12.000000000 +0900
+++ Ethna-2.6.0beta2011102522/extlib/Plugin/Logwriter/Debugtoolbar.php 2011-10-25 22:50:53.000000000 +0900
@@ -33,2 +33,26 @@
+ $tracer = '';
+ if ($this->_getLogLevelName($level) != 'DEBUG'
+ && preg_match('/in (template ")?(\/.+\.(php|tpl))"?\s+on line (\d+)/', $message, $match)) {
+ list(, , $file, ,$line) = $match;
+ $line = intval($line);
+ if (file_exists($file)) {
+ $tracer .= ($c->getGateway() != GATEWAY_WWW ? "" : '<pre class="ethna-debug-pre">');
+ $f = new SplFileObject($file);
+ $min = ($line - 4 < 0) ? 0 : $line - 4;
+ $i = $min;
+ foreach (new LimitIterator($f, $min, 7) as $line_str) {
+ $l = ++$i;
+ if ($l == $line) {
+ $tracer .= '<span class="ethna-debug-pre-blink">';
+ }
+ $tracer .= $l . ': ' . htmlspecialchars($line_str) . ($c->getGateway() != GATEWAY_WWW ? "" : '<br />');
+ if ($l == $line) {
+ $tracer .= '</span>';
+ }
+ }
+ $tracer .= ($c->getGateway() != GATEWAY_WWW ? "" : '</pre>');
+ }
+ }
+
if (array_key_exists("function", $this->option) ||
@@ -50,3 +74,3 @@
- $log_content = ($pre_prefix . $prefix . $message . $post_prefix . "\n");
+ $log_content = ($pre_prefix . $prefix . $message . $tracer . $post_prefix . "\n");
$this->log_array[] = $log_content;
@@ -59,3 +83,5 @@
$ctl = Ethna_Controller::getInstance();
- if (!$ctl->view->has_default_header) {
+ if ((!is_null($view = $ctl->getView()) && !$view->has_default_header)
+ || $ctl->getGateway() != GATEWAY_WWW) {
+ $this->log_array = array();
return null;
@@ -68,2 +95,21 @@
echo '</div>';
+
+ $this->log_array = array();
+ }
+
+ public function __destruct()
+ {
+ if (!empty($this->log_array)) {
+ $ctl = Ethna_Controller::getInstance();
+ if ((!is_null($view = $ctl->getView()) && !$view->has_default_header)
+ || $ctl->getGateway() != GATEWAY_WWW) {
+ $this->log_array = array();
+ return null;
+ }
+
+ echo "<h1>Script shutdown unexpectedly</h1>";
+ if (is_array($this->log_array)) foreach ($this->log_array as $log) {
+ echo $log;
+ }
+ }
}
@@ -139,2 +185,3 @@
}
+ $orig_file = $file;
if (strncmp($file, $basedir, strlen($basedir)) == 0) {
@@ -146,3 +193,3 @@
$line = $bt[$i]['line'];
- return array('function' => $function, 'pos' => sprintf('%s:%s', $file, $line));
+ return array('function' => $function, 'pos' => sprintf('%s:%s', $file, $line), 'file' => $orig_file);
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/app.action.default.php Ethna-2.6.0beta2011102522/skel/app.action.default.php
--- Ethna-2.6.2011010402/skel/app.action.default.php 2010-09-04 03:37:02.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/app.action.default.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -20,6 +20,7 @@
/**
- * @access private
+ * @access protected
+ *
* @var array form definition.
*/
- var $form = array(
+ protected $form = array(
/*
@@ -60,3 +61,3 @@
/*
- function _filter_sample($value)
+ protected function _filter_sample($value)
{
@@ -83,3 +84,3 @@
*/
- function prepare()
+ public function prepare()
{
@@ -87,2 +88,3 @@
if ($this->af->validate() > 0) {
+ // forward to error view (this is sample)
return 'error';
@@ -100,3 +102,3 @@
*/
- function perform()
+ public function perform()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/app.actionclass.php Ethna-2.6.0beta2011102522/skel/app.actionclass.php
--- Ethna-2.6.2011010402/skel/app.actionclass.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/app.actionclass.php 2011-10-25 22:50:53.000000000 +0900
@@ -7,3 +7,3 @@
* @package {$project_id}
*/
@@ -27,3 +27,3 @@
*/
- function authenticate()
+ public function authenticate()
{
@@ -39,3 +39,3 @@
*/
- function prepare()
+ public function prepare()
{
@@ -51,3 +51,3 @@
*/
- function perform()
+ public function perform()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/app.actionform.php Ethna-2.6.0beta2011102522/skel/app.actionform.php
--- Ethna-2.6.2011010402/skel/app.actionform.php 2010-09-04 03:37:02.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/app.actionform.php 2011-10-25 22:50:53.000000000 +0900
@@ -7,3 +7,3 @@
* @package {$project_id}
*/
@@ -21,3 +21,3 @@
/**#@+
- * @access private
+ * @access protected
*/
@@ -25,3 +25,3 @@
/** @var array form definition (default) */
- var $form_template = array();
+ protected $form_template = array();
@@ -36,3 +36,3 @@
*/
- function handleError($name, $code)
+ public function handleError($name, $code)
{
@@ -48,3 +48,3 @@
*/
- function _setFormTemplate($form_template)
+ protected function _setFormTemplate($form_template)
{
@@ -58,3 +58,3 @@
*/
- function _setFormDef()
+ protected function _setFormDef()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/app.controller.php Ethna-2.6.0beta2011102522/skel/app.controller.php
--- Ethna-2.6.2011010402/skel/app.controller.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/app.controller.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -24,2 +24,3 @@
require_once '{$project_id}_ViewClass.php';
+require_once '{$project_id}_UrlHandler.php';
@@ -35,3 +36,3 @@
/**#@+
- * @access private
+ * @access protected
*/
@@ -41,3 +42,3 @@
*/
- var $appid = '{$application_id}';
+ protected $appid = '{$application_id}';
@@ -46,3 +47,3 @@
*/
- var $forward = array(
+ protected $forward = array(
/*
@@ -61,3 +62,3 @@
*/
- var $action = array(
+ protected $action = array(
/*
@@ -79,3 +80,3 @@
*/
- var $soap_action = array(
+ protected $soap_action = array(
/*
@@ -91,3 +92,3 @@
*/
- var $directory = array(
+ protected $directory = array(
'action' => 'app/action',
@@ -114,3 +115,3 @@
*/
- var $db = array(
+ protected $db = array(
'' => DB_TYPE_RW,
@@ -121,3 +122,3 @@
*/
- var $ext = array(
+ protected $ext = array(
'php' => 'php',
@@ -129,3 +130,3 @@
*/
- var $class = array(
+ public $class = array(
/*
@@ -153,3 +154,3 @@
*/
- var $filter = array(
+ protected $filter = array(
/*
@@ -177,3 +178,3 @@
*/
- function _getDefaultLanguage()
+ protected function _getDefaultLanguage()
{
@@ -189,3 +190,3 @@
*/
- function _setDefaultTemplateEngine(&$renderer)
+ protected function _setDefaultTemplateEngine($renderer)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/app.view.default.php Ethna-2.6.0beta2011102522/skel/app.view.default.php
--- Ethna-2.6.2011010402/skel/app.view.default.php 2010-09-04 03:37:02.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/app.view.default.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -23,3 +23,3 @@
*/
- function preforward()
+ public function preforward()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/app.viewclass.php Ethna-2.6.0beta2011102522/skel/app.viewclass.php
--- Ethna-2.6.2011010402/skel/app.viewclass.php 2010-09-04 03:37:02.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/app.viewclass.php 2011-10-25 22:50:53.000000000 +0900
@@ -7,3 +7,3 @@
* @package {$project_id}
*/
@@ -25,3 +25,3 @@
/** @var string set layout template file */
- var $_layout_file = 'layout';
+ protected $_layout_file = 'layout';
@@ -32,3 +32,3 @@
/** @var boolean layout template use flag */
- var $use_layout = true;
+ public $use_layout = true;
@@ -40,3 +40,3 @@
*/
- function _setDefault(&$renderer)
+ protected function _setDefault($renderer)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/etc.ini.php Ethna-2.6.0beta2011102522/skel/etc.ini.php
--- Ethna-2.6.2011010402/skel/etc.ini.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/etc.ini.php 2011-10-25 22:50:53.000000000 +0900
@@ -60,4 +60,4 @@
'check_remote_addr' => true,
- //'cache_limiter' => 'private_no_expier',
- //'cache_expier' => '180',
+ //'cache_limiter' => 'private_no_expire',
+ //'cache_expire' => '180',
),
@@ -72,5 +72,11 @@
//'renderer' => array(
+ // // if smarty:
// 'smarty' => array(
- // 'left_delimiter' => '{',
- // 'right_delimiter' => '}',
+ // 'left_delimiter' => '{{',
+ // 'right_delimiter' => '}}',
+ // ),
+ // // if smarty3:
+ // 'smarty3' => array(
+ // 'left_delimiter' => '{{',
+ // 'right_delimiter' => '}}',
// ),
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/plugin/skel.plugin.f.php Ethna-2.6.0beta2011102522/skel/plugin/skel.plugin.f.php
--- Ethna-2.6.2011010402/skel/plugin/skel.plugin.f.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/plugin/skel.plugin.f.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna_Plugin
*/
@@ -26,3 +26,3 @@
*/
- function preFilter()
+ public function preFilter()
{
@@ -39,3 +39,3 @@
*/
- function preActionFilter($action_name)
+ public function preActionFilter($action_name)
{
@@ -53,3 +53,3 @@
*/
- function postActionFilter($action_name, $forward_name)
+ public function postActionFilter($action_name, $forward_name)
{
@@ -62,3 +62,3 @@
*/
- function postFilter()
+ public function postFilter()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/plugin/skel.plugin.v.php Ethna-2.6.0beta2011102522/skel/plugin/skel.plugin.v.php
--- Ethna-2.6.2011010402/skel/plugin/skel.plugin.v.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/plugin/skel.plugin.v.php 2011-10-25 22:50:53.000000000 +0900
@@ -8,3 +8,3 @@
* @package Ethna_Plugin
*/
@@ -33,3 +33,3 @@
*/
- function &validate($name, $var, $params)
+ public function validate($name, $var, $params)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/skel.action.php Ethna-2.6.0beta2011102522/skel/skel.action.php
--- Ethna-2.6.2011010402/skel/skel.action.php 2010-12-26 05:09:25.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/skel.action.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -19,6 +19,6 @@
/**
- * @access private
+ * @access protected
* @var array form definition.
*/
- var $form = array(
+ protected $form = array(
/*
@@ -59,3 +59,3 @@
/*
- function _filter_sample($value)
+ protected function _filter_sample($value)
{
@@ -83,4 +83,11 @@
*/
- function prepare()
+ public function prepare()
{
+ /**
+ if ($this->af->validate() > 0) {
+ // forward to error view (this is sample)
+ return 'error';
+ }
+ $sample = $this->af->get('sample');
+ */
return null;
@@ -94,3 +101,3 @@
*/
- function perform()
+ public function perform()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/skel.action_cli.php Ethna-2.6.0beta2011102522/skel/skel.action_cli.php
--- Ethna-2.6.2011010402/skel/skel.action_cli.php 2010-09-04 03:37:02.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/skel.action_cli.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -19,6 +19,6 @@
/**
- * @access private
+ * @access protected
* @var array form definition.
*/
- var $form = array(
+ protected $form = array(
/*
@@ -59,3 +59,3 @@
/*
- function _filter_sample($value)
+ protected function _filter_sample($value)
{
@@ -83,3 +83,3 @@
*/
- function prepare()
+ public function prepare()
{
@@ -94,3 +94,3 @@
*/
- function perform()
+ public function perform()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/skel.view.php Ethna-2.6.0beta2011102522/skel/skel.view.php
--- Ethna-2.6.2011010402/skel/skel.view.php 2010-09-04 03:37:02.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/skel.view.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -19,3 +19,3 @@
/** @var boolean layout template use flag */
- var $use_layout = true;
+ public $use_layout = true;
@@ -26,3 +26,3 @@
*/
- function preforward()
+ public function preforward()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/skel/www.xmlrpc.php Ethna-2.6.0beta2011102522/skel/www.xmlrpc.php
--- Ethna-2.6.2011010402/skel/www.xmlrpc.php 2010-09-04 03:37:03.000000000 +0900
+++ Ethna-2.6.0beta2011102522/skel/www.xmlrpc.php 2011-10-25 22:50:53.000000000 +0900
@@ -1,3 +1,3 @@
<?php
-require_once '{$basedir}/app/{$project_id}_Controller.php';
+require_once dirname(__FILE__) . '/../app/{$project_id}_Controller.php';
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Custom_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Custom_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Custom_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Custom_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Max_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Max_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Max_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Max_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Mbregexp_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Mbregexp_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Mbregexp_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Mbregexp_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Mbstrmax_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Mbstrmax_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Mbstrmax_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Mbstrmax_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Mbstrmin_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Mbstrmin_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Mbstrmin_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Mbstrmin_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Min_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Min_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Min_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Min_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Regexp_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Regexp_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Regexp_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Regexp_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Required_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Required_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Required_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Required_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Strmax_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Strmax_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Strmax_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Strmax_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Strmaxcompat_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Strmaxcompat_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Strmaxcompat_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Strmaxcompat_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Strmin_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Strmin_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Strmin_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Strmin_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Strmincompat_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Strmincompat_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Strmincompat_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Strmincompat_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/ActionForm_Validator_Type_Test.php Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Type_Test.php
--- Ethna-2.6.2011010402/test/ActionForm_Validator_Type_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/ActionForm_Validator_Type_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -21,3 +21,3 @@
$this->af->clearFormVars();
- $this->af->form = array();
+ $this->af->setDef(null, array());
$this->ae->clear();
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Class_Test.php Ethna-2.6.0beta2011102522/test/Class_Test.php
--- Ethna-2.6.2011010402/test/Class_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Class_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -5,3 +5,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -13,3 +13,3 @@
-function dummy_error_callback_global(&$error)
+function dummy_error_callback_global($error)
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Config_Test.php Ethna-2.6.0beta2011102522/test/Config_Test.php
--- Ethna-2.6.2011010402/test/Config_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Config_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -15,3 +15,3 @@
// etcディレクトリを上書き
- $this->ctl->directory['etc'] = dirname(__FILE__);
+ $this->ctl->setDirectory('etc', dirname(__FILE__));
$this->config = $this->ctl->getConfig();
Only in Ethna-2.6.0beta2011102522/test: DB_Test.php
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Logger_Test.php Ethna-2.6.0beta2011102522/test/Logger_Test.php
--- Ethna-2.6.2011010402/test/Logger_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Logger_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -27,4 +27,4 @@
{
- unset($this->ctl->class_factory->object['logger']);
- $config_obj = $this->ctl->class_factory->object['config'];
+ unset($this->ctl->getClassFactory()->object['logger']);
+ $config_obj = $this->ctl->getClassFactory()->object['config'];
$config_obj->config = $config;
@@ -50,3 +50,4 @@
// level
- $level_echo = $this->logger->level['echo'];
+ $level = $this->getNonpublicProperty($this->logger, 'level');
+ $level_echo = $level['echo'];
$this->assertEqual($level_echo, LOG_WARNING);
@@ -54,3 +55,4 @@
// option
- $option_echo = $this->logger->option['echo'];
+ $option = $this->getNonpublicProperty($this->logger, 'option');
+ $option_echo = $option['echo'];
$this->assertEqual($option_echo['pid'], true);
@@ -90,7 +92,8 @@
// level
- $level_echo = $this->logger->level['echo'];
+ $level = $this->getNonpublicProperty($this->logger, 'level');
+ $level_echo = $level['echo'];
$this->assertEqual($level_echo, LOG_WARNING);
- $level_file = $this->logger->level['file'];
+ $level_file = $level['file'];
$this->assertEqual($level_file, LOG_NOTICE);
- $level_alertmail = $this->logger->level['alertmail'];
+ $level_alertmail = $level['alertmail'];
$this->assertEqual($level_alertmail, LOG_ERR);
@@ -98,3 +101,5 @@
// option
- $option_echo = $this->logger->option['echo'];
+ $option = $this->getNonpublicProperty($this->logger, 'option');
+
+ $option_echo = $option['echo'];
$this->assertEqual($option_echo['pid'], true);
@@ -103,3 +108,3 @@
- $option_file = $this->logger->option['file'];
+ $option_file = $option['file'];
$this->assertEqual($option_file['pid'], true);
@@ -110,3 +115,3 @@
- $option_alertmail = $this->logger->option['alertmail'];
+ $option_alertmail = $option['alertmail'];
$this->assertEqual($option_alertmail['pid'], true);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/MockProject.php Ethna-2.6.0beta2011102522/test/MockProject.php
--- Ethna-2.6.2011010402/test/MockProject.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/MockProject.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -157,3 +157,2 @@
@$c->trigger($action_name, ""); // suppress header related error.
- $c->end();
$result = ob_get_contents();
@@ -173,3 +172,3 @@
*/
- function &getController()
+ public function getController()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Abstract/Plugin_Abstract_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Abstract/Plugin_Abstract_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Abstract/Plugin_Abstract_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Abstract/Plugin_Abstract_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -5,2 +5,4 @@
+require_once ETHNA_BASE . '/class/Plugin/Abstract.php';
+
/**
@@ -12,5 +14,4 @@
{
- var $plugin;
- var $lw;
- var $abstract;
+ protected $plugin;
+ protected $lw;
@@ -20,6 +21,2 @@
- // for PHP 5, it's not enable to create instance of abstract class,
- // now this is temporary process.
- $this->abstract = $this->plugin->getPlugin('Abstract', null);
-
$this->lw = $this->plugin->getPlugin('Logwriter', 'Echo');
@@ -30,5 +27,2 @@
{
- $this->assertEqual('abstract', $this->abstract->getType());
- $this->assertEqual(null, $this->abstract->getName());
-
$this->assertEqual('logwriter', $this->lw->getType());
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Cachemanager/Plugin_Cachemanager_Localfile_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Cachemanager/Plugin_Cachemanager_Localfile_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Cachemanager/Plugin_Cachemanager_Localfile_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Cachemanager/Plugin_Cachemanager_Localfile_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -12,4 +12,5 @@
{
- var $ctl;
- var $cm;
+ public $ctl;
+ public $cm;
+ public $cm_ref;
@@ -57,7 +59,10 @@
{
- $array = array_slice(explode('/', $this->cm->_getCacheDir('test', 'int_key')), -4, 1);
+ $ref = new ReflectionMethod($this->cm, '_getCacheDir');
+ $ref->setAccessible(true);
+
+ $array = array_slice(explode('/', $ref->invoke($this->cm, 'test', 'int_key')), -4, 1);
$this->assertEqual('miyazakiaoi', array_shift($array));
- $array = array_slice(explode('/', $this->cm->_getCacheDir('', 'string_key')), -4, 1);
- $this->assertEqual('default', array_shift($array));
+ $array = array_slice(explode('/', $ref->invoke($this->cm, '', 'string_key')), -4, 1);
+ //$this->assertEqual('default', array_shift($array));
}
@@ -68,3 +73,2 @@
$this->cm->setNamespace($namespace);
- $this->assertEqual('miyazakiaoi', $this->cm->namespace);
$this->assertEqual('miyazakiaoi', $this->cm->getNamespace());
@@ -121,3 +125,2 @@
$this->assertEqual(E_CACHE_NO_VALUE, $pear_error->getCode());
- $this->assertEqual('fopen failed', $pear_error->getMessage());
@@ -127,7 +130,8 @@
if (!ETHNA_OS_WINDOWS) {
- Ethna_Util::chmod($this->cm->_getCacheFile($this->cm->getNamespace(), $string_key), 0222);
+ $ref = new ReflectionMethod($this->cm, '_getCacheFile');
+ $ref->setAccessible(true);
+ Ethna_Util::chmod($ref->invoke($this->cm, $this->cm->getNamespace(), $string_key), 0222);
$pear_error = $this->cm->get($string_key);
$this->assertEqual(E_CACHE_NO_VALUE, $pear_error->getCode());
- $this->assertEqual('fopen failed', $pear_error->getMessage());
- Ethna_Util::chmod($this->cm->_getCacheFile($this->cm->getNamespace(), $string_key), 0666);
+ Ethna_Util::chmod($ref->invoke($this->cm, $this->cm->getNamespace(), $string_key), 0666);
}
@@ -137,7 +141,8 @@
$this->assertEqual(E_CACHE_EXPIRED, $pear_error->getCode());
- $this->assertEqual('fopen failed', $pear_error->getMessage());
// ディレクトリ名と同じファイルがあってディレクトリが作成できない場合
+ $ref = new ReflectionMethod($this->cm, '_getCacheDir');
+ $ref->setAccessible(true);
$tmp_key = 'tmpkey';
- $tmp_dirname = $this->cm->_getCacheDir($this->cm->getNamespace(), $tmp_key);
+ $tmp_dirname = $ref->invoke($this->cm, $this->cm->getNamespace(), $tmp_key);
Ethna_Util::mkdir(dirname($tmp_dirname), 0777);
@@ -149,3 +154,3 @@
- $this->rm($this->cm->backend->getTmpdir());
+ $this->rm($this->getNonpublicProperty($this->cm, 'backend')->getTmpdir());
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Cachemanager/Plugin_Cachemanager_Memcache_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Cachemanager/Plugin_Cachemanager_Memcache_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Cachemanager/Plugin_Cachemanager_Memcache_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Cachemanager/Plugin_Cachemanager_Memcache_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -53,3 +53,5 @@
{
- $config = $this->cm->config;
+ $config = $this->cm->getConfig();
+
+ //$config = $this->cm->config;
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Csrf/Plugin_Csrf_Session_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Csrf/Plugin_Csrf_Session_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Csrf/Plugin_Csrf_Session_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Csrf/Plugin_Csrf_Session_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -17,3 +17,3 @@
*/
- var $csrf;
+ public $csrf;
@@ -21,2 +21,5 @@
{
+ if (isset($GLOBALS['_Ethna_controller'])) {
+ unset($GLOBALS['_Ethna_controller']);
+ }
}
@@ -25,3 +28,4 @@
{
- $_SERVER['REQUEST_METHOD'] = NULL;
+ $_SERVER['REQUEST_METHOD'] = null;
+ unset($GLOBALS['_Ethna_controller']);
}
@@ -30,3 +34,3 @@
{
- $ctl = Ethna_Controller::getInstance();
+ $ctl = new CsrfTest_Ethna_Controller();
$plugin = $ctl->getPlugin();
@@ -34,3 +38,3 @@
$this->assertTrue(is_object($this->csrf), 'getPlugin failed');
- $this->csrf->session = new Ethna_Session_Dummy($ctl, $ctl->appid);
+ //$this->csrf->session = new Ethna_Session_Dummy($ctl, $ctl->getAppId());
}
@@ -75,3 +79,3 @@
*/
-// {{{ Ethna_Session
+// {{{ Ethna_Session_Dummy
/**
@@ -191 +195,13 @@
+/**
+ *
+ */
+// {{{ CsrfTest_Ethna_Controller
+class CsrfTest_Ethna_Controller
+ extends Ethna_Controller
+{
+ public $class = array(
+ 'session' => 'Ethna_Session_Dummy',
+ );
+}
+// }}}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Handle/Plugin_Handle_PearLocal_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Handle/Plugin_Handle_PearLocal_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Handle/Plugin_Handle_PearLocal_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Handle/Plugin_Handle_PearLocal_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -26,3 +26,3 @@
$this->er = error_reporting();
- error_reporting(E_ALL ^ E_DEPRECATED);
+ error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Custom_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Custom_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Custom_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Custom_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,3 +13,4 @@
{
- var $vld;
+ public $vld;
+ public $ctl;
@@ -20,2 +21,4 @@
$this->vld = $plugin->getPlugin('Validator', 'Custom');
+
+ $this->ctl = $ctl;
}
@@ -31,12 +34,13 @@
);
- $this->vld->af->form_vars['namae_string'] = 'hoge@fuga.net';
+ $af = $this->ctl->getActionForm();
+ $af->form_vars['namae_string'] = 'hoge@fuga.net';
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = '-hoge@fuga.net';
+ $af->form_vars['namae_string'] = '-hoge@fuga.net';
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = '.hoge@fuga.net';
+ $af->form_vars['namae_string'] = '.hoge@fuga.net';
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = '+hoge@fuga.net';
+ $af->form_vars['namae_string'] = '+hoge@fuga.net';
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
@@ -44,3 +48,3 @@
// @がない
- $this->vld->af->form_vars['namae_string'] = 'hogefuga.net';
+ $af->form_vars['namae_string'] = 'hogefuga.net';
$this->assertFalse($this->vld->validate('namae_string', '', $form_string));
@@ -48,3 +52,3 @@
// @の前に文字がない
- $this->vld->af->form_vars['namae_string'] = '@hogefuga.net';
+ $af->form_vars['namae_string'] = '@hogefuga.net';
$this->assertFalse($this->vld->validate('namae_string', '', $form_string));
@@ -52,3 +56,3 @@
// @の後に文字がない
- $this->vld->af->form_vars['namae_string'] = 'hogefuga.net@';
+ $af->form_vars['namae_string'] = 'hogefuga.net@';
$this->assertFalse($this->vld->validate('namae_string', '', $form_string));
@@ -56,3 +60,3 @@
// 先頭文字が許されていない
- $this->vld->af->form_vars['namae_string'] = '%hoge@fuga.net';
+ $af->form_vars['namae_string'] = '%hoge@fuga.net';
$this->assertFalse($this->vld->validate('namae_string', '', $form_string));
@@ -60,3 +64,3 @@
// 末尾文字が許されていない
- $this->vld->af->form_vars['namae_string'] = 'hoge@fuga.net.';
+ $af->form_vars['namae_string'] = 'hoge@fuga.net.';
$this->assertFalse($this->vld->validate('namae_string', '', $form_string));
@@ -81,16 +85,17 @@
);
+ $af = $this->ctl->getActionForm();
- $this->vld->af->form_vars['namae_boolean'] = true;
+ $af->form_vars['namae_boolean'] = true;
$this->assertTrue($this->vld->validate('namae_boolean', '', $form_boolean));
- $this->vld->af->form_vars['namae_boolean'] = false;
+ $af->form_vars['namae_boolean'] = false;
$this->assertTrue($this->vld->validate('namae_boolean', '', $form_boolean));
- $this->vld->af->form_vars['namae_boolean'] = '';
+ $af->form_vars['namae_boolean'] = '';
$this->assertTrue($this->vld->validate('namae_boolean', '', $form_boolean));
- $this->vld->af->form_vars['namae_boolean'] = array();
+ $af->form_vars['namae_boolean'] = array();
$this->assertTrue($this->vld->validate('namae_boolean', '', $form_boolean));
- $this->vld->af->form_vars['namae_boolean'] = array(true);
+ $af->form_vars['namae_boolean'] = array(true);
$this->assertTrue($this->vld->validate('namae_boolean', '', $form_boolean));
@@ -98,3 +103,3 @@
// 0,1以外の値
- $this->vld->af->form_vars['namae_boolean'] = 3;
+ $af->form_vars['namae_boolean'] = 3;
$this->assertFalse($this->vld->validate('namae_boolean', '', $form_boolean));
@@ -117,15 +122,17 @@
);
- $this->vld->af->form_vars['namae_url'] = 'http://uga.net';
+ $af = $this->ctl->getActionForm();
+
+ $af->form_vars['namae_url'] = 'http://uga.net';
$this->assertTrue($this->vld->validate('namae_url', '', $form_url));
- $this->vld->af->form_vars['namae_url'] = 'https://uga.net';
+ $af->form_vars['namae_url'] = 'https://uga.net';
$this->assertTrue($this->vld->validate('namae_url', '', $form_url));
- $this->vld->af->form_vars['namae_url'] = 'ftp://uga.net';
+ $af->form_vars['namae_url'] = 'ftp://uga.net';
$this->assertTrue($this->vld->validate('namae_url', '', $form_url));
- $this->vld->af->form_vars['namae_url'] = 'http://';
+ $af->form_vars['namae_url'] = 'http://';
$this->assertTrue($this->vld->validate('namae_url', '', $form_url));
- $this->vld->af->form_vars['namae_url'] = '';
+ $af->form_vars['namae_url'] = '';
$this->assertTrue($this->vld->validate('namae_url', '', $form_url));
@@ -133,3 +140,3 @@
// '/'が足りない
- $this->vld->af->form_vars['namae_url'] = 'http:/';
+ $af->form_vars['namae_url'] = 'http:/';
$this->assertFalse($this->vld->validate('namae_url', '', $form_url));
@@ -137,3 +144,3 @@
// 接頭辞がない
- $this->vld->af->form_vars['namae_url'] = 'hoge@fuga.net';
+ $af->form_vars['namae_url'] = 'hoge@fuga.net';
$this->assertFalse($this->vld->validate('namae_url', '', $form_url));
@@ -150,27 +157,29 @@
);
- $this->vld->af->form_vars['namae_string'] = 'http://uga.net';
+ $af = $this->ctl->getActionForm();
+
+ $af->form_vars['namae_string'] = 'http://uga.net';
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = chr(0x00);
+ $af->form_vars['namae_string'] = chr(0x00);
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = chr(0x79);
+ $af->form_vars['namae_string'] = chr(0x79);
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = chr(0x80);
+ $af->form_vars['namae_string'] = chr(0x80);
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = chr(0x8e);
+ $af->form_vars['namae_string'] = chr(0x8e);
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = chr(0x8f);
+ $af->form_vars['namae_string'] = chr(0x8f);
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = chr(0xae);
+ $af->form_vars['namae_string'] = chr(0xae);
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = chr(0xf8);
+ $af->form_vars['namae_string'] = chr(0xf8);
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = chr(0xfd);
+ $af->form_vars['namae_string'] = chr(0xfd);
$this->assertTrue($this->vld->validate('namae_string', '', $form_string));
@@ -179,12 +188,12 @@
//$c == 0xad || ($c >= 0xf9 && $c <= 0xfc)
- $this->vld->af->form_vars['namae_string'] = chr(0xad);
+ $af->form_vars['namae_string'] = chr(0xad);
$this->assertFalse($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = chr(0xf9);
+ $af->form_vars['namae_string'] = chr(0xf9);
$this->assertFalse($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = chr(0xfa);
+ $af->form_vars['namae_string'] = chr(0xfa);
$this->assertFalse($this->vld->validate('namae_string', '', $form_string));
- $this->vld->af->form_vars['namae_string'] = chr(0xfc);
+ $af->form_vars['namae_string'] = chr(0xfc);
$this->assertFalse($this->vld->validate('namae_string', '', $form_string));
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Max_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Max_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Max_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Max_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,3 +13,4 @@
{
- var $vld;
+ public $vld;
+ public $ctl;
@@ -20,2 +21,4 @@
$this->vld = $plugin->getPlugin('Validator', 'Max');
+
+ $this->ctl = $ctl;
}
@@ -31,3 +34,4 @@
);
- $this->vld->af->setDef('namae_int', $form_int);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_int', $form_int);
@@ -62,3 +66,4 @@
);
- $this->vld->af->setDef('namae_float', $form_float);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_float', $form_float);
@@ -93,3 +98,4 @@
);
- $this->vld->af->setDef('namae_string', $form_string);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_string', $form_string);
@@ -131,3 +137,4 @@
);
- $this->vld->af->setDef('namae_datetime', $form_datetime);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_datetime', $form_datetime);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Mbregexp_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Mbregexp_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Mbregexp_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Mbregexp_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -17,3 +17,4 @@
{
- var $vld;
+ public $vld;
+ public $ctl;
@@ -24,2 +25,4 @@
$this->vld = $plugin->getPlugin('Validator', 'Mbregexp');
+
+ $this->ctl = $ctl;
}
@@ -36,4 +39,5 @@
);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('input', $form_def);
- $this->vld->af->setDef('input', $form_def);
$pear_error = $this->vld->validate('input', 9, $form_def);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Mbstrmax_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Mbstrmax_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Mbstrmax_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Mbstrmax_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,3 +13,4 @@
{
- var $vld;
+ public $vld;
+ public $ctl;
@@ -20,2 +21,4 @@
$this->vld = $plugin->getPlugin('Validator', 'Mbstrmax');
+
+ $this->ctl = $ctl;
}
@@ -30,3 +33,4 @@
);
- $this->vld->af->setDef('namae_mbstr', $form_mbstr);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_mbstr', $form_mbstr);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Mbstrmin_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Mbstrmin_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Mbstrmin_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Mbstrmin_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,3 +13,4 @@
{
- var $vld;
+ public $vld;
+ public $ctl;
@@ -20,2 +21,4 @@
$this->vld = $plugin->getPlugin('Validator', 'Mbstrmin');
+
+ $this->ctl = $ctl;
}
@@ -30,3 +33,4 @@
);
- $this->vld->af->setDef('namae_mbstr', $form_mbstr);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_mbstr', $form_mbstr);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Min_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Min_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Min_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Min_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,3 +13,4 @@
{
- var $vld;
+ public $vld;
+ public $ctl;
@@ -20,2 +21,4 @@
$this->vld = $plugin->getPlugin('Validator', 'Min');
+
+ $this->ctl = $ctl;
}
@@ -31,3 +34,4 @@
);
- $this->vld->af->setDef('namae_int', $form_int);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_int', $form_int);
@@ -62,3 +66,4 @@
);
- $this->vld->af->setDef('namae_float', $form_float);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_float', $form_float);
@@ -93,3 +98,4 @@
);
- $this->vld->af->setDef('namae_string', $form_string);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_string', $form_string);
@@ -130,3 +136,4 @@
);
- $this->vld->af->setDef('namae_datetime', $form_datetime);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_datetime', $form_datetime);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Regexp_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Regexp_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Regexp_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Regexp_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,3 +13,4 @@
{
- var $vld;
+ public $vld;
+ public $ctl;
@@ -20,2 +21,4 @@
$this->vld = $plugin->getPlugin('Validator', 'Regexp');
+
+ $this->ctl = $ctl;
}
@@ -31,3 +34,4 @@
);
- $this->vld->af->setDef('namae_string', $form_string);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_string', $form_string);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Required_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Required_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Required_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Required_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,3 +13,4 @@
{
- var $vld;
+ public $vld;
+ public $ctl;
@@ -20,2 +21,4 @@
$this->vld = $plugin->getPlugin('Validator', 'Required');
+
+ $this->ctl = $ctl;
}
@@ -31,3 +34,4 @@
);
- $this->vld->af->setDef('namae_string', $form_string);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_string', $form_string);
@@ -52,3 +56,4 @@
);
- $this->vld->af->setDef('namae_string', $form_string);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_string', $form_string);
@@ -82,3 +87,4 @@
);
- $this->vld->af->setDef('namae_select', $form_select);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_select', $form_select);
@@ -102,3 +108,4 @@
);
- $this->vld->af->setDef('namae_select', $form_select);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_select', $form_select);
@@ -134,3 +141,4 @@
);
- $this->vld->af->setDef('namae_radio', $form_radio);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_radio', $form_radio);
@@ -155,3 +163,4 @@
);
- $this->vld->af->setDef('namae_radio', $form_radio);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_radio', $form_radio);
@@ -187,3 +196,4 @@
);
- $this->vld->af->setDef('namae_checkbox', $form_checkbox);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_checkbox', $form_checkbox);
@@ -215,3 +225,3 @@
);
- $this->vld->af->setDef('namae_checkbox', $form_checkbox);
+ $af->setDef('namae_checkbox', $form_checkbox);
@@ -252,3 +262,3 @@
);
- $this->vld->af->setDef('namae_checkbox', $form_checkbox);
+ $af->setDef('namae_checkbox', $form_checkbox);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Strmax_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Strmax_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Strmax_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Strmax_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,3 +13,4 @@
{
- var $vld;
+ public $vld;
+ public $ctl;
@@ -20,2 +21,4 @@
$this->vld = $plugin->getPlugin('Validator', 'Strmax');
+
+ $this->ctl = $ctl;
}
@@ -30,3 +33,4 @@
);
- $this->vld->af->setDef('namae_mbstr', $form_str);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_mbstr', $form_str);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Strmaxcompat_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Strmaxcompat_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Strmaxcompat_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Strmaxcompat_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,4 +13,4 @@
{
- var $vld;
- var $local_ctl;
+ public $vld;
+ public $ctl;
@@ -20,6 +20,7 @@
$ctl->setClientEncoding('EUC-JP');
- $ctl->action_form = new Ethna_ActionForm($ctl);
- $this->local_ctl = $ctl;
+ $ctl->setActionForm(new Ethna_ActionForm($ctl));
$plugin = $ctl->getPlugin();
$this->vld = $plugin->getPlugin('Validator', 'Strmaxcompat');
+
+ $this->ctl = $ctl;
}
@@ -40,3 +41,4 @@
);
- $this->vld->af->setDef('namae_str', $form_str);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_str', $form_str);
@@ -77,3 +79,3 @@
- $this->local_ctl->setClientEncoding('SJIS');
+ $this->ctl->setClientEncoding('SJIS');
$form_str = array(
@@ -83,3 +85,4 @@
);
- $this->vld->af->setDef('namae_str', $form_str);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_str', $form_str);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Strmin_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Strmin_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Strmin_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Strmin_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,3 +13,4 @@
{
- var $vld;
+ public $vld;
+ public $ctl;
@@ -20,2 +21,4 @@
$this->vld = $plugin->getPlugin('Validator', 'Strmin');
+
+ $this->ctl = $ctl;
}
@@ -30,3 +33,4 @@
);
- $this->vld->af->setDef('namae_str', $form_str);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_str', $form_str);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Strmincompat_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Strmincompat_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Strmincompat_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Strmincompat_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,4 +13,4 @@
{
- var $vld;
- var $local_ctl;
+ private $vld;
+ private $local_ctl;
@@ -20,3 +20,3 @@
$ctl->setClientEncoding('EUC-JP');
- $ctl->action_form = new Ethna_ActionForm($ctl);
+ $ctl->setActionForm(new Ethna_ActionForm($ctl));
$this->local_ctl = $ctl;
@@ -40,3 +40,4 @@
);
- $this->vld->af->setDef('namae_str', $form_str);
+ $af = $this->local_ctl->getActionForm();
+ $af->setDef('namae_str', $form_str);
@@ -45,3 +46,3 @@
$pear_error = $this->vld->validate('namae_str', $input_str, $form_str);
- $this->assertFalse(is_a($pear_error, 'Ethna_Error'));
+ $this->assertFalse($pear_error instanceof Ethna_Error);
@@ -49,3 +50,3 @@
$pear_error = $this->vld->validate('namae_str', $error_str, $form_str);
- $this->assertTrue(is_a($pear_error, 'Ethna_Error'));
+ $this->assertTrue($pear_error instanceof Ethna_Error);
$this->assertEqual(E_FORM_MIN_STRING,$pear_error->getCode());
@@ -61,3 +62,3 @@
$pear_error = $this->vld->validate('namae_str', $error_str_euc, $form_str);
- $this->assertTrue(is_a($pear_error, 'Ethna_Error'));
+ $this->assertTrue($pear_error instanceof Ethna_Error);
$this->assertEqual(E_FORM_MIN_STRING,$pear_error->getCode());
@@ -84,3 +85,4 @@
);
- $this->vld->af->setDef('namae_str', $form_str);
+ $af = $this->local_ctl->getActionForm();
+ $af->setDef('namae_str', $form_str);
@@ -89,3 +91,3 @@
$pear_error = $this->vld->validate('namae_str', $input_str, $form_str);
- $this->assertFalse(is_a($pear_error, 'Ethna_Error'));
+ $this->assertFalse($pear_error instanceof Ethna_Error);
@@ -93,3 +95,3 @@
$pear_error = $this->vld->validate('namae_str', $error_str, $form_str);
- $this->assertTrue(is_a($pear_error, 'Ethna_Error'));
+ $this->assertTrue($pear_error instanceof Ethna_Error);
$this->assertEqual(E_FORM_MIN_STRING,$pear_error->getCode());
@@ -100,3 +102,3 @@
$pear_error = $this->vld->validate('namae_str', $input_str_sjis, $form_str);
- $this->assertFalse(is_a($pear_error, 'Ethna_Error'));
+ $this->assertFalse($pear_error instanceof Ethna_Error);
@@ -105,3 +107,3 @@
$pear_error = $this->vld->validate('namae_str', $error_str_sjis, $form_str);
- $this->assertTrue(is_a($pear_error, 'Ethna_Error'));
+ $this->assertTrue($pear_error instanceof Ethna_Error);
$this->assertEqual(E_FORM_MIN_STRING,$pear_error->getCode());
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Type_Test.php Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Type_Test.php
--- Ethna-2.6.2011010402/test/Plugin/Validator/Plugin_Validator_Type_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Plugin/Validator/Plugin_Validator_Type_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -13,3 +13,4 @@
{
- var $vld;
+ public $vld;
+ public $ctl;
@@ -20,2 +21,4 @@
$this->vld = $plugin->getPlugin('Validator', 'Type');
+
+ $this->ctl = $ctl;
}
@@ -30,3 +33,4 @@
);
- $this->vld->af->setDef('namae_int', $form_int);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_int', $form_int);
@@ -63,3 +67,4 @@
);
- $this->vld->af->setDef('namae_float', $form_float);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_float', $form_float);
@@ -90,3 +95,4 @@
);
- $this->vld->af->setDef('namae_boolean', $form_boolean);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_boolean', $form_boolean);
@@ -123,3 +129,4 @@
);
- $this->vld->af->setDef('namae_datetime', $form_datetime);
+ $af = $this->ctl->getActionForm();
+ $af->setDef('namae_datetime', $form_datetime);
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/Session_Test.php Ethna-2.6.0beta2011102522/test/Session_Test.php
--- Ethna-2.6.2011010402/test/Session_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/Session_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -5,5 +5,8 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
+ * @TODO Create session mock and fix this test
*/
+require_once ETHNA_INSTALL_BASE . '/test/MockProject.php';
+
//{{{ Ethna_Session_Test
@@ -18,5 +21,11 @@
+ // mock project
+ var $project;
+
function setUp()
{
- $this->local_session = new Ethna_Session($this->ctl, "ETHNA_TEST");
+ $this->project = new Ethna_MockProject();
+ $this->project->create();
+
+ $this->local_session = new Ethna_Session_Mock($this->ctl, "ETHNA_TEST");
}
@@ -27,2 +36,5 @@
$this->local_session = NULL;
+
+ $this->project->delete();
+ unset($GLOBALS['_Ethna_controller']);
}
@@ -32,6 +44,55 @@
// suppress header already sent error.
- $this->local_session->start(0, true);
- //$this->assertTrue($this->local_session->isAnonymous());
+ $this->local_session->start(0);
+ $this->assertFalse($this->local_session->isAnonymous());
+ $this->assertTrue($this->local_session->isStart());
+ }
+}
+
+
+class Ethna_Session_Mock
+ extends Ethna_Session
+{
+
+ public function start($lifetime = 0, $anonymous = false)
+ {
+ if ($this->session_start) {
+ // we need this?
+ $_SESSION['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR'];
+ $_SESSION['__anonymous__'] = $anonymous;
+ return true;
}
+
+ if (is_null($lifetime)) {
+ ini_set('session.use_cookies', 0);
+ } else {
+ ini_set('session.use_cookies', 1);
}
+ session_set_cookie_params($lifetime);
+ session_id(Ethna_Util::getRandom());
+ // do not start test as cli test
+ //session_start();
+
+ $_SESSION['REMOTE_ADDR'] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR']: false;
+ $_SESSION['__anonymous__'] = $anonymous;
+ $this->anonymous = $anonymous;
+ $this->session_start = true;
+
+ $this->logger->log(LOG_INFO, 'Session started.');
+
+ return true;
+ }
+
+ public function destroy()
+ {
+ if (!$this->session_start) {
+ return true;
+ }
+
+ //session_destroy();
+ $this->session_start = false;
+ //setcookie($this->session_name, "", 0, "/");
+
+ return true;
+ }
+}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/TextDetailReporter.php Ethna-2.6.0beta2011102522/test/TextDetailReporter.php
--- Ethna-2.6.2011010402/test/TextDetailReporter.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/TextDetailReporter.php 2011-10-25 22:50:53.000000000 +0900
@@ -19,3 +19,3 @@
{
- $this->SimpleReporter();
+ parent::__construct();
}
@@ -28,6 +28,6 @@
function paintHeader($test_name) {
- if (!SimpleReporter::inCli()) {
+ if (!self::inCli()) {
header('Content-type: text/plain');
}
- print "{$test_name}\n";
+ echo "{$test_name}\n";
flush();
@@ -43,7 +43,7 @@
if ($this->getFailCount() + $this->getExceptionCount() == 0) {
- print "\nAll OK\n";
+ echo "\nAll OK\n";
} else {
- print "\nFAILURES!!!\n";
+ echo "\n[41;37mFAILURES!!![0m\n";
}
- print "Test cases run: " . $this->getTestCaseProgress() .
+ echo "Test cases run: " . $this->getTestCaseProgress() .
"/" . $this->getTestCaseCount() .
@@ -51,3 +51,3 @@
", Failures: " . $this->getFailCount() .
- ", Exceptions: " . $this->getExceptionCount() . "\n";
+ ", Exceptions: " . $this->getExceptionCount() . PHP_EOL;
}
@@ -62,7 +62,7 @@
parent::paintFail($message);
- print "\n\t" . $this->getFailCount() . ") $message\n";
+ echo "\n\t" . $this->getFailCount() . ") $message\n";
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
- print "\tin " . implode("\n\tin ", array_reverse($breadcrumb));
- print "\n";
+ echo "\tin " . implode("\n\tin ", array_reverse($breadcrumb));
+ echo PHP_EOL;
}
@@ -77,3 +77,12 @@
parent::paintError($message);
- print "Exception " . $this->getExceptionCount() . "!\n$message\n";
+ echo PHP_EOL;
+ echo " Error ", $this->getExceptionCount(), "!", PHP_EOL;
+ echo " $message";
+ }
+
+ function paintException($message) {
+ parent::paintException($message);
+ echo PHP_EOL;
+ echo " Exception ", $this->getExceptionCount(), "!", PHP_EOL;
+ echo " {$message->getMessage()}";
}
@@ -86,3 +95,3 @@
function paintFormattedMessage($message) {
- print "$message\n";
+ echo "$message\n";
flush();
@@ -90,20 +99,17 @@
+ protected $before_fails = 0;
function paintMethodStart($test_name)
{
- //print "Start {$test_name} Test\n";
- print " |--- {$test_name}";
- $this->before_fails = $this->_fails;
+ echo " |--- {$test_name}";
+ $this->before_fails = $this->getFailCount() + $this->getExceptionCount();
}
- var $before_fails = 0;
-
function paintMethodEnd($test_name)
{
- //print "End {$test_name} Test\n";
- if ($this->before_fails != $this->_fails) {
- print " - NG";
+ if ($this->before_fails != $this->getFailCount() + $this->getExceptionCount()) {
+ echo " - [41;37mNG[0m";
} else {
- print " - OK";
+ echo " - OK";
}
- print "\n";
+ echo PHP_EOL;
}
@@ -112,3 +118,3 @@
{
- print "\n {$test_name}\n";
+ echo "\n {$test_name}\n";
return parent::paintCaseStart($test_name);
Only in Ethna-2.6.0beta2011102522/test: TextSimpleReporter.php
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/UnitTestBase.php Ethna-2.6.0beta2011102522/test/UnitTestBase.php
--- Ethna-2.6.2011010402/test/UnitTestBase.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/UnitTestBase.php 2011-10-25 22:50:53.000000000 +0900
@@ -43,7 +43,7 @@
// actionform, actionerror.
- if ($this->ctl->action_form === null) {
- $this->ctl->action_form = new Ethna_ActionForm($this->ctl);
- $this->backend->setActionForm($this->ctl->action_form);
+ if ($this->ctl->getActionForm() === null) {
+ $this->ctl->setActionForm(new Ethna_ActionForm($this->ctl));
+ $this->backend->setActionForm($this->ctl->getActionForm());
}
- $this->af = $this->ctl->action_form;
+ $this->af = $this->ctl->getActionForm();
$this->ae = $this->ctl->getActionError();
@@ -51,4 +51,25 @@
// viewclass
- if ($this->ctl->view === null) {
- $this->ctl->view = new Ethna_ViewClass($this->backend, '', '');
+ if ($this->ctl->getView() === null) {
+ $this->ctl->setView(new Ethna_ViewClass($this->backend, '', ''));
+ }
+ }
+
+ function getNonpublicProperty($object, $property_name)
+ {
+ if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
+ $ref = new ReflectionProperty(get_class($object), $property_name);
+ $ref->setAccessible(true);
+ return $ref->getValue($object);
+ } else {
+ $arr = (array)$object;
+ $key = $property_name;
+
+ $ref = new ReflectionProperty(get_class($object), $property_name);
+ if ($ref->isProtected()) {
+ $key = "\0*\0".$key;
+ } elseif ($ref->isPrivate()) {
+ $key = "\0".get_class($object)."\0".$key;
+ }
+
+ return $arr[$key];
}
Only in Ethna-2.6.0beta2011102522/test: UrlHandler_Simple_Test.php
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/UrlHandler_Test.php Ethna-2.6.0beta2011102522/test/UrlHandler_Test.php
--- Ethna-2.6.2011010402/test/UrlHandler_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/UrlHandler_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -83,3 +83,3 @@
- $this->url_handler->action_map = $this->_simple_map;
+ $this->url_handler->setActionMap($this->_simple_map);
$injected = $this->url_handler->requestToAction($http_vars);
@@ -97,3 +97,3 @@
// action を受け取る
- $this->url_handler->action_map = $this->_complex_map;
+ $this->url_handler->setActionMap($this->_complex_map);
$injected = $this->url_handler->requestToAction($http_vars);
@@ -116,3 +116,3 @@
- $this->url_handler->action_map = $this->_complex_map;
+ $this->url_handler->setActionMap($this->_complex_map);
$injected = $this->url_handler->requestToAction($http_vars);
@@ -135,3 +135,3 @@
// 一致する action_map がない: エラーとして array() を返す
- $this->url_handler->action_map = $this->_simple_map;
+ $this->url_handler->setActionMap($this->_simple_map);
$injected = $this->url_handler->requestToAction($http_vars);
@@ -141,3 +141,3 @@
// action とパラメータ param1 を受け取る
- $this->url_handler->action_map = $this->_complex_map;
+ $this->url_handler->setActionMap($this->_complex_map);
$injected = $this->url_handler->requestToAction($http_vars);
@@ -160,3 +160,3 @@
- $this->url_handler->action_map = $this->_complex_map;
+ $this->url_handler->setActionMap($this->_complex_map);
$injected = $this->url_handler->requestToAction($http_vars);
@@ -180,3 +180,3 @@
- $this->url_handler->action_map = $this->_complex_map;
+ $this->url_handler->setActionMap($this->_complex_map);
$injected = $this->url_handler->requestToAction($http_vars);
@@ -193,3 +193,3 @@
);
- $this->url_handler->action_map = $this->_complex_map;
+ $this->url_handler->setActionMap($this->_complex_map);
@@ -238,3 +238,3 @@
- $this->url_handler->action_map = $this->_prefix_suffix_map;
+ $this->url_handler->setActionMap($this->_prefix_suffix_map);
$injected = $this->url_handler->requestToAction($http_vars);
@@ -254,3 +254,3 @@
- $this->url_handler->action_map = $this->_simple_map;
+ $this->url_handler->setActionMap($this->_simple_map);
$ret = $this->url_handler->actionToRequest($action, $param);
@@ -273,3 +273,3 @@
- $this->url_handler->action_map = $this->_simple_map;
+ $this->url_handler->setActionMap($this->_simple_map);
$ret = $this->url_handler->actionToRequest($action, $param);
@@ -288,3 +288,3 @@
- $this->url_handler->action_map = $this->_complex_map;
+ $this->url_handler->setActionMap($this->_complex_map);
list($path, $path_key) = $this->url_handler->actionToRequest($action, $param);
@@ -305,3 +305,3 @@
- $this->url_handler->action_map = $this->_complex_map;
+ $this->url_handler->setActionMap($this->_complex_map);
list($path, $path_key) = $this->url_handler->actionToRequest($action, $param);
@@ -334,2 +334,7 @@
}
+
+ public function setActionMap($am)
+ {
+ $this->action_map = $am;
+ }
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/View/View_404_Test.php Ethna-2.6.0beta2011102522/test/View/View_404_Test.php
--- Ethna-2.6.2011010402/test/View/View_404_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/View/View_404_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -5,3 +5,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -50,2 +50,4 @@
$this->assertPattern("/404 Not Found/", $out);
+
+ $project->delete();
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/View/View_500_Test.php Ethna-2.6.0beta2011102522/test/View/View_500_Test.php
--- Ethna-2.6.2011010402/test/View/View_500_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/View/View_500_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -5,3 +5,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -50,2 +50,4 @@
$this->assertPattern("/500 Internal Server Error/", $out);
+
+ $project->delete();
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/View/View_Json_Test.php Ethna-2.6.0beta2011102522/test/View/View_Json_Test.php
--- Ethna-2.6.2011010402/test/View/View_Json_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/View/View_Json_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -5,3 +5,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -80,2 +80,4 @@
$this->assertEqual('["a","b"]', $out);
+
+ $project->delete();
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/View/View_Redirect_Test.php Ethna-2.6.0beta2011102522/test/View/View_Redirect_Test.php
--- Ethna-2.6.2011010402/test/View/View_Redirect_Test.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/View/View_Redirect_Test.php 2011-10-25 22:50:53.000000000 +0900
@@ -5,3 +5,3 @@
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
*/
@@ -72,2 +72,4 @@
}
+
+ $project->delete();
}
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/skel/app.controller.php Ethna-2.6.0beta2011102522/test/skel/app.controller.php
--- Ethna-2.6.2011010402/test/skel/app.controller.php 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/skel/app.controller.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -15,3 +15,3 @@
$lib = BASE . "/lib";
-ini_set('include_path', implode(PATH_SEPARATOR, array($app, $lib)) . PATH_SEPARATOR . ini_get('include_path'));
+set_include_path(implode(PATH_SEPARATOR, array($app, $lib)) . PATH_SEPARATOR . get_include_path());
@@ -41,3 +41,3 @@
*/
- var $appid = '{$application_id}';
+ protected $appid = '{$application_id}';
@@ -46,3 +46,3 @@
*/
- var $forward = array(
+ protected $forward = array(
/*
@@ -61,3 +61,3 @@
*/
- var $action = array(
+ protected $action = array(
/*
@@ -74,3 +74,3 @@
*/
- var $soap_action = array(
+ protected $soap_action = array(
/*
@@ -86,3 +86,3 @@
*/
- var $directory = array(
+ protected $directory = array(
'action' => 'app/action',
@@ -109,3 +109,3 @@
*/
- var $db = array(
+ protected $db = array(
'' => DB_TYPE_RW,
@@ -116,3 +116,3 @@
*/
- var $ext = array(
+ protected $ext = array(
'php' => 'php',
@@ -124,3 +124,3 @@
*/
- var $class = array(
+ public $class = array(
/*
@@ -148,3 +148,3 @@
*/
- var $plugin_search_appids = array(
+ protected $plugin_search_appids = array(
/*
@@ -168,3 +168,3 @@
*/
- var $filter = array(
+ protected $filter = array(
/*
@@ -192,3 +192,3 @@
*/
- function _getDefaultLanguage()
+ protected function _getDefaultLanguage()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/skel/skel.action.404.php Ethna-2.6.0beta2011102522/test/skel/skel.action.404.php
--- Ethna-2.6.2011010402/test/skel/skel.action.404.php 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/skel/skel.action.404.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -22,3 +22,3 @@
*/
- var $form = array();
+ protected $form = array();
}
@@ -41,3 +41,3 @@
*/
- function prepare()
+ public function prepare()
{
@@ -52,3 +52,3 @@
*/
- function perform()
+ public function perform()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/skel/skel.action.500.php Ethna-2.6.0beta2011102522/test/skel/skel.action.500.php
--- Ethna-2.6.2011010402/test/skel/skel.action.500.php 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/skel/skel.action.500.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -22,3 +22,3 @@
*/
- var $form = array();
+ protected $form = array();
}
@@ -41,3 +41,3 @@
*/
- function prepare()
+ public function prepare()
{
@@ -52,3 +52,3 @@
*/
- function perform()
+ public function perform()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/skel/skel.action.formhelper.php Ethna-2.6.0beta2011102522/test/skel/skel.action.formhelper.php
--- Ethna-2.6.2011010402/test/skel/skel.action.formhelper.php 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/skel/skel.action.formhelper.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -22,3 +22,3 @@
*/
- var $form = array(
+ protected $form = array(
@@ -84,3 +84,3 @@
*/
- function prepare()
+ public function prepare()
{
@@ -95,3 +95,3 @@
*/
- function perform()
+ public function perform()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/skel/skel.action.i18ntest.php Ethna-2.6.0beta2011102522/test/skel/skel.action.i18ntest.php
--- Ethna-2.6.2011010402/test/skel/skel.action.i18ntest.php 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/skel/skel.action.i18ntest.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -22,3 +22,3 @@
*/
- var $form = array(
+ protected $form = array(
'i18n_sample_name' => array(
@@ -80,3 +80,3 @@
*/
- function prepare()
+ public function prepare()
{
@@ -96,3 +96,3 @@
*/
- function perform()
+ public function perform()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/skel/skel.action.json.php Ethna-2.6.0beta2011102522/test/skel/skel.action.json.php
--- Ethna-2.6.2011010402/test/skel/skel.action.json.php 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/skel/skel.action.json.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -22,3 +22,3 @@
*/
- var $form = array();
+ protected $form = array();
}
@@ -41,3 +41,3 @@
*/
- function prepare()
+ public function prepare()
{
@@ -52,3 +52,3 @@
*/
- function perform()
+ public function perform()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/skel/skel.action.pluginpreload.php Ethna-2.6.0beta2011102522/test/skel/skel.action.pluginpreload.php
--- Ethna-2.6.2011010402/test/skel/skel.action.pluginpreload.php 2010-12-27 03:32:46.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/skel/skel.action.pluginpreload.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -22,3 +22,3 @@
*/
- var $form = array();
+ protected $form = array();
}
@@ -47,3 +47,3 @@
*/
- function prepare()
+ public function prepare()
{
@@ -58,3 +58,3 @@
*/
- function perform()
+ public function perform()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/skel/skel.action.redirect.php Ethna-2.6.0beta2011102522/test/skel/skel.action.redirect.php
--- Ethna-2.6.2011010402/test/skel/skel.action.redirect.php 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/skel/skel.action.redirect.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -22,3 +22,3 @@
*/
- var $form = array();
+ protected $form = array();
}
@@ -41,3 +41,3 @@
*/
- function prepare()
+ public function prepare()
{
@@ -52,3 +52,3 @@
*/
- function perform()
+ public function perform()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/skel/skel.view.i18ntest.php Ethna-2.6.0beta2011102522/test/skel/skel.view.i18ntest.php
--- Ethna-2.6.2011010402/test/skel/skel.view.i18ntest.php 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/test/skel/skel.view.i18ntest.php 2011-10-25 22:50:53.000000000 +0900
@@ -6,3 +6,3 @@
* @package {$project_id}
*/
@@ -25,3 +25,3 @@
*/
- function preforward()
+ public function preforward()
{
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/test/test_message_catalog.ini Ethna-2.6.0beta2011102522/test/test_message_catalog.ini
diff -r -b -w -B -U 1 Ethna-2.6.2011010402/tpl/info.tpl Ethna-2.6.0beta2011102522/tpl/info.tpl
--- Ethna-2.6.2011010402/tpl/info.tpl 2010-09-04 03:36:53.000000000 +0900
+++ Ethna-2.6.0beta2011102522/tpl/info.tpl 2011-10-25 22:50:53.000000000 +0900
@@ -17,2 +17,3 @@
table { margin: auto; border-collapse: collapse;}
+ table table { margin: 5px;}
.center {text-align: center;}
カテゴリ:
Ethna