<?
require_once 'Zend/Uri/Http.php';
namespace Location\Web;
interface Factory
{
static function _factory();
}
abstract class URI extends BaseURI implements Factory
{
abstract function test();
/**
* Returns a URI
*
* @return URI
*/
static public function _factory($stats = array(), $uri = 'http')
{
echo __METHOD__;
$uri = explode(':', $uri, 0b10);
$schemeSpecific = isset($uri[1]) ? $uri[1] : '';
$desc = 'Multi
line description';
// Security check
if (!ctype_alnum($scheme)) {
throw new Zend_Uri_Exception('Illegal scheme');
}
return [
'uri' => $uri,
'value' => null,
];
}
}
__halt_compiler () ; datahere
datahere
datahere */
datahere
?>
<?php
if($called_position!='before_module_proc') return;
if($this->grant->manager) return;
if($this->module!='board' || $this->module!='bodex') return;
if(stripos($this->act,'InsertDocument') !== false) {
$oContent = strip_tags(Context::get('content'));
$oContent = html_entity_decode($oContent);
if(mb_strlen($oContent,'utf-8') < $addon_info->docLength) {
if($lang_type=='ko') $output = new object(-1, '게시글에는 적어도 '.$addon_info->docLength.'자 이상 들어가야 합니다.');
else $output = new object(-1, 'Enter at least '.$addon_info->docLength.'characters or more to post.');
$oDisplayHandler = new DisplayHandler();
$oDisplayHandler->printContent($output);
exit;
}
}else if(stripos($this->act,'InsertComment') !== false) {
$oContent = strip_tags(Context::get('content'));
$oContent = html_entity_decode($oContent);
if(mb_strlen($oContent,'utf-8') < $addon_info->comLength) {
if($lang_type=='ko') $output = new object(-1, '덧글에는 적어도 '.$addon_info->comLength.'자 이상 들어가야 합니다.');
else $output = new object(-1, 'Enter at least '.$addon_info->docLength.'characters or more to comment.');
$oDisplayHandler = new DisplayHandler();
$oDisplayHandler->printContent($output);
exit;
}
}
?>
코드 하이라이트를 적용했습니다. 사용한 라이브러리는 highlight.js . 뭔가 좀 오류가 간간히 보이는 것 같지만, 무시하도록 해야겠습니다 (...) 역시 하이라이트가 완벽하지는 않아서 수많은 PHP 함수를 임의로 추가해줬습니다. 그 리스트를 보고 싶으시다면 아레 MORE를 클릭하세요. (물론 봐도 도움될 건 없습니다만, 간혹 이게 필요하신 분이 있을 것 같아서 올려봅니다.)
펼치기.. 접기..
basename chgrp chmod chown clearstatcache copy delete dirname disk_free_space disk_total_space diskfreespace fclose feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents file fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fnmatch fopen fpassthru fputcsv fputs fread fscanf fseek fstat ftell ftruncate fwrite glob is_dir is_executable is_file is_link is_readable is_uploaded_file is_writable is_writeable lchgrp lchown link linkinfo lstat mkdir move_uploaded_file parse_ini_file parse_ini_string pathinfo pclose popen readfile readlink realpath_cache_get realpath_cache_size realpath rename rewind rmdir set_file_buffer stat symlink tempnam tmpfile touch umask unlink session_cache_expire session_cache_limiter session_commit session_decode session_destroy session_encode session_get_cookie_params session_id session_is_registered session_module_name session_name session_regenerate_id session_register_shutdown session_register session_save_path session_set_cookie_params session_set_save_handler session_start session_status session_unregister session_unset session_write_close array_change_key_case array_chunk array_column array_combine array_count_values array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_diff array_fill_keys array_fill array_filter array_flip array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_product array_push array_rand array_reduce array_replace_recursive array_replace array_reverse array_search array_shift array_slice array_splice array_sum array_udiff_assoc array_udiff_uassoc array_udiff array_uintersect_assoc array_uintersect_uassoc array_uintersect array_unique array_unshift array_values array_walk_recursive array_walk array arsort asort compact count current each end extract in_array key_exists key krsort ksort list natcasesort natsort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort __autoload call_user_method_array call_user_method class_alias class_exists get_called_class get_class_methods get_class_vars get_class get_declared_classes get_declared_interfaces get_declared_traits get_object_vars get_parent_class interface_exists is_a is_subclass_of method_exists property_exists trait_exists filter_has_var filter_id filter_input_array filter_input filter_list filter_var_array filter_var call_user_func_array call_user_func create_function forward_static_call_array forward_static_call func_get_arg func_get_args func_num_args function_exists get_defined_functions register_shutdown_function register_tick_function unregister_tick_function addcslashes addslashes bin2hex chop chr chunk_split convert_cyr_string convert_uudecode convert_uuencode count_chars crc32 crypt echo explode fprintf get_html_translation_table hebrev hebrevc hex2bin html_entity_decode htmlentities htmlspecialchars_decode htmlspecialchars implode join lcfirst levenshtein localeconv ltrim md5_file md5 metaphone money_format nl_langinfo nl2br number_format ord parse_str print printf quoted_printable_decode quoted_printable_encode quotemeta rtrim setlocale sha1_file sha1 similar_text soundex sprintf sscanf str_getcsv str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk strpos strrchr strrev strripos strrpos strspn strstr strtok strtolower strtoupper strtr substr_compare substr_count substr_replace substr trim ucfirst ucwords vfprintf vprintf vsprintf wordwrap mysql_affected_rows mysql_client_encoding mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_escape_string mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_flags mysql_field_len mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_free_result mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_ping mysql_query mysql_real_escape_string mysql_result mysql_select_db mysql_set_charset mysql_stat mysql_tablename mysql_thread_id mysql_unbuffered_query mysqli_affected_rows mysql_client_encoding mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_escape_string mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_flags mysql_field_len mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_free_result mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_ping mysql_query mysql_real_escape_string mysql_result mysql_select_db mysql_set_charset mysql_stat mysql_tablename mysql_thread_id mysql_unbuffered_query boolval debug_zval_dump doubleval empty floatval get_defined_vars get_resource_type gettype import_request_variables intval is_array is_bool is_callable is_double is_float is_int is_integer is_long is_null is_numeric is_object is_real is_resource is_scalar is_string isset print_r serialize settype strval unserialize unset var_dump var_export gzclose gzcompress gzdecode gzdeflate gzencode gzeof gzfile gzgetc gzgets gzgetss gzinflate gzopen gzpassthru gzputs gzread gzrewind gzseek gztell gzuncompress gzwrite readgzfile zlib_decode zlib_encode zlib_get_coding_type hash_algos hash_copy hash_file hash_final hash_hmac_file hash_hmac hash_init hash_pbkdf2 hash_update_file hash_update_stream hash_update hash chdir chroot closedir dir getcwd opendir readdir rewinddir scandir iconv_get_encoding iconv_mime_decode_headers iconv_mime_decode iconv_mime_encode iconv_set_encoding iconv_strlen iconv_strpos iconv_strrpos iconv_substr iconv ob_iconv_handler mail abs acos acosh asin asinh atan2 atan atanh base_convert bindec ceil cos cosh decbin dechex decoct deg2rad exp expm1 floor fmod getrandmax hexdec hypot is_finite is_infinite is_nan lcg_value log10 log1p log max min mt_getrandmax mt_rand mt_srand octdec pi pow rad2deg rand round sin sinh sqrt srand tan tanh geoip_continent_code_by_name geoip_country_code_by_name geoip_country_code3_by_name geoip_country_name_by_name geoip_database_info geoip_db_avail geoip_db_filename geoip_db_get_all_info geoip_id_by_name geoip_isp_by_name geoip_org_by_name geoip_record_by_name geoip_region_by_name geoip_region_name_by_code geoip_time_zone_by_country_and_region json_decode json_encode json_last_error_msg json_last_error base64_decode base64_encode get_headers get_meta_tags http_build_query parse_url rawurldecode rawurlencode urldecode urlencode curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version for control structures while do for foreach break continue switch declare return require include require_once include_once goto elseif if else and list abstract global private echo interface as static endswitch array null endwhile or const for endforeach self var while isset public protected exit foreach throw __FILE__ empty xor return parent clone use __CLASS__ __LINE__ break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally Context header object __XE__ query get module set
궁금하신 분이 있을까봐 올리는데, 위의 코드는 해당 라이브러리 예시 코드로 적혀있던 코드입니다. 딱 보니 별 의미는 없어보이고, 그냥 URL을 처리(?)하는 것 같네요. 두번째 코드는 제작한 애드온중 하나인 글자수 제한 애드온입니다. 출력이 영 마음에 들지 않네요.
0 comment