public static function add(Entry $entry)
    {
        $fields = $entry->get();
        Symphony::Database()->insert($fields, 'tbl_entries');

        if (!$entry_id = Symphony::Database()->getInsertID()) {
            return false;
        }

        // Iterate over all data for this entry
        foreach ($entry->getData() as $field_id => $field) {
            // Write data
            static::saveFieldData($entry_id, $field_id, $field);
        }

        $entry->set('id', $entry_id);

        return true;
    }
public static function add(Entry $entry)
    {
        $fields = $entry->get();
        Symphony::Database()->insert($fields, 'tbl_entries');

        if (!$entry_id = Symphony::Database()->getInsertID()) {
            return false;
        }

        // Iterate over all data for this entry
        foreach ($entry->getData() as $field_id => $field) {
            // Write data
            static::saveFieldData($entry_id, $field_id, $field);
        }

        $entry->set('id', $entry_id);

        return true;
    }
public static function add ( Entry $ entry ) { $ fields = $ entry -> get ( ) ; Symphony :: Database ( ) -> insert ( $ fields , 'tbl_entries' ) ; if ( ! $ entry_id = Symphony :: Database ( ) -> getInsertID ( ) ) { return false ; } // Iterate over all data for this entry foreach ( $ entry -> getData ( ) as $ field_id => $ field ) { // Write data static :: saveFieldData ( $ entry_id , $ field_id , $ field ) ; } $ entry -> set ( 'id' , $ entry_id ) ; return true ; }
Given an Entry object, iterate over all of the fields in that object
an insert them into their relevant entry tables.

@see EntryManager::saveFieldData()
@param Entry $entry
An Entry object to insert into the database
@throws DatabaseException
@return boolean
Given an Entry object iterate over all of the fields in that object an insert them into their relevant entry tables .