Making it possible to specify custom code and always adding using bhl directive to generated code
Publish PHP Package / docker (push) Successful in 7s Details

This commit is contained in:
Pavel Shevaev 2024-10-18 11:21:08 +03:00
parent 924684d4a4
commit e93012dbfd
2 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,8 @@ function codegen(
$options['register_class'] = 'BHL_AutoBindings';
if(!isset($options['namespace']))
$options['namespace'] = 'bhl';
if(!isset($options['custom_code']))
$options['custom_code'] = '';
if(isset($options['plugins']))
{

View File

@ -3,12 +3,15 @@
using System;
using System.Collections;
using System.Collections.Generic;
using bhl;
#if !BHL_FRONT
{%- for imp in imports ~%}
using {{imp}};
{%- endfor ~%}
#endif
{{custom_code}}
{% import "bhl_bind_macro.twig" as macro %}
namespace {{namespace}} {