示例#1
0
 /**
  * save suggest, param $group has 2  values for the moment (ProjectTag,MemberTag)
  * @author EL GUENNUNI Sohaib s.elguennuni@gmail.com
  * @param [array,$array,string,$group] 
  * @return []
  */
 public function Add_Suggest(&$array_member, $array, $key, $group)
 {
     $suggest = new MemberSuggestions();
     $array = App_Utilities::convert_toArray($array, $key);
     App_Utilities::Concat_Result($array_member, $array);
     $array_member['limit'] -= count($array['item_id']);
     switch ($group) {
         case 'ProjectTag':
             $suggest->saveSuggest($array_member, $this->_group_project);
             break;
         case 'MemberTag':
             $suggest->saveSuggest($array_member, $this->_group_profil);
             break;
     }
 }
示例#2
0
 /**
  * @author : ELGUENNUNI Sohaib, s.elguennuni@gmail.com
  * @return type 
  */
 public function getPostsAllNetwork($idMember, $iswhere = false, $last_timeCreate = 0)
 {
     $numberPost = $this->_config->value->max_post;
     //$numberPostPertinent = $this->_config->value->max_post_pertinent;
     $postPertinent = $this->getLastPostHasMyTags($idMember, $iswhere, $last_timeCreate);
     $arrayIDPost = App_Utilities::convert_toArray($postPertinent, 'wall_post_id');
     $arrayPost = !empty($arrayIDPost['item_id']) ? $arrayIDPost : array('item_id' => array(0));
     $numberPostNormal = $numberPost - count($postPertinent);
     $postNormal = $this->getLastPost($numberPostNormal, $arrayPost, $iswhere, $last_timeCreate);
     $arrPosts = $postPertinent->toArray() + $postNormal->toArray();
     $arrPostSorted = App_Utilities::aasort($arrPosts, 'time_create', 'DESC');
     return $arrPostSorted;
 }
示例#3
0
 /**
  * @author : ELGUENNUNI Sohaib, s.elguennuni@gmail.com
  * @param array $array_member
  * @param type $array
  * @param type $key 
  */
 public static function Convert_and_Concat(&$array_member, $array, $key)
 {
     $array = App_Utilities::convert_toArray($array, $key);
     App_Utilities::Concat_Result($array_member, $array);
     $array_member['limit'] -= count($array['item_id']);
     //        var_dump($array_member);
 }