Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 192 Rev 283
Línea 259... Línea 259...
259
    {
259
    {
260
        $hydrator = new ObjectPropertyHydrator();
260
        $hydrator = new ObjectPropertyHydrator();
261
        $values = $hydrator->extract($feed);
261
        $values = $hydrator->extract($feed);
262
        $values = $this->removeEmpty($values);
262
        $values = $this->removeEmpty($values);
Línea -... Línea 263...
-
 
263
        
-
 
264
        if(empty($values['publish_on'])) {
-
 
265
            $values['publish_on'] = new Expression('CURRENT_DATE()');
-
 
266
        }
263
        
267
        
264
        $update = $this->sql->update(self::_TABLE);
268
        $update = $this->sql->update(self::_TABLE);
265
        $update->set($values);
269
        $update->set($values);
Línea 279... Línea 283...
279
    {
283
    {
280
        $hydrator = new ObjectPropertyHydrator();
284
        $hydrator = new ObjectPropertyHydrator();
281
        $values = $hydrator->extract($feed);
285
        $values = $hydrator->extract($feed);
282
        $values = $this->removeEmpty($values);
286
        $values = $this->removeEmpty($values);
Línea -... Línea 287...
-
 
287
        
-
 
288
        if(empty($values['publish_on'])) {
-
 
289
            $values['publish_on'] = new Expression('CURRENT_DATE()');
-
 
290
        }
283
        
291
        
284
        $insert = $this->sql->insert(self::_TABLE);
292
        $insert = $this->sql->insert(self::_TABLE);
285
        $insert->values($values);
293
        $insert->values($values);
Línea 286... Línea 294...
286
        //echo $insert->getSqlString($this->adapter->platform); exit;
294
        //echo $insert->getSqlString($this->adapter->platform); exit;
Línea 412... Línea 420...
412
        $select->where->equalTo('id', $id);
420
        $select->where->equalTo('id', $id);
Línea 413... Línea 421...
413
        
421
        
414
        $record = $this->executeFetchOneArray($select);
422
        $record = $this->executeFetchOneArray($select);
415
        return $record['total_external_shared'];
423
        return $record['total_external_shared'];
-
 
424
    }
-
 
425
    
-
 
426
    /**
-
 
427
     * 
-
 
428
     * @return Feed[]
-
 
429
     */
-
 
430
    public function fetchAll()
-
 
431
    {
-
 
432
        $select = $this->sql->select(self::_TABLE);
-
 
433
        
-
 
434
        $prototype = new Feed();
-
 
435
        return $this->executeFetchAllObject($select, $prototype);
Línea 416... Línea 436...
416
    }
436
    }
417
 
437