function add_internal($internal_classes) { global $functions, $internal_arginfo; foreach ($internal_classes as $class_name) { add_class($class_name, 0); } foreach (get_declared_interfaces() as $class_name) { add_class($class_name); } foreach (get_declared_traits() as $class_name) { add_class($class_name); } foreach (get_defined_functions()['internal'] as $function_name) { $function = new \ReflectionFunction($function_name); $required = $function->getNumberOfRequiredParameters(); $optional = $function->getNumberOfParameters() - $required; $functions[strtolower($function_name)] = ['file' => 'internal', 'namespace' => $function->getNamespaceName(), 'avail' => true, 'conditional' => false, 'flags' => 0, 'lineno' => 0, 'endLineno' => 0, 'name' => $function_name, 'docComment' => '', 'required' => $required, 'optional' => $optional, 'ret' => null, 'params' => []]; add_param_info($function_name); } foreach (array_keys($internal_arginfo) as $function_name) { if (strpos($function_name, ':') !== false) { continue; } $ln = strtolower($function_name); $functions[$ln] = ['file' => 'internal', 'avail' => false, 'conditional' => false, 'flags' => 0, 'lineno' => 0, 'endLineno' => 0, 'name' => $function_name, 'docComment' => '', 'ret' => null, 'params' => []]; add_param_info($function_name); } }
<aside class="related"> <div class="clearfix"> <hgroup class="related"> <h2>関連製品</h2> <h3>Related products</h3> </hgroup> </div> <?php while ($related->have_posts()) { $related->the_post(); /** 繰り返し処理開始 */ ?> <article class="grid_3 <?php echo add_class($related); /** Green 独自関数 - テーマ用のクラスを付ける */ ?> "> <div class="box-link"> <div class="box-s-top"></div> <div class="box-s-middle equal-height"> <!-- 見出し --> <hgroup> <h3><?php the_title(); ?> </h3> <?php if (get_post_meta($post->ID, 'sub-title', true)) {
function add_model($name, $table = '', array $columns = array(), array $indexes = array(), $parent = 'database', $connection = 'default') { static $set = array('database' => '\\Servant\\Mapper\\Database', 'mongodb' => '\\Servant\\Mapper\\MongoDB'); $table = $table ?: underscore($name); $ucname = classify($name); $fields['static columns'] = $columns; $fields['static indexes'] = $indexes; $connect = compact('table', 'connection'); $out_file = path(APP_PATH, 'app', 'models', "{$name}.php"); isset($set[$parent]) && ($parent = $set[$parent]); add_class($out_file, $ucname, $parent, array(), $fields, $connect); }
/** * Merges the existing attributes with the new ones * * @param array|string $attributes Array of attribute 'name' => 'value' pairs * or HTML attribute string * @param array|string $attributes Array of attribute 'name' => 'value' pairs * or HTML attribute string * * @return string A string containing merged attributes */ function merge_attributes_and_classes($attributes, $extra_attributes) { $attributes = prepare_attributes($attributes); $extra_attributes = prepare_attributes($extra_attributes); $class_extra = get_attribute($extra_attributes, 'class'); $attributes = add_class($attributes, get_attribute($extra_attributes, 'class')); $extra_attributes = remove_attribute($extra_attributes, 'class'); return merge_attributes($attributes, $extra_attributes); }
*****************************************/ get_header(); ?> <!-- taxonomy.php --> <div class="grid_9 push_3" id="main"> <?php if (have_posts()) { /** ループ開始 */ while (have_posts()) { the_post(); ?> <article class="grid_3 box-link <?php echo add_class(); /** Green 独自関数 - テーマ用のクラスを付ける */ ?> "> <div class="box-s-top"></div> <div class="box-s-middle equal-height"> <hgroup> <h3><?php the_title(); /** タイトル */ ?> </h3> <h4 class="subtitle">