viewClassFormat

The format for view classes when using stand-alone.

  1. enum viewClassFormat;
  2. enum viewClassFormat;
    static if(!isWebApi)
    static if(!(isWebServer))
    enum viewClassFormat = q{ final class view_%s : View { import std.array : replace, split, array; import std.algorithm : filter, countUntil, count, canFind; import std..string : strip, indexOf, lastIndexOf, isNumeric; import std.datetime : Date, DateTime, SysTime, Clock, Month, DayOfWeek; import std.conv : to; import diamond.errors.exceptions; 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