Changeset 278
- Timestamp:
- 07/04/07 19:39:53 (1 year ago)
- Files:
-
- trunk/lib/AkActiveRecord.php (modified) (2 diffs)
- trunk/script/console (modified) (1 diff)
- trunk/test/fixtures/config/config.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/AkActiveRecord.php
r277 r278 19 19 20 20 require_once(AK_LIB_DIR.DS.'AkActiveRecord'.DS.'AkAssociatedActiveRecord.php'); 21 22 // Akelos args is a short way to call functions that is only intended for fast prototyping 23 defined('AK_ENABLE_AKELOS_ARGS') ? null : define('AK_ENABLE_AKELOS_ARGS', false); 21 24 22 25 // Use setColumnName if available when using set('column_name', $value); … … 1467 1470 * 1468 1471 * Use this syntax only for quick testings, not for production environments. If the number of arguments varies, the result might be unpredictable. 1472 * 1473 * This function syntax is disabled by default. You need to define('AK_ENABLE_AKELOS_ARGS', true) 1474 * if you need this functionality. 1475 * 1476 * @deprecated 1469 1477 */ 1470 1478 function parseAkelosArgs(&$args) 1471 1479 { 1480 if(!AK_ENABLE_AKELOS_ARGS){ 1481 return ; 1482 } 1472 1483 $k = array_keys($args); 1473 if(isset($k[1]) && substr($args[$k[0]],-1) == '>' && preg_match('/$[a-zA-Z0-9_]+>^/', $k[0])){1484 if(isset($k[1]) && substr($args[$k[0]],-1) == '>'){ 1474 1485 $size = sizeOf($k); 1475 1486 $params = array(); 1476 1487 for($i = 0; $i < $size; $i++ ) { 1477 1488 $v = $args[$k[$i]]; 1478 if(!isset($key) && is_string($args[$k[$i]]) && substr($v,-1) == '>' && preg_match('/$[a-zA-Z0-9_]+>^/', $v)){1489 if(!isset($key) && is_string($args[$k[$i]]) && substr($v,-1) == '>'){ 1479 1490 $key = rtrim($v, '=-> '); 1480 1491 }elseif(isset($key)) { trunk/script/console
r37 r278 22 22 define('AK_CONSOLE_MODE', true); 23 23 defined('AK_ENVIRONMENT') ? null : define('AK_ENVIRONMENT', 'development'); 24 define('AK_ENABLE_AKELOS_ARGS', true); 24 25 include(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php'); 25 26 trunk/test/fixtures/config/config.php
r255 r278 20 20 (array)@explode('/',@$_SERVER['REQUEST_URI']))),DIRECTORY_SEPARATOR),array('','/'),AK_TEST_DIR)); 21 21 22 22 defined('AK_ENABLE_AKELOS_ARGS') ? null : define('AK_ENABLE_AKELOS_ARGS', true); 23 23 //define('AK_SKIP_DB_CONNECTION',isset($db) && $db === false); 24 24
