Browse files

config

  • Loading branch information...
1 parent 197b685 commit a07242bb343cf2470c27d95253ce46f2436f6f28 @vovazolotoy vovazolotoy committed Aug 2, 2011
Showing with 91 additions and 1 deletion.
  1. +46 −1 johana.js
  2. +45 −0 system/prototypes/johana/autoload.js
View
47 johana.js
@@ -38,7 +38,52 @@ require(SYSPATH + 'prototypes/johana/autoload');
// Bootstrap the application
require(APPPATH + 'bootstrap');
-Johana.conf.attach(new ConfigFile());
+Johana.conf.attach(new JohanaConfigFile());
+//console.log(new ConfigFile());
console.log(Johana.config('vova'));
+
+
+//console.log(new ConfigFile());
+//console.log(Johana.config('vova'));
+function parent()
+{
+// this.name = 'parent';
+// this.log = function()
+// {
+// console.log('parent log');
+// };
+};
+parent.prototype.parentProp = 'parent prop';
+parent.prototype.log = function()
+{
+ console.log('parent log');
+};
+
+function child()
+{
+ console.log(this);
+// this.log = function()
+// {
+// this.super_.log();
+//
+// console.log('child log');
+// };
+// this.name = 'child';
+};
+require('util').inherits(child, parent);
+
+
+child.prototype.log = function()
+{
+ console.log('child log', child.super_.log());
+};
+
+
+
+console.log(parent, child.super_);
+new parent().log();
+new child().log();
+
+
View
45 system/prototypes/johana/autoload.js
@@ -0,0 +1,45 @@
+
+// Load native node's modules to global
+buffer = require('buffer'),
+querystring = require('querystring'),
+http = require('http'),
+net = require('net'),
+freelist = require('freelist'),
+vm = require('vm'),
+util = require('util'),
+assert = require('assert'),
+module = require('module'),
+_debugger = require('_debugger'),
+tty_win32 = require('tty_win32'),
+fs = require('fs'),
+os = require('os'),
+dns = require('dns'),
+events = require('events'),
+url = require('url'),
+tls = require('tls'),
+tty_posix = require('tty_posix'),
+crypto = require('crypto'),
+sys = require('sys'),
+https = require('https'),
+stream = require('stream'),
+readline = require('readline'),
+_linklist = require('_linklist'),
+tty = require('tty'),
+child_process = require('child_process'),
+repl = require('repl'),
+path = require('path'),
+string_decoder = require('string_decoder'),
+timers = require('timers'),
+constants = require('constants');
+
+Johana.autoLoad('Route');
+Johana.autoLoad('Profiler');
+Johana.autoLoad('Request');
+Johana.autoLoad('View');
+Johana.autoLoad('JohanaConfigReader');
+Johana.autoLoad('ConfigReader');
+Johana.autoLoad('JohanaConfigFile');
+Johana.autoLoad('ConfigFile');
+Johana.autoLoad('JohanaConfig');
+Johana.autoLoad('Config');
+Johana.autoLoad('ControllerAuth');

0 comments on commit a07242b

Please sign in to comment.