Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4131 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 4131 Rev 5319
Línea 109... Línea 109...
109
        return $this->executeFetchAllObject($select, $prototype);
109
        return $this->executeFetchAllObject($select, $prototype);
110
    }
110
    }
Línea 111... Línea 111...
111
    
111
    
-
 
112
    
-
 
113
    /**
-
 
114
     *
-
 
115
     * @param int $user_id
-
 
116
     
-
 
117
     * @return ChatUser[]
-
 
118
     */
-
 
119
    public function fetchAllByUserIdOnlyOpen($user_id)
-
 
120
    {
-
 
121
        $select = $this->sql->select(self::_TABLE);
-
 
122
        $select->where->nest()
-
 
123
            ->equalTo('user_id1', $user_id)
-
 
124
            ->and->equalTo('user_open1', ChatUser::OPEN_YES)
-
 
125
        ->unnest()->or->nest()
-
 
126
            ->equalTo('user_id2', $user_id)
-
 
127
            ->and->equalTo('user_open2', ChatUser::OPEN_YES)
-
 
128
        ->unnest();
-
 
129
        
-
 
130
        //echo $select->getSqlString($this->adapter->platform); exit;
-
 
131
        
-
 
132
        $prototype = new ChatUser();
-
 
133
        return $this->executeFetchAllObject($select, $prototype);
-
 
134
    }
-
 
135
    
112
    
136
    
113
    /**
137
    /**
114
     * 
138
     * 
115
     * @param ChatUser $chatUser
139
     * @param ChatUser $chatUser
116
     * @return boolean
140
     * @return boolean