viewClassFormat

The format for view classes when using stand-alone.

static if(!(isWebServer))
enum viewClassFormat = q{ final class view_%s : View { import std.array : replace, split, array, join, split; import std.algorithm : map, filter, countUntil, count, canFind, startsWith, endsWith, splitter; import std..string : strip, stripLeft, stripRight, indexOf, lastIndexOf, isNumeric, format; import std.datetime : Date, DateTime, SysTime, Clock, Month, DayOfWeek; import std.conv : to; import diamond.errors.exceptions; import diamond.core.meta; import models; public: final: // viewClassMembers %s this(string name) { super(name); // viewConstructor %s } // modelGenerate %s override string generate(string sectionName = "") { try { // placeholders %s switch (sectionName) { // view code %s } // end %s } catch (Exception e) { throw new ViewException(super.name, e); } catch (Throwable t) { throw new ViewError(super.name, t); } } } };

Meta