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


PHP Country::setReexport方法代码示例

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


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

示例1: JsonResponse

<?php

require_once '../core/generics/Param.php';
require_once '../core/generics/datacenter/Country.php';
require_once '../core/generics/Controller.php';
require_once '../core/generics/GenericDao.php';
$json = new JsonResponse();
$dao = new GenericDao(Connection::connect());
$controller = new Controller($dao);
$country_id = $_REQUEST['country'];
$object = new Country($_POST['name']);
$object->setId($country_id);
if (isset($_POST['reexport']) && $_POST['reexport'] == true) {
    $object->setReexport();
}
if ($controller->editCountry($object)) {
    print_r($json->response(true, "País editado com sucesso!")->serialize());
} else {
    print_r($json->response(false, "O país não foi editado!")->serialize());
}
开发者ID:raigons,项目名称:bureauinteligencia,代码行数:20,代码来源:country_edit.php

示例2: Country

 if(RequestsPatterns::postParamsSetted('name', 'type')){
     if(RequestsPatterns::postParamsSent('name', 'type')){
         $name = $_POST['name'];
         $typeCountry = $_POST['type'];
         
         $country = new Country($name);
          
         $dao = new GenericDao(Connection::connect());
         $controller = new Controller($dao);
         
         $message = "País inserido com sucesso";
         $message_error = "Falha na inserção do país"; 
         try{
             if($typeCountry == 'origin'){
                 if(isset($_POST['reexport']) && $_POST['reexport'] == true){
                     $country->setReexport();
                 }
                 if($controller->createNewOriginCountry($country)){
                     $countryToCache = $controller->getCountryByName($country,$typeCountry);                        
                     cacheCountry($countryToCache, $typeCountry);
                     print_r($json->response (true, $message)->serialize ());
                 }else
                     print_r($json->response (true, $message_error)->serialize ());
             }else{
                 if($controller->createNewDestinyCountry($country)){
                     $countryToCache = $controller->getCountryByName($country,$typeCountry);            
                     cacheCountry($countryToCache, $typeCountry);
                     print_r($json->response (true, $message)->serialize ());
                 }else
                     print_r($json->response (true, $message_error)->serialize ());
             }
开发者ID:raigons,项目名称:bureauinteligencia,代码行数:31,代码来源:country_insert.php

示例3: buildObject

 private function buildObject($type, $object)
 {
     if (isset($object['name'])) {
         $name = utf8_encode($object['name']);
     }
     $id = $object['id'];
     switch ($type) {
         case "area":
             return new Area($object['name'], $object['id']);
             break;
         case "subarea":
             return new SubArea($object['name'], $object['id']);
             break;
         case "estados":
             return new State($object['id'], $object['uf'], $object['nome']);
             break;
         case "city":
             return new City($object['nome'], $object['id']);
             break;
         case "activities":
             return new Activity($object['name'], $object['id']);
             break;
         case "publication_type":
             return new PublicationType($object['name'], $object['id']);
             break;
         case "groups":
             return new Group($name, $id);
             break;
         case "subgroup":
             return new Subgroup($name, $id);
             break;
         case "variety":
             return new Variety($name, $id);
             break;
         case "coffetype":
             return new CoffeType($name, $id);
             break;
         case "country":
             $country = new Country($name, $id);
             if (isset($object['reexport']) && $object['reexport'] == 1) {
                 $country->setReexport();
             }
             return $country;
             break;
         case "font":
             return new Font($name, $id);
             break;
     }
 }
开发者ID:raigons,项目名称:bureauinteligencia,代码行数:49,代码来源:GenericDao.php


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