alias && $this->alias !== $this->expr) { throw new \API_Exception("Aliasing field names is not allowed, only expressions can have an alias."); } $this->fields[] = $this->expr; } public function render(array $fieldList): string { if (!isset($fieldList[$this->expr])) { throw new \API_Exception("Invalid field '{$this->expr}'"); } if ($fieldList[$this->expr] === FALSE) { throw new UnauthorizedException("Unauthorized field '{$this->expr}'"); } return $fieldList[$this->expr]['sql_name']; } }