@constructor

@param {Object} options - Options object
436052
function(options)
{
    // Mark bootup time end
    this.bootStart = new Date();

    // Annotate this
    greppy.worker = this;
    greppy.db     = new (greppy.get('store.db'))(
        greppy.config.get('app').get('database')
    );

    // Default properties
    this.controllerLoader = new ControllerLoader(this);
    this.options          = options || {};
    this.modules          = {};

    // Setup process title
    process.title = this.options.title || 'greppy-worker';

    // Configure CLI arguments
    this.configureCliArguments();

    // Annotate the worker context
    greppy.context = this.cliArgs.options.context;

    // Configure the logger
    this.configureLogger();

    greppy.logger = global.logger = this.logger;

    // Configure context
    this.configureContext();
}
410969
function(opt){
        // merge with default options
        Object.keys(_options).forEach(function(key){
            _options[key] = opt[key] || _options[key];
        });
    }
571484
function(options) {
      inputEx.SerializeField.superclass.setOptions.call(this, options);
   	this.options.className = options.className || 'inputEx-SerializedField';

		this.options.subfield = options.subfield || {type: 'string'};
		this.options.serializer = options.serializer || "json";
	}
1331971
function(options) {
        for (var name in options) {
            if (options.hasOwnProperty(name)) {
                this.setOption(name, options[name]);
            }
        }
        return this;
    }
266977
function IteratorOptions(options) {
  this.keys = true;
  this.values = true;
  this.start = null;
  this.end = null;
  this.gt = false;
  this.lt = false;
  this.keyAsBuffer = true;
  this.valueAsBuffer = true;
  this.reverse = false;
  this.limit = -1;

  if (options)
    this.fromOptions(options);
}
879725
function UI(options) {
  if (!(this instanceof UI)) {
    var ui = Object.create(UI.prototype);
    UI.apply(ui, arguments);
    return ui;
  }
  debug('initializing from <%s>', __filename);
  this.options = utils.createOptions(options);
  this.appendedLines = 0;
  this.height = 0;
  this.initInterface();
}
222231
function (rules, options) {
    this.rules = new Config(rules, options);
    this.parser = new Parser();
    this.inlineConfig = new InlineConfig(this.rules);
}
332297
function init(options) {
  var debug = require('../debug').spawn('init');

  function sourceMapInit(file, encoding, callback) {
    // pass through if file is null or already has a source map
    if (file.isNull() || file.sourceMap) {
      this.push(file);
      return callback();
    }

    if (file.isStream()) {
      return callback(new Error(utils.PLUGIN_NAME + '-init: Streaming not supported'));
    }

    if (options === undefined) {
      options = {};
    }
    debug(function() {
      return options;
    });

    var fileContent = file.contents.toString();
    var sourceMap, preExistingComment;
    var internals = initInternals(options, file, fileContent);

    if (options.loadMaps) {
      var result = internals.loadMaps();
      sourceMap = result.map;
      fileContent = result.content;
      preExistingComment = result.preExistingComment;
    }

    if (!sourceMap && options.identityMap) {
      debug(function() { return '**identityMap option is deprecated, update to use sourcemap.identityMap stream**'; });
      debug(function() {
        return 'identityMap';
      });
      var fileType = path.extname(file.path);
      var source = unixStylePath(file.relative);
      var generator = new SourceMapGenerator({ file: source });

      if (fileType === '.js') {
        var tokenizer = acorn.tokenizer(fileContent, { locations: true });
        while (true) {
          var token = tokenizer.getToken();
          if (token.type.label === 'eof') {
            break;
          }
          var mapping = {
            original: token.loc.start,
            generated: token.loc.start,
            source: source,
          };
          if (token.type.label === 'name') {
            mapping.name = token.value;
          }
          generator.addMapping(mapping);
        }
        generator.setSourceContent(source, fileContent);
        sourceMap = generator.toJSON();
      } else if (fileType === '.css') {
        debug('css');
        var ast = css.parse(fileContent, { silent: true });
        debug(function() {
          return ast;
        });
        var registerTokens = function(ast) {
          if (ast.position) {
            generator.addMapping({ original: ast.position.start, generated: ast.position.start, source: source });
          }

          function logAst(key, ast) {
            debug(function() {
              return 'key: ' + key;
            });
            debug(function() {
              return ast[key];
            });
          }

          for (var key in ast) {
            logAst(key, ast);
            if (key !== 'position') {
              if (Object.prototype.toString.call(ast[key]) === '[object Object]') {
                registerTokens(ast[key]);
              } else if (Array.isArray(ast[key])) {
                debug(function() {
                  return '@@@@ ast[key] isArray @@@@';
                });
                for (var i = 0; i < ast[key].length; i++) {
                  registerTokens(ast[key][i]);
                }
              }
            }
          }
        };
        registerTokens(ast);
        generator.setSourceContent(source, fileContent);
        sourceMap = generator.toJSON();
      }
    }

    if (!sourceMap) {
      // Make an empty source map
      sourceMap = {
        version: 3,
        names: [],
        mappings: '',
        sources: [unixStylePath(file.relative)],
        sourcesContent: [fileContent],
      };
    } else if (preExistingComment !== null && typeof preExistingComment !== 'undefined') {
      sourceMap.preExistingComment = preExistingComment;
    }

    sourceMap.file = unixStylePath(file.relative);
    file.sourceMap = sourceMap;

    this.push(file);
    callback();
  }

  return through.obj(sourceMapInit);
}
342251
function Paginator(options) {
  debug('initializing from <%s>', __filename);
  this.options = options || {};
  this.footer = this.options.footer;
  if (typeof this.footer !== 'string') {
    this.footer = '(Move up and down to reveal more choices)';
  }
  this.firstRender = true;
  this.lastIndex = 0;
  this.position = 0;
}
1006975
function validateOptions(options) {
  const notSupported = _.reject(_.keys(options), (key) => (
    OPTIONS.has(key)
  ));

  if (notSupported.length > 0) {
    console.warn(`[${PLUGIN_NAME}] Options ${notSupported} are not supported, use following options: ${Array.from(OPTIONS)}`);
  }
}
388633
function(options) {
      if (this.options) options = _.extend({}, this.options, options);
      for (var i = 0, l = viewOptions.length; i < l; i++) {
        var attr = viewOptions[i];
        if (options[attr]) this[attr] = options[attr];
      }
      this.options = options;
    }
154878
function INI(options){
  if(typeof options === 'string'){
    var obj = INI.parse(fs.readFileSync(options, 'utf8'));
    for(var k in obj) this[ k ] = obj[ k ];
  }
  if(typeof options === 'object'){
    this.obj = options;
  }
  return this;
}
956665
function init(options) {

    var fs = require('fs');
    var path = require('path');
    var rootdir = path.dirname(require.main);
    var options = options || {
        config: require(path.join(rootdir, 'config.json')),
        root: rootdir,
        callback: function (noop) {}
    };
    var def = {};
    function ModulePaths (moduledir) {
        this.moduledir = moduledir;
    }

    ModulePaths.prototype.then = function (accept, reject) {
      var moduledir = this.moduledir;
      fs.readdir(moduledir, function (err, files) {
        if (err) reject(err);
        files.forEach(function (file) {
            var name = path.basename(file, '.js');
            def[name] = path.join(moduledir, name);
        });
        accept();
      });
    };
    var pubpath = new ModulePaths(path.join(path.dirname(module.filename), '..', 'public', 'js'));
    var prvpath = new ModulePaths(path.join(path.dirname(module.filename), '..', 'private', 'js'));

    Promise.all([pubpath, prvpath])
        .then(function () {
            var requirejs = require('requirejs');
            requirejs.config({
                baseUrl: path.join(rootdir),
                paths: def
            });

            requirejs(['loader_factory'], function (LoaderFactory) {
                var fs = require('fs');
                var config = options.config;
                config.paths.push(path.dirname(pubpath.moduledir));
                var loader = 'loader_express';
                var db = 'db_mongo';
                if (config.loader) loader = config.loader;
                if (config.db) db = config.db;

                new LoaderFactory().create(loader, db, function (loader) {
                    loader.init(config, options.callback);
                });
            });
        })
    .catch(function (err) {
        console.error('err:', err);
    });
}
1180941
function config(options) {
    var current = config.current
    Object.assign(current, options)
    api._init(current)
}
681185
function(options) {
  options = options || {};
  this.type = options.type;
  this.body = options.body;
  this.actions = options.actions;
  this.links = options.links;
  this.embedded = options.embedded;
}
1099401
function Basic(options) {
        if (options == null) {
          options = {};
        }
        this.ERRORS = bind(this.ERRORS, this);
        this._initErrors = bind(this._initErrors, this);
        this._checkLogging = bind(this._checkLogging, this);
        this.debug = bind(this.debug, this);
        this.info = bind(this.info, this);
        this.warning = bind(this.warning, this);
        this.error = bind(this.error, this);
        this.fatal = bind(this.fatal, this);
        this._logname = bind(this._logname, this);
        this._log = bind(this._log, this);
        this.log = bind(this.log, this);
        this._handleError = bind(this._handleError, this);
        this._waitUntil = bind(this._waitUntil, this);
        this.setter = bind(this.setter, this);
        this.getter = bind(this.getter, this);
        this.define = bind(this.define, this);
        this.mixin = bind(this.mixin, this);
        this.defaults = bind(this.defaults, this);
        this.on("_log", this._log);
        this.getter("classname", function() {
          return this.constructor.name.toLowerCase();
        });
        this.config = extend(true, {}, this.defaults(), config.get(this._config_name || this.classname, true), options);
        this._initErrors();
        this.initialize(options);
        this.debug("loaded");
        return;
      }
938917
public static function init(PDO $pdo, $options = [])
    {
        DB::init($pdo);
        self::$initOptions = $options;
    }