Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 710 Rev 720
Línea 112... Línea 112...
112
    }
112
    }
Línea 113... Línea 113...
113
    
113
    
114
    
114
    
115
    /**
115
    /**
116
     * 
116
     * 
117
     * @param RecruitmentSelectionCandidate $form
117
     * @param RecruitmentSelectionCandidate $candidate
118
     * @return boolean
118
     * @return boolean
119
     */
119
     */
120
    public function insert($form)
120
    public function insert($candidate)
121
    {
121
    {
122
        $hydrator = new ObjectPropertyHydrator();
122
        $hydrator = new ObjectPropertyHydrator();
Línea 123... Línea 123...
123
        $values = $hydrator->extract($form);
123
        $values = $hydrator->extract($candidate);
124
        $values = $this->removeEmpty($values);
124
        $values = $this->removeEmpty($values);
Línea 125... Línea 125...
125
        
125
        
126
        $insert = $this->sql->insert(self::_TABLE);
126
        $insert = $this->sql->insert(self::_TABLE);
127
        $insert->values($values);
127
        $insert->values($values);
128
 
128
 
129
        $result = $this->executeInsert($insert);
129
        $result = $this->executeInsert($insert);
130
        if($result) {
130
        if($result) {
Línea 131... Línea 131...
131
            $form->id = $this->lastInsertId;
131
            $candidate->id = $this->lastInsertId;
132
        }
132
        }
133
        return $result;
133
        return $result;
134
    }
134
    }
135
    
135
    
136
    /**
136
    /**
137
     *
137
     *
138
     * @param RecruitmentSelectionCandidate $form
138
     * @param RecruitmentSelectionCandidate $candidate
139
     * @return boolean
139
     * @return boolean
140
     */
140
     */
Línea 141... Línea 141...
141
    public function update($form)
141
    public function update($candidate)
142
    {
142
    {
143
        $hydrator = new ObjectPropertyHydrator();
143
        $hydrator = new ObjectPropertyHydrator();
Línea 144... Línea 144...
144
        $values = $hydrator->extract($form);
144
        $values = $hydrator->extract($candidate);
145
        $values = $this->removeEmpty($values);
145
        $values = $this->removeEmpty($values);
Línea 146... Línea 146...
146
        
146