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


PHP Properties::GetPropertyName方法代码示例

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


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

示例1: getProps

 public static function getProps($val, $byId = false)
 {
     if (!$byId) {
         $p = Properties::GetPropertyName($val);
         return isset($p) ? $p->GetID() : 0;
     }
     $p = Properties::GetProperty($val);
     return isset($p) ? $p->GetName() : 0;
 }
开发者ID:uirapuru,项目名称:virgoapi,代码行数:9,代码来源:offershelper.class.php

示例2: GetInvestments


//.........这里部分代码省略.........
                 } else {
                     if ($propNode->getName() == "Jezyki") {
                         $lngsNode = $propNode;
                     } else {
                         if ($propNode->getName() == "Budynki") {
                             $buildingsNode = $propNode;
                         } else {
                             if ($propNode->getName() == "Agenci") {
                                 $agentsNode = $propNode;
                             } else {
                                 if ($propNode->getName() == "PolaDynamiczne") {
                                     //delete unuse properties from offer
                                     $addedProperties = array();
                                     foreach ($propNode->children() as $listNode) {
                                         $pname = (string) $listNode["Nazwa"];
                                         $investment->__set($pname, $listNode);
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
             //save investment object to database
             Investments::AddEditInvestment($investment);
             echo DataBase::GetDbInstance()->LastError();
             //delete unuse properties from offer
             $addedProperties = array();
             foreach ($node->children() as $propNode) {
                 $pname = $propNode->getName();
                 if ($pname == "PolaDynamiczne") {
                     foreach ($propNode->children() as $listNode) {
                         $pname = (string) $listNode["Nazwa"];
                         $prop = Properties::GetPropertyName($pname);
                         if ($prop != null) {
                             $addedProperties[count($addedProperties)] = $prop->GetID();
                         }
                     }
                 }
             }
             Investments::DeleteUnUseProperties($investment->GetId(), $investment->GetIdLng(), $addedProperties);
             //photos
             if ($photosNode != null) {
                 $addedPhotos = array();
                 foreach ($photosNode->children() as $photoNode) {
                     $intro = $photoNode->intro == "True" ? 1 : 0;
                     $photo = new OfferPhoto($photoNode['ID'], null, $investment->GetId(), $photoNode->plik, $photoNode->opis, $photoNode['lp'], $photoNode['typ'], $intro, null, (string) $photoNode->LinkFilmYouTube, (string) $photoNode->LinkMiniaturkaYouTube);
                     OfferPhotos::AddEditPhoto($photo);
                     echo DataBase::GetDbInstance()->LastError();
                     $addedPhotos[count($addedPhotos)] = $photo->GetId();
                 }
                 OfferPhotos::DeleteUnUsePhotos(0, $addedPhotos, $investment->GetId());
             }
             //buildings
             if ($buildingsNode != null) {
                 $importedBlds = "";
                 foreach ($buildingsNode->children() as $buildingNode) {
                     $importedBlds .= $buildingNode["ID"] . ",";
                     $building = new InvestmentBuilding(null, $buildingNode['ID'], $buildingNode->Nazwa, $buildingNode['Symbol'], $buildingNode->Opis, $investment->GetId(), CheckNumeric($buildingNode['Metraz']), $buildingNode->TerminOddania, CheckNumeric($buildingNode['LiczbaPieter']));
                     Investmentbuildings::AddEditInvestmentBuilding($building);
                     echo DataBase::GetDbInstance()->LastError();
                     //add offers to building
                     $offersNode = $buildingNode->Oferty;
                     Investmentbuildings::AddOffersToBuilding($offersNode, $building);
                 }
                 //delete buildings
开发者ID:uirapuru,项目名称:virgoapi,代码行数:67,代码来源:webservice.class.php


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