Private function to compile and set the driver name
358026
private function compileAndSetName() { 
      $name = \Nuki\Handlers\Core\Assist::classNameShort($this);
      
      $this->name = strtolower($name);
    }
85775
def driver_name(self):
        
        (self._driver_name, value) = self.get_cached_attr_string(self._driver_name, 'driver_name')
        return value
977793
def _initialize_chrome_driver(self):
        """"""

        try:

            print(colored('\nInitializing Headless Chrome...\n', 'yellow'))
            self._initialize_chrome_options()
            self._chromeDriver = webdriver.Chrome(
                chrome_options=self._chromeOptions)

            self._chromeDriver.maximize_window()
            print(colored('\nHeadless Chrome Initialized.', 'green'))

        except Exception as exception:
            print(colored('Error - Driver Initialization: ' + format(exception)), 'red')
1345017
def init_driver(client_id):
    

    # Create profile directory if it does not exist
    profile_path = CHROME_CACHE_PATH + str(client_id)
    if not os.path.exists(profile_path):
        os.makedirs(profile_path)
    
    # Options to customize chrome window
    chrome_options = [
        'window-size=' + CHROME_WINDOW_SIZE,
        '--user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/60.0.3112.78 Chrome/60.0.3112.78 Safari/537.36'
    ]
    if CHROME_IS_HEADLESS:
        chrome_options.append('--headless')
    if CHROME_DISABLE_GPU:
        chrome_options.append('--disable-gpu')
    
    # Create a whatsapidriver object
    d = WhatsAPIDriver(
        username=client_id, 
        profile=profile_path, 
        client='chrome', 
        chrome_options=chrome_options
    )
    return d
41848
public void setDriverKeyInfo(FieldList keys, boolean[] sortOrder, int id) {
		if(id < 0 || id >= driverKeys.length) {
			throw new CompilerException("Invalid id for driver key information. DriverStrategy requires only "
											+super.getDriverStrategy().getNumRequiredComparators()+" comparators.");
		}
		this.driverKeys[id] = keys;
		this.driverSortOrders[id] = sortOrder;
	}
1110229
function setDumpFunctionName(fnName){
	if(fnName)
		DEFAULTOPTS.dumpFunctionName = fnName;

	global[DEFAULTOPTS.dumpFunctionName] = dump;
}
439086
def compiler(name):
    
    pinfo = __get_paths()
    _compiler = local[name]
    _compiler = _compiler.setenv(
        PATH=pinfo["path"], LD_LIBRARY_PATH=pinfo["ld_library_path"])
    return _compiler
833714
function createDriversDirectory()
    {
        if ($this->files->isDir($driversDirectory = VALET_HOME_PATH.'/Drivers')) {
            return;
        }

        $this->files->mkdirAsUser($driversDirectory);

        $this->files->putAsUser(
            $driversDirectory.'/SampleValetDriver.php',
            $this->files->get(__DIR__.'/../stubs/SampleValetDriver.php')
        );
    }
430777
def setTypesModuleName(self, name, modulePath=None):
        
        self.typesModuleName = '%s' %name
        if modulePath is not None:
            self.typesModuleName = '%s.%s' %(modulePath,name)
637495
def driver_name(self):
        
        self._driver_name, value = self.get_attr_string(self._driver_name, 'driver_name')
        return value
741589
public void setDriverClassName(String driverClassName) {

        if (driverClassName.equals(JDBCConnectionPoolDataSource.driver)) {
            return;
        }

        /** @todo: Use a HSQLDB RuntimeException subclass */
        throw new RuntimeException("This class only supports JDBC driver '"
                                   + JDBCConnectionPoolDataSource.driver
                                   + "'");
    }
717644
def update_name(self, name):
        """"""
        if name != self.name:
            self.parent.executables[name] = self
            del self.parent.executables[self.name]
            self.name = name
1097624
def get_provider_name(driver):
    
    kls = driver.__class__.__name__
    for d, prop in DRIVERS.items():
        if prop[1] == kls:
            return d
    return None
275892
protected function setup_driver( &$driver )
	{
		$driver->IsSMTP(); 
		$driver->Host = $this->config->host;
		
		// smtp auth?
		if ( $this->config->auth === true ) 
		{
			$driver->SMTPAuth = true;
			$driver->Username = $this->config->user;
			$driver->Password = $this->config->pass;
		}
		
		$driver->SMTPSecure = $this->config->encryption;
		$driver->Port = $this->config->port;
	}
1260747
def compile(self, name, migrate='', rollback='', num=None):
        """"""
        if num is None:
            num = len(self.todo)

        name = '{:03}_'.format(num + 1) + name
        filename = name + '.py'
        path = os.path.join(self.migrate_dir, filename)
        with open(path, 'w') as f:
            f.write(MIGRATE_TEMPLATE.format(migrate=migrate, rollback=rollback, name=filename))

        return name
59738
function _compile_source($resource_name, &$source_content, &$compiled_content, $cache_include_path=null)
	{
		if (file_exists(SMARTY_DIR . $this->compiler_file)) {
			require_once(SMARTY_DIR . $this->compiler_file);
		} else {
			// use include_path
			require_once($this->compiler_file);
		}


		$smarty_compiler = new $this->compiler_class;

		$smarty_compiler->template_dir      = $this->template_dir;
		$smarty_compiler->compile_dir       = $this->compile_dir;
		$smarty_compiler->plugins_dir       = $this->plugins_dir;
		$smarty_compiler->config_dir        = $this->config_dir;
		$smarty_compiler->force_compile     = $this->force_compile;
		$smarty_compiler->caching           = $this->caching;
		$smarty_compiler->php_handling      = $this->php_handling;
		$smarty_compiler->left_delimiter    = $this->left_delimiter;
		$smarty_compiler->right_delimiter   = $this->right_delimiter;
		$smarty_compiler->_version          = $this->_version;
		$smarty_compiler->security          = $this->security;
		$smarty_compiler->secure_dir        = $this->secure_dir;
		$smarty_compiler->security_settings = $this->security_settings;
		$smarty_compiler->trusted_dir       = $this->trusted_dir;
		$smarty_compiler->use_sub_dirs      = $this->use_sub_dirs;
		$smarty_compiler->_reg_objects      = &$this->_reg_objects;
		$smarty_compiler->_plugins          = &$this->_plugins;
		$smarty_compiler->_tpl_vars         = &$this->_tpl_vars;
		$smarty_compiler->default_modifiers = $this->default_modifiers;
		$smarty_compiler->compile_id        = $this->_compile_id;
		$smarty_compiler->_config            = $this->_config;
		$smarty_compiler->request_use_auto_globals  = $this->request_use_auto_globals;

		if (isset($cache_include_path) && isset($this->_cache_serials[$cache_include_path])) {
			$smarty_compiler->_cache_serial = $this->_cache_serials[$cache_include_path];
		}
		$smarty_compiler->_cache_include = $cache_include_path;


		$_results = $smarty_compiler->_compile_file($resource_name, $source_content, $compiled_content);

		if ($smarty_compiler->_cache_serial) {
			$this->_cache_include_info = array(
                'cache_serial'=>$smarty_compiler->_cache_serial
			,'plugins_code'=>$smarty_compiler->_plugins_code
			,'include_file_path' => $cache_include_path);

		} else {
			$this->_cache_include_info = null;

		}

		return $_results;
	}
148440
def new_driver(browser_name, *args, **kwargs):
        
        if browser_name == FIREFOX:
            return webdriver.Firefox(*args, **kwargs)

        # elif options['local'] and options['browser_name'] == CHROME:
        #     return webdriver.Chrome(*args, **kwargs)
        #
        # elif options['local'] and options['browser_name'] == IE:
        #     return webdriver.Ie(*args, **kwargs)
        #
        # elif options['local'] and options['browser_name'] == OPERA:
        #     return webdriver.Opera(*args, **kwargs)

        elif browser_name == PHANTOMJS:
            executable_path = os.path.join(os.path.dirname(__file__), 'phantomjs/executable/phantomjs_64bit')
            driver = webdriver.PhantomJS(executable_path=executable_path, **kwargs)
            driver.set_window_size(1280, 800)  # Set a default because phantom needs it
            return driver

        else:  # remote
            driver = webdriver.Remote(*args, **kwargs)
            return driver