Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1323 Rev 2503
Línea 156... Línea 156...
156
        
156
        
157
        return $this->executeFetchAllObject($select, $prototype);
157
        return $this->executeFetchAllObject($select, $prototype);
Línea 158... Línea 158...
158
    }
158
    }
-
 
159
    
-
 
160
    /**
-
 
161
     * 
-
 
162
     * @param Device $device
-
 
163
     * @return boolean
-
 
164
     */
-
 
165
    public function releaseUserFormDevice($device)
-
 
166
    {
-
 
167
 
-
 
168
        
-
 
169
        $update = $this->sql->update(self::_TABLE);
-
 
170
        $update->set([
-
 
171
            'user_id' => 'null'
-
 
172
        ]);
-
 
173
        $update->where->equalTo('id', $device->id);
-
 
174
        
-
 
175
        return $this->executeUpdate($update);
-
 
176
    }
-
 
177
    
-
 
178
    /**
-
 
179
     *
-
 
180
     * @param int $user_id
-
 
181
     * @return Device[]
-
 
182
     */
-
 
183
    public function fetchAllByUserIdAndApplicationId($user_id, $application_id)
-
 
184
    {
-
 
185
        $prototype = new Device();
-
 
186
        $select = $this->sql->select(self::_TABLE);
-
 
187
        $select->where->equalTo('user_id', $user_id);
-
 
188
        $select->where->equalTo('application_id', $application_id);
-
 
189
        
-
 
190
        return $this->executeFetchAllObject($select, $prototype);
-
 
191
    }
159
    
192
    
160
    /**
193
    /**
161
     *
194
     *
162
     * @param Device $device
195
     * @param Device $device
163
     * @return boolean
196
     * @return boolean