Main init method
297
public function init()
    {
        $host =getenv('PDO_HOST');
        if($host) {
            $this->setHost(trim($host));
        }

        $database = getenv('PDO_DATABASE');
        if($database) {
            $this->setDatabase(trim($database));
        }
        $user = getenv('PDO_USER');
        if($user) {
            $this->setUser($user);
        }

        $password = getenv('PDO_PASSWORD');
        if($password) {
            $this->setPassword($password);
        }
    }
1111075
public function init ()
		{
			$class = $this->_modelClass;

			$this->_root = $class::find()->roots()->one();
			if ($this->_root == null)
			{
				$root = new $class([ 'guid' => 'root', 'title' => 'ROOT' ]);
				$root->makeRoot();

				$this->_root = $class::find()->roots()->one();
				$this->_data = [];
			}
			else
				$this->_data = $this->_root->children()->all();

			$this->buildPaths();
		}
1032046
private void init() {
        menubar = new Menubar(this);
        setJMenuBar(menubar);
        toolBar = new JToolBar();
        JButton button;
        JButton breakButton, goButton, stepIntoButton,
            stepOverButton, stepOutButton;
        String [] toolTips = {"Break (Pause)",
                              "Go (F5)",
                              "Step Into (F11)",
                              "Step Over (F7)",
                              "Step Out (F8)"};
        int count = 0;
        button = breakButton = new JButton("Break");
        button.setToolTipText("Break");
        button.setActionCommand("Break");
        button.addActionListener(menubar);
        button.setEnabled(true);
        button.setToolTipText(toolTips[count++]);

        button = goButton = new JButton("Go");
        button.setToolTipText("Go");
        button.setActionCommand("Go");
        button.addActionListener(menubar);
        button.setEnabled(false);
        button.setToolTipText(toolTips[count++]);

        button = stepIntoButton = new JButton("Step Into");
        button.setToolTipText("Step Into");
        button.setActionCommand("Step Into");
        button.addActionListener(menubar);
        button.setEnabled(false);
        button.setToolTipText(toolTips[count++]);

        button = stepOverButton = new JButton("Step Over");
        button.setToolTipText("Step Over");
        button.setActionCommand("Step Over");
        button.setEnabled(false);
        button.addActionListener(menubar);
        button.setToolTipText(toolTips[count++]);

        button = stepOutButton = new JButton("Step Out");
        button.setToolTipText("Step Out");
        button.setActionCommand("Step Out");
        button.setEnabled(false);
        button.addActionListener(menubar);
        button.setToolTipText(toolTips[count++]);

        Dimension dim = stepOverButton.getPreferredSize();
        breakButton.setPreferredSize(dim);
        breakButton.setMinimumSize(dim);
        breakButton.setMaximumSize(dim);
        breakButton.setSize(dim);
        goButton.setPreferredSize(dim);
        goButton.setMinimumSize(dim);
        goButton.setMaximumSize(dim);
        stepIntoButton.setPreferredSize(dim);
        stepIntoButton.setMinimumSize(dim);
        stepIntoButton.setMaximumSize(dim);
        stepOverButton.setPreferredSize(dim);
        stepOverButton.setMinimumSize(dim);
        stepOverButton.setMaximumSize(dim);
        stepOutButton.setPreferredSize(dim);
        stepOutButton.setMinimumSize(dim);
        stepOutButton.setMaximumSize(dim);
        toolBar.add(breakButton);
        toolBar.add(goButton);
        toolBar.add(stepIntoButton);
        toolBar.add(stepOverButton);
        toolBar.add(stepOutButton);

        JPanel contentPane = new JPanel();
        contentPane.setLayout(new BorderLayout());
        getContentPane().add(toolBar, BorderLayout.NORTH);
        getContentPane().add(contentPane, BorderLayout.CENTER);
        desk = new JDesktopPane();
        desk.setPreferredSize(new Dimension(600, 300));
        desk.setMinimumSize(new Dimension(150, 50));
        desk.add(console = new JSInternalConsole("JavaScript Console"));
        context = new ContextWindow(this);
        context.setPreferredSize(new Dimension(600, 120));
        context.setMinimumSize(new Dimension(50, 50));

        split1 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, desk,
                                          context);
        split1.setOneTouchExpandable(true);
        SwingGui.setResizeWeight(split1, 0.66);
        contentPane.add(split1, BorderLayout.CENTER);
        statusBar = new JLabel();
        statusBar.setText("Thread: ");
        contentPane.add(statusBar, BorderLayout.SOUTH);
        dlg = new JFileChooser();

        javax.swing.filechooser.FileFilter filter =
            new javax.swing.filechooser.FileFilter() {
                    @Override
                    public boolean accept(File f) {
                        if (f.isDirectory()) {
                            return true;
                        }
                        String n = f.getName();
                        int i = n.lastIndexOf('.');
                        if (i > 0 && i < n.length() -1) {
                            String ext = n.substring(i + 1).toLowerCase();
                            if (ext.equals("js")) {
                                return true;
                            }
                        }
                        return false;
                    }

                    @Override
                    public String getDescription() {
                        return "JavaScript Files (*.js)";
                    }
                };
        dlg.addChoosableFileFilter(filter);
        addWindowListener(new WindowAdapter() {
                @Override
                public void windowClosing(WindowEvent e) {
                    exit();
                }
            });
    }
575141
function init() {
    if (tokens) {
      return;
    }
    if (fromString) {
      tokens = cbml.parse(contentString);
    }
    else {
      tokens = cbml.parse(fs.readFileSync(filename));
    }
    /*<debug>
    console.log(JSON.stringify(tokens, null, '  '));
    //</debug>*/
  }
271145
function init(): void {
    $helpers = [
      'app' => \Yii::$app,
      'format' => new helpers\Format,
      'html' => new helpers\Html,
      'i18n' => new helpers\I18N,
      'url' => new helpers\Url
    ];

    $options = [
      'charset' => \Yii::$app->charset,
      'entity_flags' => ENT_QUOTES | ENT_SUBSTITUTE,
      'escape' => [Html::class, 'encode'],
      'helpers' => ArrayHelper::merge($helpers, $this->helpers),
      'partials_loader' => new Loader(['viewRenderer' => $this]),
      'strict_callables' => true
    ];

    if ($this->enableCaching) {
      /** @var \yii\caching\Cache $cache */
      $cache = Instance::ensure($this->cache, \yii\caching\Cache::class);
      $this->cache = $cache;
      $options['cache'] = new Cache(['viewRenderer' => $this]);
    }

    if ($this->enableLogging) $options['logger'] = new Logger;
    $this->engine = new \Mustache_Engine($options);

    parent::init();
    $this->helpers = [];
  }
310635
public static void init()
  {
    try {
      initializeEnvironment();
    } catch (Throwable e) {
      log().log(Level.FINER, e.toString(), e);
    }

    try {
      init(Thread.currentThread().getContextClassLoader());
    } catch (Throwable e) {
      log().log(Level.FINER, e.toString(), e);
    }
  }
1265230
public function init()
    {
        parent::init();
        $this->stepCallback = $this->add(['Callback', 'urlTrigger'=>$this->name]);

        $this->currentStep = $this->stepCallback->triggered() ?: 0;

        $this->stepTemplate = $this->template->cloneRegion('Step');
        $this->template->del('Step');

        // add buttons
        if ($this->currentStep) {
            $this->buttonPrev = $this->add(['Button', 'Back', 'basic'], 'Left');
            $this->buttonPrev->link($this->stepCallback->getURL($this->currentStep - 1));
        }

        $this->buttonNext = $this->add(['Button', 'Next', 'primary'], 'Right');
        $this->buttonFinish = $this->add(['Button', 'Finish', 'primary'], 'Right');

        $this->buttonNext->link($this->stepCallback->getURL($this->currentStep + 1));
    }
775839
public function init()
    {
        parent::init();

        MainAsset::register($this->getView());
        InitAsset::register($this->getView());
        TooltipAsset::register($this->getView());

        echo Html::beginTag('body', ['class' => 'page-sidebar-closed-hide-logo page-container-bg-solid page-sidebar-closed-hide-logo page-boxed page-header-fixed page-footer-fixed']);
        $this->getView()->beginBody();
    }
491282
def main(self):
        
        parser = self.init_parser()
        self.args = parser.parse_args()

        if self.args.debug:
            coloredlogs.install(level=logging.DEBUG, fmt=LOG_FORMAT)

        self.work()
844519
public void init() {
      
      // before running init check to see if attributes has been injected/set
      if (wurflDirPath == null)
         throw new IllegalStateException ("wurflDirPath not properly set");
      
      // look for wurfl file and patches
      File wurflDir = new File(wurflDirPath);
      // if file does not exists, it might be relative to the servlet
      if (!wurflDir.exists() && servletContext != null) 
         wurflDir = new File(servletContext.getRealPath(wurflDirPath));
      // check again
      if (!wurflDir.exists())
         throw new IllegalArgumentException("wurflDirPath " + wurflDir.getAbsolutePath() + " does not exists");
      
      if (!wurflDir.isDirectory()) 
         throw new IllegalArgumentException("wurflDirPath " + wurflDir.getAbsolutePath() + " is not a directory");
      
      ArrayList<File> patchFiles = new ArrayList<File> ();

      logger.info("search for wurfl file and patches on: " + wurflDir.getAbsolutePath());
      for (String filePath:wurflDir.list()) {
         File file = new File(wurflDir.getAbsoluteFile() + "/" + filePath);
         if (WURFL_FILENAME.equals(file.getName())) {
            wurflFile = file;
            logger.debug("wurfl file: " + wurflFile.getAbsolutePath());
         } else if (file.getName().endsWith(".xml")) {
            patchFiles.add(file);
            logger.debug("wurfl patch file: " + file.getAbsolutePath());
         }
                  
      }
      this.wurflPatchFiles = patchFiles.toArray(new File[] {});

      // initialize wurfl holder
      this.wurflHolder = new CustomWURFLHolder(this.wurflFile, this.wurflPatchFiles);
      
      startWatchingFiles();
      this.statusInfo = getNewStatusInfo("");
   }
1326235
private static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$serverName = (string)$baseClass->getServerName();
            static::$refererIntegrityEnabled = (bool)$baseClass->Session->RefererIntegrity->enabled;
            static::$tokenIntegrityEnabled = (bool)$baseClass->Session->TokenIntegrity->enabled;
            static::$tokenUseLooseIP = (bool)$baseClass->Session->TokenIntegrity->useLooseIP;
            static::$tokenUseHttpUserAgent = (bool)$baseClass->Session->TokenIntegrity->useHttpUserAgent;
            static::$tokenUseHttpAccept = (bool)$baseClass->Session->TokenIntegrity->useHttpAccept;
            static::$tokenUseHttpAcceptCharset = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptCharset;
            static::$tokenUseHttpAcceptEncoding = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptEncoding;
            static::$tokenUseHttpAcceptLanguage = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptLanguage;
        }
    }
735847
protected function _init() {
		parent::_init();
		$this->request = $this->_config['request'];

		if (!is_object($this->request) || !$this->request->params) {
			return;
		}
		$default = ['command' => null, 'action' => null, 'args' => null];
		$params = array_diff_key((array) $this->request->params, $default);

		foreach ($params as $key => $param) {
			$this->{$key} = $param;
		}
		$this->response = $this->_config['response'];

		if (!is_object($this->response)) {
			$this->response = $this->_instance('response', $this->response + [
				'plain' => $this->plain
			]);
		}
	}
1188129
function main() {
    this.prior = this.current;
    this.current = this.current.apply(this, arguments) || this.current;
    // Call user transition function, if defined
    if (this.transition) {
        this.transition.apply(this, arguments);
    }
}
877972
public void init()
    {
        this.leading = 0;
        while (this.leading < this.value.length() && this.value.charAt(this.leading) == ' ')
        {
            this.leading++;
        }

        if (this.leading == this.value.length())
        {
            this.setEmpty();
        }
        else
        {
            this.isEmpty = false;
            this.trailing = 0;
            while (this.value.charAt(this.value.length() - this.trailing - 1) == ' ')
            {
                this.trailing++;
            }
        }
    }
27897
protected function init()
	{
		parent::init();
		if(empty($_SERVER['argv']))
			die('This script must be run from the command line.');
		$this->_runner=$this->createCommandRunner();
		$this->_runner->commands=$this->commandMap;
		$this->_runner->addCommands($this->getCommandPath());
	}
401186
protected function _init() {
		parent::_init();
		$this->library = $this->library ?: true;
		$defaults = ['prefix' => null, 'path' => null];
		$this->_library = (array) Libraries::get($this->library) + $defaults;
	}
509617
private void initialize() {
		this.add(getMenuFile());
		this.add(getMenuEdit());
		this.add(getMenuView());
		this.add(getMenuAnalyse());
		this.add(getMenuReport());
		this.add(getMenuTools());
		this.add(getMenuImport());
		this.add(getMenuOnline());
		this.add(getMenuHelp());

	}