Initialize a share bar.

@param {Object}        $options globals (optional).

@return {Void}
423308
function share(elem, options) {
        var data = mixin({}, defaults, options || {}, dataset(elem));

        if (data.imageSelector) {
            data.image = querySelectorAlls(data.imageSelector).map(function(item) {
                return item.src;
            }).join('||');
        }

        addClass(elem, 'share-component social-share');
        createIcons(elem, data);
        createWechat(elem, data);

        elem.initialized = true;
    }
721372
public function share($name,$params)
    {

        $this->instances[$name] = $params;
        $this->instances[$name] = $this->resolve($name);
    
    }
904911
function (options) {
            var key;
            for (key in this.config) {
                if (this.config.hasOwnProperty(key) && this.config[key].singleton) {
                    this._init(key, options);
                }
            }
            return this;
        }
1167543
protected function initialize($options)
    {
        if (is_array($options) === false && ($options instanceof Traversable) === false) {
            throw new Exception('The $options argument must be either an array or Traversable');
        }

        foreach ($options as $key => $value) {
            if (in_array($key, $this->configurable, true) === false) {
                continue;
            }

            $method = 'set'.ucfirst($key);

            if (method_exists($this, $method) === true) {
                $this->$method($value);
            }
        }
    }
178029
final public function initializeObject(array $options = [])
    {
        $this->objectManager = Core::get()->getObjectManager();
        $this->checkUnknownOptions($options);
        $this->checkRequiredOptions($options);
        $this->options = $this->fillOptionsWithValues($options);
    }
1221497
private function setUserOptions($options)
    {
        if (is_array($options)) {
            foreach ($options as $property => $value) {
                $this->$property = $value;
            }
        }
    }
1066871
public function init($component, $options = array()) {
		parent::init($component, $options);
		$this->auth = Yii::app()->loid->load();
	}
145368
function ezColumnsStart( $options = array() )
    {
        // start from the current y-position, make the set number of columne
        if ( isset( $this->ez['columns'] ) && $this->ez['columns'] == 1 )
        {   // if we are already in a column mode then just return.
            return;
        }
        $def = array( 'gap'=>10, 'num'=>2 );
        foreach( $def as $k => $v )
        {
            if ( !isset( $options[$k] ) )
            {
                $options[$k] = $v;
            }
        }
        // setup the columns
        $this->ez['columns'] = array( 'on' => 1, 'colNum' => 1 );

        // store the current margins
        $this->ez['columns']['margins'] = array( $this->ez['leftMargin'],
                                                 $this->ez['rightMargin'],
                                                 $this->ez['topMargin'],
                                                 $this->ez['bottomMargin'] );
        // and store the settings for the columns
        $this->ez['columns']['options'] = $options;
        // then reset the margins to suit the new columns
        // safe enough to assume the first column here, but start from the current y-position
        $this->ez['topMargin'] = $this->ez['pageHeight']-$this->y;
        $width = ( $this->ez['pageWidth'] - $this->ez['leftMargin'] - $this->ez['rightMargin'] - ( $options['num'] - 1 ) * $options['gap'] ) / $options['num'];
        $this->ez['columns']['width'] = $width;
        $this->ez['rightMargin'] = $this->ez['pageWidth'] - $this->ez['leftMargin'] - $width;

    }
891999
protected function _initialize($options = array()) {
		if ($this->_initialized) {
			return;
		}

		$this->_initialized = true;
		if (!empty($options['_css'])) {
			foreach ((array)$options['_css'] as $css) {
				$this->Html->css($css, null, array('inline' => false));
			}
		}

		if (!empty($options['_cssText'])) {
			$out = $this->Html->tag('style', $options['_cssText']);
			$this->_View->append('css', $out);
		}

		if (!empty($options['_scriptBlock'])) {
			$scriptOpts = array('block' => $options['_scriptBlock']);
		} else {
			$scriptOpts = false;
		}

		if (!empty($options['_scripts'])) {
			foreach ((array)$options['_scripts'] as $script) {
				$this->Html->script($script, $scriptOpts);
			}
		}
	}
501087
public function init(array $options = array())
    {
        $this->ch = curl_init();

        if (!empty($options)) {
            $this->setOptions($options);
        }
    }
470977
public function init($options=[], $context=null)
    {
        $this->url=$options['url']??static::SG()->_SERVER['REQUEST_URI'];
        $this->key=$options['key']??$this->key;
        $this->page_size=$options['page_size']??$this->page_size;
        
        $this->handel_get_url=$options['rewrite']??$this->handel_get_url;
        
        $this->current_page=$options['current']??intval(static::SG()->_GET[$this->key]??1);
        $this->current_page=$this->current_page>1?$this->current_page:1;
    }
533826
public function addGlobals(array $globals)
    {
        foreach ($globals as $name => $value) {
            $this->addGlobalContext($name, $value);
        }
    }
211454
public function createShare(array $options, $notify = false):array
    {
        $parameters = $this->buildHttpQuery(
            [
                'notify' => $notify,
                'direct' => true,
            ]
        );

        return $this->post("Shares?{$parameters}", $options);
    }
632202
public static function init($options = []) {
		// initialize mbstring
		mb_internal_encoding('UTF-8');
		mb_regex_encoding('UTF-8');
		// if we are from command line we exit here
		if (!empty($options['__run_only_bootstrap'])) {
			// format
			\Format::init();
			return;
		}
		// enforcing https
		$enforce_https = \Application::get('application.https.enforce');
		if (!empty($enforce_https)) {
			if (!\Request::isSSL()) {
				$url = \Request::host(['protocol' => 'https', 'request' => true]);
				\Request::redirect($url);
			}
		}
		// get flags & backend
		$flags = \Application::get('flag');
		$backend = \Application::get('Numbers.Backend', ['backend_exists' => true]);
		// alive
		if (!empty($flags['alive']['autoconnect'])) {
			\Alive::start();
		}
		// initialize cryptography
		$crypt = \Application::get('crypt');
		if (!empty($crypt) && $backend) {
			foreach ($crypt as $crypt_link => $crypt_settings) {
				if (!empty($crypt_settings['submodule']) && !empty($crypt_settings['autoconnect'])) {
					$crypt_object = new \Crypt($crypt_link, $crypt_settings['submodule'], $crypt_settings);
				}
			}
		}
		// including libraries that we need to auto include
		if (!empty($flags['global']['library'])) {
			foreach ($flags['global']['library'] as $k => $v) {
				// we need to skip certain keys
				if ($k == 'submodule' || $k == 'options') continue;
				// we only include if autoconnect is on
				if (!empty($v['autoconnect'])) {
					\Factory::submodule('flag.global.library.' . $k . '.submodule')->add();
				}
			}
		}
		// check if we need to include system files from frontend
		if (\Application::get('dep.submodule.Numbers.Frontend.System')) {
			\Numbers\Frontend\System\Model\Base::start();
		}
		// application structure
		$application_structure_model = \Application::get('application.structure.model');
		if (!empty($application_structure_model)) {
			\Factory::model($application_structure_model, true)->settings();
		}
		$application_structure = \Application::get('application.structure');
		// create database connections
		$db = Application::get('db');
		if (!empty($db) && $backend) {
			foreach ($db as $db_link => $db_settings) {
				if (empty($db_settings['autoconnect']) || empty($db_settings['servers']) || empty($db_settings['submodule'])) continue;
				// establish connection
				$db_result = \Db::connectToServers($db_link, $db_settings);
				// checking if not connected
				if (!$db_result['success']) {
					// if wrong database name is provided we redirect to special url
					if (!empty($application_structure['db_not_found_url']) && isset($application_structure['settings']['db'][$db_link])) {
						\Request::redirect($application_structure['db_not_found_url']);
					} else {
						Throw new \Exception('Unable to open database connection!');
					}
				}
			}
		}
		// initialize caches
		$cache = Application::get('cache');
		if (!empty($cache) && $backend) {
			foreach ($cache as $cache_link => $cache_settings) {
				if (empty($cache_settings['submodule']) || empty($cache_settings['autoconnect'])) continue;
				$cache_result = \Cache::connectToServers($cache_link, $cache_settings);
				if (!$cache_result['success']) {
					Throw new \Exception(implode(', ', $cache_result['error']));
				}
			}
		}
		// initialize session
		$session = \Application::get('flag.global.session');
		if (!empty($session['start']) && $backend && !\Application::get('flag.global.__skip_session')) {
			\Session::start($session['options'] ?? []);
		}
		// load tenant
		if (!empty($application_structure_model) && !empty($application_structure['tenant_multiple'])) {
			\Factory::model($application_structure_model, true)->tenant();
		}
		// we need to get overrides from session and put them back to flag array
		$flags = array_merge_hard($flags, \Session::get('numbers.flag'));
		\Application::set('flag', $flags);
		// custom destroy methods
		$temp = \Object\ACL\Resources::getStatic('initialize');
		if (!empty($temp)) {
			foreach ($temp as $v) {
				$method = \Factory::method($v['method'], null, true);
				call_user_func_array($method, []);
			}
		}
		// initialize i18n
		if ($backend) {
			$temp_result = \I18n::init();
			if (!$temp_result['success']) {
				Throw new \Exception('Could not initialize i18n.');
			}
		}
		// format
		\Format::init();
		// default actions
		\Layout::addAction('refresh', ['value' => 'Refresh', 'icon' => 'fas fa-sync', 'onclick' => 'location.reload();', 'order' => -32000]);
		\Layout::addAction('print', ['value' => 'Print', 'icon' => 'fas fa-print', 'onclick' => 'window.print();', 'order' => -31000]);
		// include constants
		require('Constants.php');
	}
391129
public static function init($secret, $options = array()) {
    self::assert($secret, "Segment::init() requires secret");
    self::$client = new Segment_Client($secret, $options);
  }
123938
public function init(array $params)
    {
        if ($this->config->bowerFileExists()) {
            $bowerJson = $this->config->getBowerFileContent();
            $this->config->setSaveToBowerJsonFile();
            $this->config->updateBowerJsonFile2($bowerJson, $params);
        } else {
            $this->config->initBowerJsonFile($params);
        }
    }
1315073
public function Reset( $options = null ){
		$this->rules = array();
		self::$imports = array();
		self::$has_extends = false;
		self::$imports = array();
		self::$contentsMap = array();

		$this->env = new Less_Environment($options);
		$this->env->Init();

		//set new options
		if( is_array($options) ){
			$this->SetOptions(Less_Parser::$default_options);
			$this->SetOptions($options);
		}
	}