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


PHP SJB_HelperFunctions::array_sort方法代码示例

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


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

示例1: SJB_FacebookSocialDetails

 public function SJB_FacebookSocialDetails($info)
 {
     $this->commonFields = parent::getCommonFields();
     $this->postingFields = self::getPostingFields();
     $this->systemFields = self::getSystemFields();
     $detailsInfo = self::getDetails($this->commonFields);
     $sortArray = array();
     $locationPrefix = '';
     foreach ($detailsInfo as $index => $propertyInfo) {
         $sortArray[$index] = $propertyInfo['order'];
         if ($propertyInfo['type'] == 'location') {
             $locationPrefix = $propertyInfo['id'];
         }
     }
     $sortArray = SJB_HelperFunctions::array_sort($sortArray);
     foreach ($sortArray as $index => $value) {
         $sortedDetailsInfo[$index] = $detailsInfo[$index];
     }
     foreach ($sortedDetailsInfo as $detailInfo) {
         $detailInfo['value'] = '';
         $accountID = SJB_Request::getVar('account_id', false);
         if (isset($info[$detailInfo['id']])) {
             $detailInfo['value'] = $info[$detailInfo['id']];
         } elseif ($detailInfo['id'] == 'hash_tags') {
             $detailInfo['value'] = '#Jobs';
         } elseif ($detailInfo['id'] == 'post_template') {
             $detailInfo['value'] = '{$user.CompanyName}: {$listing.Title} ({$listing.' . $locationPrefix . '.City}, {$listing.' . $locationPrefix . '.State})';
         } elseif (isset($accountID) && $detailInfo['id'] == 'account_id') {
             $detailInfo['value'] = $accountID;
         }
         $this->properties[$detailInfo['id']] = new SJB_ObjectProperty($detailInfo);
     }
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:33,代码来源:FacebookSocialDetails.php

示例2: __construct

 /**
  * @param array $info
  * @param bool $isGroupsExist
  * @param bool $isAuthorized
  */
 function __construct($info = array(), $isGroupsExist = false, $isAuthorized = false)
 {
     $this->commonFields = parent::getCommonFields();
     $this->postingFields = self::getPostingFields();
     $this->systemFields = self::getSystemFields($isGroupsExist, $isAuthorized);
     $detailsInfo = self::getDetails($this->commonFields, $isGroupsExist, $isAuthorized);
     $locationPrefix = '';
     foreach ($detailsInfo as $index => $propertyInfo) {
         $sortArray[$index] = $propertyInfo['order'];
         if ($propertyInfo['type'] == 'location') {
             $locationPrefix = $propertyInfo['id'];
         }
     }
     $sortArray = SJB_HelperFunctions::array_sort($sortArray);
     foreach ($sortArray as $index => $value) {
         $sortedDetailsInfo[$index] = $detailsInfo[$index];
     }
     foreach ($sortedDetailsInfo as $detailInfo) {
         $detailInfo['value'] = '';
         if (isset($info[$detailInfo['id']])) {
             $detailInfo['value'] = $info[$detailInfo['id']];
         } elseif ($detailInfo['id'] == 'post_template') {
             $detailInfo['value'] = '{$user.CompanyName}: {$listing.Title} ({$listing.' . $locationPrefix . '.City}, {$listing.' . $locationPrefix . '.State})';
         }
         $this->properties[$detailInfo['id']] = new SJB_ObjectProperty($detailInfo);
     }
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:32,代码来源:LinkedInSocialDetails.php

示例3: __construct

 function __construct($productInfo = array())
 {
     $details_info = $this->getDetails();
     foreach ($details_info as $index => $property_info) {
         $sort_array[$index] = $property_info['order'];
     }
     $sort_array = SJB_HelperFunctions::array_sort($sort_array);
     foreach ($sort_array as $index => $value) {
         $sorted_details_info[$index] = $details_info[$index];
     }
     foreach ($sorted_details_info as $detail_info) {
         $detail_info['value'] = '';
         if (isset($productInfo[$detail_info['id']])) {
             $detail_info['value'] = $productInfo[$detail_info['id']];
         }
         $this->properties[$detail_info['id']] = new SJB_ObjectProperty($detail_info);
     }
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:18,代码来源:ProductDetails.php

示例4: SJB_PostingPagesDetails

 function SJB_PostingPagesDetails($page_info, $listing_type_sid)
 {
     $details_info = self::getDetails($listing_type_sid);
     foreach ($details_info as $index => $property_info) {
         $sort_array[$index] = $property_info['order'];
     }
     $sort_array = SJB_HelperFunctions::array_sort($sort_array);
     foreach ($sort_array as $index => $value) {
         $sorted_details_info[$index] = $details_info[$index];
     }
     foreach ($sorted_details_info as $detail_info) {
         $detail_info['value'] = '';
         if (isset($page_info[$detail_info['id']])) {
             $detail_info['value'] = $page_info[$detail_info['id']];
         }
         $this->properties[$detail_info['id']] = new SJB_ObjectProperty($detail_info);
     }
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:18,代码来源:PostingPagesDetails.php

示例5: __construct

 public function __construct($listing_field_info, $pages_list = array())
 {
     $details_info = self::getDetails($listing_field_info, $pages_list);
     $sort_array = array();
     foreach ($details_info as $index => $property_info) {
         $sort_array[$index] = isset($property_info['order']) ? $property_info['order'] : 1000;
     }
     $sort_array = SJB_HelperFunctions::array_sort($sort_array);
     foreach ($sort_array as $index => $value) {
         $sorted_details_info[$index] = $details_info[$index];
     }
     foreach ($sorted_details_info as $detail_info) {
         if (isset($listing_field_info[$detail_info['id']])) {
             $detail_info['value'] = $listing_field_info[$detail_info['id']];
         } else {
             $detail_info['value'] = isset($detail_info['value']) ? $detail_info['value'] : '';
         }
         $this->properties[$detail_info['id']] = new SJB_ObjectProperty($detail_info);
     }
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:20,代码来源:ListingFieldDetails.php

示例6: __construct

 public function __construct($articleInfo)
 {
     $detailsInfo = self::getDetails();
     //SORT BY ORDER
     $sortArray = array();
     foreach ($detailsInfo as $index => $propertyInfo) {
         $sortArray[$index] = $propertyInfo['order'];
     }
     $sortArray = SJB_HelperFunctions::array_sort($sortArray);
     $sortedDetailsInfo = array();
     foreach ($sortArray as $index => $value) {
         $sortedDetailsInfo[$index] = $detailsInfo[$index];
     }
     foreach ($sortedDetailsInfo as $detailInfo) {
         $detailInfo['value'] = '';
         if (isset($articleInfo[$detailInfo['id']])) {
             $detailInfo['value'] = $articleInfo[$detailInfo['id']];
         }
         $this->properties[$detailInfo['id']] = new SJB_ObjectProperty($detailInfo);
     }
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:21,代码来源:NewsArticleDetails.php

示例7: array_sort_reverse

 public static function array_sort_reverse($array)
 {
     $sorted_array = SJB_HelperFunctions::array_sort($array);
     return array_reverse($sorted_array, true);
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:5,代码来源:HelperFunctions.php

示例8: SJB_CaptchaDetails

 function SJB_CaptchaDetails($info, $type = false)
 {
     $details_info = self::getDetails($type);
     foreach ($details_info as $index => $property_info) {
         $sort_array[$index] = $property_info['order'];
     }
     $sort_array = SJB_HelperFunctions::array_sort($sort_array);
     $sorted_details_info = array();
     foreach ($sort_array as $index => $value) {
         $sorted_details_info[$index] = $details_info[$index];
     }
     foreach ($sorted_details_info as $detail_info) {
         $detail_info['value'] = '';
         if (isset($info[$detail_info['id']])) {
             $detail_info['value'] = $info[$detail_info['id']];
         }
         $this->properties[$detail_info['id']] = new SJB_ObjectProperty($detail_info);
     }
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:19,代码来源:Captcha.php

示例9: SJB_ComplexDetails

 function SJB_ComplexDetails($details_info, $fields_info = array())
 {
     $sort_array = array();
     $sorted_details_info = array();
     foreach ($details_info as $index => $property_info) {
         $sort_array[$index] = $property_info['order'];
     }
     $sort_array = SJB_HelperFunctions::array_sort($sort_array);
     foreach ($sort_array as $index => $value) {
         $sorted_details_info[$index] = $details_info[$index];
     }
     foreach ($sorted_details_info as $detail_info) {
         $detail_info['value'] = null;
         if (isset($fields_info[$detail_info['id']])) {
             $detail_info['value'] = $fields_info[$detail_info['id']];
         }
         $this->properties[$detail_info['id']] = new SJB_ObjectProperty($detail_info);
     }
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:19,代码来源:ComplexType.php


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