Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 2581 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 2581 Rev 3838
Línea 48... Línea 48...
48
        if(self::$_instance == null) {
48
        if(self::$_instance == null) {
49
            self::$_instance = new DeviceMapper($adapter);
49
            self::$_instance = new DeviceMapper($adapter);
50
        }
50
        }
51
        return self::$_instance;
51
        return self::$_instance;
52
    }
52
    }
-
 
53
    
-
 
54
    /**
-
 
55
     *
-
 
56
     * @param int $user_idid
-
 
57
     * @return Device
-
 
58
     */
-
 
59
    public function fetchOneByUserId($user_id)
-
 
60
    {
-
 
61
        $select = $this->sql->select(self::_TABLE);
-
 
62
        $select->where->equalTo('user_id', $user_id);
-
 
63
        $select->limit(1);
-
 
64
        
-
 
65
        $prototype = new Device();
-
 
66
        return $this->executeFetchOneObject($select, $prototype);
-
 
67
    }
Línea 53... Línea 68...
53
 
68
 
54
   
69
   
55
    /**
70
    /**
Línea 155... Línea 170...
155
        $select->where->equalTo('user_id', $user_id);
170
        $select->where->equalTo('user_id', $user_id);
Línea 156... Línea 171...
156
        
171
        
157
        return $this->executeFetchAllObject($select, $prototype);
172
        return $this->executeFetchAllObject($select, $prototype);
Línea -... Línea 173...
-
 
173
    }
-
 
174
    
-
 
175
    
-
 
176
    
-
 
177
    /**
-
 
178
     *
-
 
179
     * @param [] $user_id
-
 
180
     * @return Device[]
-
 
181
     */
-
 
182
    public function fetchAllByUserIds($user_ids)
-
 
183
    {
-
 
184
        $prototype = new Device();
-
 
185
        $select = $this->sql->select(self::_TABLE);
-
 
186
        $select->where->ein('user_id', $user_ids);
-
 
187
        
-
 
188
        return $this->executeFetchAllObject($select, $prototype);
158
    }
189
    }
159
    
190
    
160
    /**
191
    /**
161
     * 
192
     * 
162
     * @param Device $device
193
     * @param Device $device