當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。