alef-backend-php 0.16.21

PHP (ext-php-rs) backend for alef
Documentation
1
2
3
4
5
{% if is_optional %}
let {{ php_name }}_core: Option<Vec<_>> = {{ php_name }}.map(|strs| strs.into_iter().map(|s| serde_json::from_str::<_>(&s).map_err(|e| ext_php_rs::exception::PhpException::default(e.to_string()))).collect::<Result<Vec<_>, _>>()).transpose()?;
{% else %}
let {{ php_name }}_core: Vec<_> = {{ php_name }}.into_iter().map(|s| serde_json::from_str::<_>(&s).map_err(|e| ext_php_rs::exception::PhpException::default(e.to_string()))).collect::<Result<Vec<_>, _>>()?;
{% endif %}