{$target_key} = $target_obj->{$target_key}; } return $return_obj; } /** * @brief php5 이상에서 error_handing을 debugPrint로 변경 * @param errno * @param errstr * @return file * @return line **/ function handleError($errno, $errstr, $file, $line) { if(!__DEBUG__) return; $errors = array(E_USER_ERROR, E_ERROR, E_PARSE); if(!in_array($errno,$errors)) return; $output = sprintf("Fatal error : %s - %d", $file, $line); $output .= sprintf("%d - %s", $errno, $errstr); debugPrint($output); } /** * @brief 주어진 숫자를 주어진 크기로 recursive하게 잘라줌 * 디렉토리 생성을 위해서 쓰임... **/ function getNumberingPath($no, $size=3) { $mod = pow(10,$size); $output = sprintf('%0'.$size.'d/', $no%$mod); if($no >= $mod) $output .= getNumberingPath((int)$no/$mod, $size); return $output; } ?>