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
Publish PHP Package / docker (push) Successful in 7s
Details
This commit is contained in:
parent
924684d4a4
commit
e93012dbfd
|
@ -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']))
|
||||
{
|
||||
|
|
|
@ -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}} {
|
||||
|
|
Loading…
Reference in New Issue