当前位置: 首页>>代码示例>>PHP>>正文


PHP DataType::Numeric方法代码示例

本文整理汇总了PHP中DataType::Numeric方法的典型用法代码示例。如果您正苦于以下问题:PHP DataType::Numeric方法的具体用法?PHP DataType::Numeric怎么用?PHP DataType::Numeric使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataType的用法示例。


在下文中一共展示了DataType::Numeric方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: load_cat

function load_cat()
{
    $url = "http://demo.kikapptools.com/Gastos/crud/getCategories.php";
    $hc = new httpClient();
    $rs = $hc->Execute("GET", $url);
    $struct = array(array("idCat" => DataType::Numeric(11), "name" => DataType::Character(80), "desc" => DataType::Character(200)));
    Data::FromJson($struct, $rs);
}
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:8,代码来源:IncomeOutcome.php

示例2: clientStart

function clientStart()
{
    $token = StorageAPI::Get("token");
    $url = "http://demo.kikapptools.com/Gastos/crud/getAccount.php";
    $httpClient = new httpClient();
    $httpClient->addVariable("id", $token);
    $result = $httpClient->Execute('POST', $url);
    $struct = array("money" => DataType::Numeric(11));
    Data::FromJson($struct, $result);
    $input = $struct['money'];
}
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:11,代码来源:Account.php

示例3: load_grid

function load_grid()
{
    $url = "http://demo.kikapptools.com/magento/apiKikApp/Categories.php?cId=" . $cat;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150)));
    Data::FromJson($struct, $result);
    foreach ($struct as $product) {
        $id = $product['id'];
        $name = $product['name'];
    }
}
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:12,代码来源:SubCategories.php

示例4: load_images

function load_images()
{
    $url = "http://demo.kikapptools.com/magento/apiGecko/productos.php?cId=0";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150), "description" => DataType::Character(300), "pirce" => DataType::Character(10), "thumb" => DataType::Character(200)));
    Data::FromJson($struct, $result);
    foreach ($struct as $product) {
        $id = $product['id'];
        $title = $product['name'];
        $desc = $product['description'];
        $image = $product['thumb'];
    }
}
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:14,代码来源:main.php

示例5: Start

function Start()
{
    //Make JSON request
    $url = "http://demo.kikapptools.com/taskManager/crud/getTask.php?id=" . $id;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    //Cast response data type
    $struct = array("id" => DataType::Numeric(6), "task" => DataType::Character(150), "status" => DataType::Numeric(1), "image" => DataType::Character(200), "created_at" => DataType::Character(20), "description" => DataType::Character(254));
    //Retrieve data to elements on screen
    Data::FromJson($struct, $result);
    $name = $struct['task'];
    $status = $struct['status'];
    $date = $struct['created_at'];
    $description = $struct['description'];
}
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:15,代码来源:TaskDetail.php

示例6: load_companies

function load_companies()
{
    $url = "http://demo.kikapptools.com/CRMManager/crud/getCompanies.php";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("CompanyId" => DataType::Numeric(8), "CompanyName" => DataType::Character(100), "CompanyImage" => DataType::Character(200), "CompanyAddress" => DataType::Character(200)));
    Data::FromJson($struct, $result);
    $id = new InputNumeric();
    foreach ($struct as $company) {
        $id = $company['CompanyId'];
        $image = $company['CompanyImage'];
        $name = $company['CompanyName'];
        $address = $company['CompanyAddress'];
    }
}
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:15,代码来源:list_companies.php

示例7: load_grid

function load_grid()
{
    //Make JSON request
    $url = "http://demo.kikapptools.com/taskManager/crud/getTask.php?status=" . $statusList . "&period=" . $period;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    //Cast response data type
    $struct = array(array("id" => DataType::Numeric(6), "task" => DataType::Character(150), "status" => DataType::Numeric(1), "created_at" => DataType::Character(20)));
    Data::FromJson($struct, $result);
    //Add result to screen vars
    foreach ($struct as $items) {
        $id = $items['id'];
        $name = $items['task'];
        $status = $items['status'];
        $date = $items['created_at'];
    }
}
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:17,代码来源:TodoLits.php

示例8: grid_load

function grid_load()
{
    $url = "http://demo.kikapptools.com/magento/apiKikApp/Products.php?cId=" . $cat;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150), "description" => DataType::Character(300), "pirce" => DataType::Character(10), "thumb" => DataType::Character(200), "stock" => DataType::Character(50), "href" => DataType::Character(300)));
    Data::FromJson($struct, $result);
    $prodUrl = new InputText();
    $id = new InputNumeric();
    $stock = new InputText();
    foreach ($struct as $product) {
        $id = $product['id'];
        $title = $product['name'];
        $desc = $product['description'];
        $image = $product['thumb'];
        $price = $product['pirce'];
        $stock = $product['stock'];
        $prodUrl = $product['href'];
    }
}
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:20,代码来源:ProductList.php

示例9: grid_load_products

function grid_load_products()
{
    $url_prod = "http://www.demo.kikapptools.com/magento/apiGecko/productos.php?cId=0";
    //the server url
    //Remember to configurate your server url on the Manifest.xml on <services>
    $httpClient_prod = new httpClient();
    $result_prod = $httpClient_prod->Execute('GET', $url_prod);
    //you get a JSON
    //it's a list so you have an array of an array
    $struct_prod = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150), "description" => DataType::Character(300), "pirce" => DataType::Character(10), "thumb" => DataType::Character(200)));
    Data::FromJson($struct_prod, $result_prod);
    //does a merge of the structure you made and the json you got
    foreach ($struct_prod as $product) {
        $id_prod = $product['id'];
        $title_prod = $product['name'];
        $desc_prod = $product['description'];
        $image_prod = $product['thumb'];
        $price_prod = $product['pirce'];
    }
    $id_prod = new InputNumeric();
}
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:21,代码来源:main.php

示例10: refresh

function refresh()
{
    $url = "http://demo.kikapptools.com/Gastos/crud/getIncome.php?id=" . $token;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array("account" => DataType::Numeric(11), "value_income" => DataType::Numeric(11), "value_outcome" => DataType::Numeric(11), "value_income_month" => DataType::Numeric(11), "value_outcome_month" => DataType::Numeric(11), "label_actual_month" => DataType::Character(20));
    Data::FromJson($struct, $result);
    $input_account = $struct['account'];
    $input_income = $struct['value_income'];
    $input_outcome = $struct['value_outcome'];
    $input1 = $struct['value_income_month'];
    $input2 = $struct['value_outcome_month'];
    $label_title = $struct['label_actual_month'];
}
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:14,代码来源:Home.php

示例11: load_grid

function load_grid()
{
    ProgressIndicator::Show();
    $url = "http://demo.kikapptools.com/magento/apiKikApp/api.php?metodo=userShoppingCart&customerToken=" . $token;
    $httpClient = new httpClient();
    $result_2 = $httpClient->Execute('GET', $url);
    $shoppingCart = array(array("id" => DataType::Numeric(), "name" => DataType::Character(), "sku" => DataType::Character(50), "quantity" => DataType::Numeric(4), "price" => DataType::Numeric(12, 4), "url" => DataType::Character(350)));
    Data::FromJson($shoppingCart, $result_2);
    foreach ($shoppingCart as $cart) {
        $id = $cart["id"];
        $name = $cart["name"];
        $qty = $cart["quantity"];
        $price = $cart["price"];
        $image = $cart["url"];
    }
    ProgressIndicator::Hide();
}
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:17,代码来源:ShoppingCart.php


注:本文中的DataType::Numeric方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。