Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 1 Rev 167
Línea 78... Línea 78...
78
    
78
    
79
    
79
    
80
    /**
80
    /**
-
 
81
     *
81
     *
82
     * @param String $uuid
82
     * @param String $uuid
83
     * @param int $company_id
83
     * @return DiscoveryContact
84
     * @return DiscoveryContact
84
     */
85
     */
Línea 85... Línea 86...
85
    public function fetchOneByCorporateEmail($corporate_email)
86
    public function fetchOneByCorporateEmailAndCompanyId($corporate_email, $company_id)
86
    {
87
    {
-
 
88
        
Línea 87... Línea 89...
87
        
89
        $select = $this->sql->select(self::_TABLE);
88
        $select = $this->sql->select(self::_TABLE);
90
        $select->where->equalTo('corporate_email', $corporate_email);
89
        $select->where->equalTo('corporate_email', $corporate_email);
91
        $select->where->equalTo('company_id', $company_id);
Línea 90... Línea 92...
90
        
92
        
91
        $prototype = new DiscoveryContact();
93
        $prototype = new DiscoveryContact();
-
 
94
        return $this->executeFetchOneObject($select, $prototype);
-
 
95
    }
-
 
96
    
-
 
97
    
-
 
98
    /**
-
 
99
     *
-
 
100
     * @param int $company_id
-
 
101
     * @param string $search
-
 
102
     * @return  DiscoveryContact[]
-
 
103
     */
-
 
104
    public function fetchAllByCompanyIdAndSearchCorporateEmail($company_id, $search)
-
 
105
    {
-
 
106
        $select = $this->sql->select();
-
 
107
        $select->from(self::_TABLE);
-
 
108
        $select->where->equalTo('company_id', $company_id);
-
 
109
        $select->where->like('corporate_email', '%' . corporate_email . '%');
-
 
110
        $select->order('first_name, last_name');
-
 
111
        
-
 
112
        
-
 
113
        $prototype = new DiscoveryContact();
92
        return $this->executeFetchOneObject($select, $prototype);
114
        
93
    }
115
        return $this->executeFetchAllObject($select, $prototype);
94
    
116
    }
95
    
117
    
96
    /**
118
    /**