示例#1
0
 /**
  * Sets a field from the object by name passed in as a string.
  *
  * @param  string $name
  * @param  mixed  $value field value
  * @param  string $type The type of fieldname the $name is of:
  *                one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
  *                TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                Defaults to TableMap::TYPE_PHPNAME.
  * @return $this|\Project
  */
 public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
 {
     $pos = ProjectTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
     return $this->setByPosition($pos, $value);
 }