當前位置: 首頁>>代碼示例>>PHP>>正文


PHP setId函數代碼示例

本文整理匯總了PHP中setId函數的典型用法代碼示例。如果您正苦於以下問題:PHP setId函數的具體用法?PHP setId怎麽用?PHP setId使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了setId函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: construct

/**
 * Создаёт заказ по данным из mysql
 *
 * @param array $data данные из mysql
 *
 * @return &array объект заказа
 */
function &unserializeFromMysql(array $data)
{
    $Order =& construct();
    setId($Order, $data['id']);
    setPrice($Order, $data['price']);
    setText($Order, $data['text']);
    return $Order;
}
開發者ID:amberovsky,項目名稱:avaritia,代碼行數:15,代碼來源:Order.php

示例2: extract

<?php

extract(shortcode_atts(array('class' => '', 'id' => '', 'css_animation' => '', 'css_animation_delay' => '', 'color_scheme' => ''), $atts));
$animated = $css_animation ? 'animate' : '';
$css_animation_delay = $css_animation ? ' data-delay="' . $css_animation_delay . '"' : '';
$class = setClass(array('md-tabs md-tours', $animated, $css_animation, $class, $color_scheme));
$id = setId($id);
$output = '<div' . $class . $id . $css_animation_delay . '>';
$output .= '<ul class="nav nav-tabs">';
$GLOBALS['tabs'] = 'nav';
$output .= wpb_js_remove_wpautop($content);
$output .= '</ul>';
$GLOBALS['tabs'] = 'content';
$output .= '<div class="tab-content">';
$output .= wpb_js_remove_wpautop($content, true);
$output .= '</div>';
$output .= '</div>';
echo $output;
開發者ID:Beutiste,項目名稱:wordpress,代碼行數:18,代碼來源:md_tours.php

示例3: useId

function useId($freeId)
{
    $lastId = sql_value("SELECT MAX(`id`) FROM `sys_trans`", 0);
    if ($lastId + 1 == $freeId) {
        return;
    }
    setId($lastId, $freeId);
}
開發者ID:PaulinaKowalczuk,項目名稱:oc-server3,代碼行數:8,代碼來源:translate.php

示例4: __construct

 function __construct($idT, $nombreT, $precioT)
 {
     setId($idT);
     setNombre($nombreT);
     setPrecio($precioT);
 }
開發者ID:raulnavascues,項目名稱:Curso-Konectia,代碼行數:6,代碼來源:Producto.php

示例5: construct

/**
 * Создаёт исполнителя по данным из mysql
 *
 * @param array $data данные из mysql
 *
 * @return &array объект исполнителя
 */
function &unserializeFromMysql(array $data)
{
    $Executor =& construct();
    setId($Executor, $data['id']);
    setFio($Executor, $data['fio']);
    setSalary($Executor, $data['salary']);
    setLogin($Executor, $data['login']);
    return $Executor;
}
開發者ID:amberovsky,項目名稱:avaritia,代碼行數:16,代碼來源:Executor.php

示例6: explode

    $output .= '</div>';
}
if ($bgtype == 'bg-slider') {
    $output .= '<div class="section-slider">';
    $images = explode(',', $slider_images);
    $output .= '<div class="flexslider" data-slideshow="true" data-disable-keyboard="true" data-effect="fade" data-navigation="false" data-pagination="false"><ul class="slides">';
    foreach ($images as $image) {
        $image_big = wp_get_attachment_image_src($image, 'full');
        $alt = get_post_meta($image, '_wp_attachment_image_alt', true) ? get_post_meta($image, '_wp_attachment_image_alt', true) : '';
        $output .= '<li><img src="' . $image_big[0] . '" alt="' . esc_attr($alt) . '" /></li>';
    }
    $output .= '</ul></div>';
    $output .= '</div>';
}
if ($bgtype == 'bg-map') {
    $map_id = setId('map_' . uniqid());
    $output .= '<div class="section-map">';
    $output .= '<div class="md-map" id="' . $map_id . '"';
    $output .= ' data-map-type="' . $map_type . '"';
    if ($map_latitude) {
        $output .= ' data-map-lat="' . $map_latitude . '"';
    }
    if ($map_longitude) {
        $output .= ' data-map-lon="' . $map_longitude . '"';
    }
    if ($map_zoom) {
        $output .= ' data-map-zoom="' . $map_zoom . '"';
    }
    if ($map_pin) {
        $map_pin = wp_get_attachment_image_src($map_pin, 'full');
        $output .= ' data-map-pin="' . $map_pin[0] . '"';
開發者ID:Beutiste,項目名稱:wordpress,代碼行數:31,代碼來源:vc_row.php

示例7: extract

<?php

extract(shortcode_atts(array('class' => '', 'id' => '', 'css_animation' => '', 'css_animation_delay' => '', 'map_type' => '', 'map_latitude' => '', 'map_longitude' => '', 'map_zoom' => '', 'map_pin' => '', 'map_title' => '', 'map_info' => '', 'map_height' => '', 'map_scroll' => '', 'map_drag' => '', 'map_zoom_control' => '', 'map_disable_doubleclick' => '', 'map_streetview' => ''), $atts));
$animated = $css_animation ? 'animate' : '';
$css_animation_delay = $css_animation ? ' data-delay="' . $css_animation_delay . '"' : '';
$class = setClass(array('md-map', $animated, $css_animation, $class));
$id = setId($id, 'map_' . uniqid());
$map_height = ' style="height:' . $map_height . 'px"';
$map_pin = $map_pin ? wp_get_attachment_image_src($map_pin, 'full') : '';
$output = '<div' . $class . $id . $css_animation_delay . $map_height;
$output .= ' data-map-type="' . $map_type . '"';
if ($map_latitude) {
    $output .= ' data-map-lat="' . $map_latitude . '"';
}
if ($map_longitude) {
    $output .= ' data-map-lon="' . $map_longitude . '"';
}
if ($map_zoom) {
    $output .= ' data-map-zoom="' . $map_zoom . '"';
}
if ($map_pin) {
    $output .= ' data-map-pin="' . $map_pin[0] . '"';
}
if ($map_title) {
    $output .= ' data-map-title="' . $map_title . '"';
}
if ($map_info) {
    $output .= ' data-map-info="' . $map_info . '"';
}
$output .= ' data-map-scroll="' . $map_scroll . '"';
$output .= ' data-map-drag="' . $map_drag . '"';
開發者ID:Beutiste,項目名稱:wordpress,代碼行數:31,代碼來源:md_gmap.php


注:本文中的setId函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。