File modules/cms/generator/dsl/DslConsole.class.php
Last commit: Mon Jun 27 00:40:42 2022 +0200 Jan Dankert New: Marker interface 'Scriptable', Proxy class for MQTT, help() method in Scripts.
1 <?php 2 3 namespace cms\generator\dsl; 4 5 use dsl\context\BaseScriptableObject; 6 use logger\Logger; 7 8 /** 9 * Logging. 10 * 11 * Wraps around the internal CMS logging. 12 * 13 * @package cms\generator\dsl 14 */ 15 class DslConsole extends BaseScriptableObject 16 { 17 18 public function log( $text ) 19 { 20 Logger::info( $text ); 21 } 22 public function debug( $text ) 23 { 24 Logger::debug( $text ); 25 } 26 public function trace( $text ) 27 { 28 Logger::trace( $text ); 29 } 30 public function info( $text ) 31 { 32 Logger::info( $text ); 33 } 34 public function warn( $text ) 35 { 36 Logger::warn( $text ); 37 } 38 public function error( $text ) 39 { 40 Logger::error( $text ); 41 } 42 }
Downloadmodules/cms/generator/dsl/DslConsole.class.php
History Mon, 27 Jun 2022 00:40:42 +0200 Jan Dankert New: Marker interface 'Scriptable', Proxy class for MQTT, help() method in Scripts. Sun, 5 Jun 2022 22:14:24 +0200 Jan Dankert Some fixups: New Icons; better support classes for DSL. Tue, 31 May 2022 00:32:27 +0200 Jan Dankert New: More context objects for the DSL Wed, 25 May 2022 22:47:17 +0200 Jan Dankert New: DSL (domain specific language) for code elements. The old way with PHP code ist not sandboxed and unsecure. This approach is a minimalistic, javascript-like, scripting engine. For now only simple function calls are possible, for example: alert("example");