Dispaly or return script balsie with all inline script loaded

@param  boolean $print If true print (default true)
@return mixed
175931
public function printInlineScript($print = true)
    {
        $this->scriptNonces[] = ($nonce = $this->newNonce());
        if ($print) {
            echo  "<script type='text/javascript' nonce='".$nonce."'>" . $this->scriptInline . "</script>\n";
        } else {
            return  "<script type='text/javascript' nonce='".$nonce."'>" . $this->scriptInline . "</script>\n";
        }
    }
787422
def is_print(value, space = True, tab = False, crlf = False):
    
    if not isinstance(value, basestring):
        return False

    regex = r'\x00-\x08\x0B\x0C\x0E-\x1F\x7F'

    if not space:
        regex += r'\x20'

    if tab:
        regex += r'\x09'

    if crlf:
        regex += r'\x0A\x0D'

    return re.match(r'[' + regex + ']', value, re.U) is None
702119
def print
      return unless $stdout.tty?
      return if recently_fetched?

      resp = fetch_server_message
      update_fetched
      puts resp unless resp.empty?
    end
444715
protected function injectDebugBar($output)
    {
        if (!($debugBarConfig = Lb::app()->getConfigByName('debugbar'))) {
            return $output;
        }
        if (empty($debugBarConfig['enabled'])) {
            return $output;
        }
        if (empty($debugBarConfig['baseUrl'])) {
            return $output;
        }
        if (empty($debugBarConfig['basePath'])) {
            return $output;
        }

        /**
         * @var StandardDebugBar $debugBar
         */
        $debugBar = DebugBar::getInstance();
        $debugBarRenderer = $debugBar->getJavascriptRenderer($debugBarConfig['baseUrl'], $debugBarConfig['basePath']);
        $debugBarComponent = $debugBarRenderer->renderHead() . $debugBarRenderer->render();
        $replace = <<<EOF
{$debugBarComponent}
</body>
EOF;
        return str_replace('</body>', $replace, $output);
    }
1007485
def printHelp(script):
	

	print 'Reconsider cli script copyright 2016 OuroborosCoding'
	print ''
	print script + ' --source=localhost:28015 --destination=somedomain.com:28015'
	print script + ' --destination=somedomain.com:28015 --dbs=production,staging'
	print ''
	print 'Usage:'
	print '  --source=[string]         A RethinkDB connection string representing the'
	print '                            source host. Defaults to "localhost:28015"'
	print '  --destination=[string]    A RethinkDB connection string representing the'
	print '                            destination host. Required.'
	print '  --db                      A single DB name, or a comma separated list of'
	print '                            databases on the source which will be copied to the'
	print '                            destination. Defaults to all DBs on the source'
	print '                            host'
	print '  --verbose                 Will print out what\'s happening during the clone'
	print '  --help                    Prints this message'
	print ''
	print 'A RethinkDB connection string is defined as: host[:port[:user[:password]]]'
	print 'Valid:          localhost, localhost:28015, localhost:28015:root:asdf'
	print 'Invalid:        localhost:root, 28015, root:asdf, localhost:root:asdf'
728677
final protected function display (bool $return=FALSE)
	{
		if (file_exists($this->file)):
			$output = file_get_contents($this->file);
			foreach ($this->assignedVariables as $key => $value) 
				$output = preg_replace('/{'.$key.'}/', $value, $output);
		else:
			$output = "*** Missing template error: {$this->file} ***";
		endif;

		if ($return)
			return $output;
		else
			echo $output;
	}
1371154
public static function encode($data, $prettyPrint = false)
    {
        if ($prettyPrint) {
            // Check if the PHP version is >= 5.4 and has the JSON_PRETTY_PRINT constant
            if (version_compare(PHP_VERSION, '5.4.0', '>=') && defined('JSON_PRETTY_PRINT')) {
                return json_encode($data, JSON_PRETTY_PRINT);
            } else {
                $jsonPretty = new JsonPretty();
                return $jsonPretty->prettify($data, null, '    ');
            }
        }

        return json_encode($data);
    }
932019
private function getCache($print = true)
    {

        $cacheArray = wp_cache_get($this->postId, $this->keyGroup);

        if (!is_array($cacheArray) || !array_key_exists($this->hash, $cacheArray)) {
            return false;
        }

        if ($print === true) {
            echo $cacheArray[$this->hash];
        }

        return $cacheArray[$this->hash];
    }
90982
public function renderBodyEnd(&$output)
	{
		// $this->enableJavascript has been checked in parent::render()
		if ($this->combineScriptFiles)
			$this->combineScriptFiles(self::POS_END);

		if(!isset($this->scriptFiles[self::POS_END]) && !isset($this->scripts[self::POS_END])
			&& !isset($this->scripts[self::POS_READY]) && !isset($this->scripts[self::POS_LOAD]))
			return;

		$fullPage=0;
		$output=preg_replace('/(<\\/body\s*>)/is','<###end###>$1',$output,1,$fullPage);
		$html='';
		if(isset($this->scriptFiles[self::POS_END]))
		{
			foreach($this->scriptFiles[self::POS_END] as $scriptFileUrl=>$scriptFileValue)
			{
				if(is_array($scriptFileValue))
					$html.=CiiHtml::scriptFile($scriptFileUrl,$scriptFileValue)."\n";
				else
					$html.=CiiHtml::scriptFile($scriptFileUrl)."\n";
			}
		}
		$scripts=isset($this->scripts[self::POS_END]) ? $this->scripts[self::POS_END] : array();
		if(isset($this->scripts[self::POS_READY]))
		{
			if($fullPage)
				$scripts[]="jQuery(function($) {\n".implode("\n",$this->scripts[self::POS_READY])."\n});";
			else
				$scripts[]=implode("\n",$this->scripts[self::POS_READY]);
		}
		if(isset($this->scripts[self::POS_LOAD]))
		{
			if($fullPage)
				$scripts[]="jQuery(window).on('load',function() {\n".implode("\n",$this->scripts[self::POS_LOAD])."\n});";
			else
				$scripts[]=implode("\n",$this->scripts[self::POS_LOAD]);
		}
		if(!empty($scripts))
			$html.=$this->renderScriptBatch($scripts);

		if($fullPage)
			$output=str_replace('<###end###>',$html,$output);
		else
			$output=$output.$html;
	}
659904
public function get( $withScript = false )
    {
        $retVal = '';
        
        if ( $withScript ) {
            $retVal .= "<script type='text/javascript'>\n";
        }
        
        $retVal .= $this->current();
        
        if ( $withScript ) {
            $retVal .= "\n</script>\n";
        }
        
        return $retVal;
        
    }
77829
public static function print_r($var, $continue = false, $hide = false, $return = false)
    {
        return self::it($var, AbstractDumper::PRINT_R, $continue, $hide, $return);
    }
814527
public function dump($return = false){
		$sql = PHP_SAPI === 'cli'
			? preg_replace('/\s+/', ' ', $this->parse()) . "\n"
			: Manager::highlightSql($this->parse());
		if(!$return)
			echo $sql;
		return $return ? $sql : $this;
	}
390675
public static function pre($data = false) {

        if ($data) {

            $type = self::type($data);

            $functions = array(
                'array' => 'print_r',
                'double' => 'echo',
                'integer' => 'echo',
                'json' => 'json_encode',
                'string' => 'echo',
            );

            echo '<pre>';
            if (array_key_exists($type, $functions)) {

                if ($functions[$type] === 'echo') {

                    echo $data;
                } else if ($functions[$type] === 'json_encode') {

                    $json = json_decode($data);
                    echo json_encode($json, JSON_PRETTY_PRINT);
                } else {

                    $functions[$type]($data);
                }
            } else {

                var_dump($data);
            }
            echo '</pre>';
        }
    }
472321
public function prettyPrint(PrettyPrinterAbstract $printer = null): string
    {
        if (!$printer) {
            $printer = new Standard();
        }
        return $printer->prettyPrintFile($this->getStubStmts());
    }
371063
public static function load($class)
	{
		// deal with funny is_callable('static::classname') side-effect
		if (strpos($class, 'static::') === 0)
		{
			// is called from within the class, so it's already loaded
			return true;
		}

		$loaded = false;
		$class = ltrim($class, '\\');
		$namespaced = ($pos = strripos($class, '\\')) !== false;

		if (empty(static::$auto_initialize))
		{
			static::$auto_initialize = $class;
		}

		if (isset(static::$classes[strtolower($class)]))
		{
			static::init_class($class, str_replace('/', DS, static::$classes[strtolower($class)]));
			$loaded = true;
		}
		elseif ($full_class = static::find_core_class($class))
		{
			if ( ! class_exists($full_class, false) and ! interface_exists($full_class, false))
			{
				include static::prep_path(static::$classes[strtolower($full_class)]);
			}
			if ( ! class_exists($class, false))
			{
				class_alias($full_class, $class);
			}
			static::init_class($class);
			$loaded = true;
		}
		else
		{
			$full_ns = substr($class, 0, $pos);

			if ($full_ns)
			{
				foreach (static::$namespaces as $ns => $path)
				{
					$ns = ltrim($ns, '\\');
					if (stripos($full_ns, $ns) === 0)
					{
						$path .= static::class_to_path(
							substr($class, strlen($ns) + 1),
							array_key_exists($ns, static::$psr_namespaces)
						);
						if (is_file($path))
						{
							static::init_class($class, $path);
							$loaded = true;
							break;
						}
					}
				}
			}

			if ( ! $loaded)
			{
				$path = APPPATH.'classes/'.static::class_to_path($class);

				if (is_file($path))
				{
					static::init_class($class, $path);
					$loaded = true;
				}
			}
		}

		// Prevent failed load from keeping other classes from initializing
		if (static::$auto_initialize == $class)
		{
			static::$auto_initialize = null;
		}

		return $loaded;
	}
1106570
public static function url($object): bool
    {
        if (Any::isEmpty($object)) { // allow empty
            return true;
        }

        if (!Any::isLine($object)) {
            return false;
        }

        return Str::isUrl($object);
    }
1124122
public function output($options = array())
    {
        if (!isset($options["compress"])) $options["compress"] = true;

        $this->_add_page_text();

        if ($options["compress"]) {
            $this->_pdf->set_value("compress", 6);
        } else {
            $this->_pdf->set_value("compress", 0);
        }

        $this->_close();

        if (self::$IN_MEMORY) {
            $data = $this->_pdf->get_buffer();
        } else {
            $data = file_get_contents($this->_file);

            //debugpng
            if ($this->_dompdf->getOptions()->getDebugPng()) {
                print '[pdflib output unlink ' . $this->_file . ']';
            }
            if (!$this->_dompdf->getOptions()->getDebugKeepTemp()) {
                unlink($this->_file);
            }
            $this->_file = null;
            unset($this->_file);
        }

        return $data;
    }