build() public method

Get a new entity object, set given data on it
public build ( array $data ) : object
$data array array of key/values to set on new Entity instance
return object Instance of $entityClass with $data set on it
 /**
  * Insert one new record using the Entity class.
  *
  * @param $insertedEntities
  * @return string
  */
 public function execute($insertedEntities)
 {
     $obj = $this->mapper->build([]);
     $this->fillColumns($obj, $insertedEntities);
     $this->callMethods($obj, $insertedEntities);
     $this->mapper->insert($obj);
     return $obj;
 }