protected function fromArray($source)
    {
        $data = array();
        $columnNames = $this->getColumnNames();

        foreach ($source as $key => $value) {

            if (in_array($key, $columnNames)) {

                if (is_string($value)) {
                    $value = ($value);
                }

                $data[$key] = $value;
            }
        }

        return $data;
    }
protected function fromArray($source)
    {
        $data = array();
        $columnNames = $this->getColumnNames();

        foreach ($source as $key => $value) {

            if (in_array($key, $columnNames)) {

                if (is_string($value)) {
                    $value = ($value);
                }

                $data[$key] = $value;
            }
        }

        return $data;
    }
protected function fromArray ( $ source ) { $ data = array ( ) ; $ columnNames = $ this -> getColumnNames ( ) ; foreach ( $ source as $ key => $ value ) { if ( in_array ( $ key , $ columnNames ) ) { if ( is_string ( $ value ) ) { $ value = ( $ value ) ; } $ data [ $ key ] = $ value ; } } return $ data ; }
Mapeia os dados recebidos de um array nos campos existentes na tabela.

@param array $source

@return array
Mapeia os dados recebidos de um array nos campos existentes na tabela .