in src/FacebookAds/ApiRequest.php [73:99]
public function addParam($param, $value) {
$extracted_value = $this->extractValue($value);
if (!ApiConfig::TYPE_CHECKER_STRICT_MODE
|| !$this->param_checker->isValidParam($param)
) {
if ($this->param_checker->isFileParam($param)) {
$this->file_params[$param] = $extracted_value;
} else {
$this->params[$param] = $extracted_value;
}
} else {
if ($this->param_checker->isValidParamPair($param, $value)) {
if ($this->param_checker->isFileParam($param)) {
$this->file_params[$param] = $extracted_value;
} else {
$this->params[$param] = $extracted_value;
}
} elseif ($this->param_checker->isPrimitiveType($param)) {
$param_type = $this->param_checker->getType($param);
$this->params[$param] = $this->param_checker->convertStringToPrimType(
$param_type, $value);
} else {
throw new \LogicException('The value for '.$param.' is not compatible');
}
}
return $this;
}