src/Database/Model.php
public function insert()
    {
        if (\count($this->dirty) === 0) {
            return true;
        }

        $this->defaultTable();
        $this->sql['VALUES'] = $this->dirty;

        if ($return = DB::insert($this->sql)) {
            $this->__set($this->primary, $return);

            return $this->dirty()->reset();
        }

        return false;
    }
public function insert()
    {
        if (\count($this->dirty) === 0) {
            return true;
        }

        $this->defaultTable();
        $this->sql['VALUES'] = $this->dirty;

        if ($return = DB::insert($this->sql)) {
            $this->__set($this->primary, $return);

            return $this->dirty()->reset();
        }

        return false;
    }
public function insert ( ) { if ( \ count ( $ this -> dirty ) === 0 ) { return true ; } $ this -> defaultTable ( ) ; $ this -> sql [ 'VALUES' ] = $ this -> dirty ; if ( $ return = DB :: insert ( $ this -> sql ) ) { $ this -> __set ( $ this -> primary , $ return ) ; return $ this -> dirty ( ) -> reset ( ) ; } return false ; }
function to build insert SQL, and insert current record into database.

@return bool|self if insert success return current object, other wise return false.
function to build insert SQL and insert current record into database .