Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorraiho
     
    Does exist a method more optimized than that?
    It works for a few of records but not for a lot of records!!! :( I need to import 4000 records ...

    private function importLDIF($file, $idAbook){
    $rows = $this->LDIFParser( $file );

    foreach($rows as $row){
    $contact['addressbook_id'] = $idAbook;

    foreach($row as $k=>$v){
    switch($k){
    case 'givenName': $contact['nome'] = $v; break;
    case 'sn': $contact['cognome'] = $v; break
    ......
    }
    }

    $this->Contact->newRecord($contact);
    $this->Contact->save();
    }
    }