Created by PhpStorm.
Company: Appalachi Ltd.
Developer: SETTER
Suite: appalachi.ru
Email: info@appalachi.ru
Date: 30.05.2017
Time: 23:15
346927
function (date, tpl) {
    this.tpl = tpl;
    this.f  = {
        y: date.getYear() + 1900,
        m: date.getMonth() + 1,
        d: date.getDate(),
        H: date.getHours(),
        M: date.getMinutes(),
        S: date.getSeconds()
    };
}
950242
function yy_r106()
    {
        self::$prefix_number ++;
        $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[ $this->yyidx + 0 ]->minor);
        $this->compiler->prefix_code[] =
            $this->compiler->appendCode($tmp, '<?php $_tmp' . self::$prefix_number . '=ob_get_clean();?>');
        $this->_retvalue = '$_tmp' . self::$prefix_number;
    }
683351
public function newAction($appDir, ViewReplace $viewReplace)
    {
        $args = $this->getRequest()->getArgv();
        $actionArgs = array_slice($args, 2);
        $config = [
            'applicationName' => [
                'value' => 'ShadeApp',
                'description' => 'Specify your application name, e.g. MyApp',
            ],
            'applicationRootPath' => [
                'value' => './ShadeApp',
                'description' => 'Set path to store your application files',
            ],
        ];
        $argIndex = 0;
        $interactiveMode = count($actionArgs) < count($config);
        foreach ($config as $configKey => &$configEntry) {
            if (isset($actionArgs[$argIndex])) {
                $configEntry['value'] = $actionArgs[$argIndex];
            } elseif ($configKey == 'applicationRootPath') {
                $configEntry['value'] = "./{$config['applicationName']['value']}";
            }
            if ($interactiveMode) {
                echo "{$configEntry['description']} or press Enter to use '{$configEntry['value']}': ";
                $userInput = trim(fgets(STDIN));
                if ($userInput) {
                    $configEntry['value'] = $userInput;
                }
            }
            $argIndex++;
        }

        $applicationName = $config['applicationName']['value'];
        $applicationRootPath = $config['applicationRootPath']['value'];
        $response = new Response();

        $skeletonTemplatesDir = $appDir.'/skeleton';
        $classLoaderReflection = new \ReflectionClass('\Composer\Autoload\ClassLoader');
        $autoloadPath = dirname(dirname($classLoaderReflection->getFileName())).'/autoload.php';
        $replaces = [
            'ShadeApp' => $applicationName,
            '%ShadePath%' => $appDir,
            '%autoloadPath%' => $autoloadPath,
        ];
        if (file_exists($applicationRootPath)) {
            if (!is_dir($applicationRootPath)) {
                return $response->setContent("'$applicationRootPath' exists and it is not a directory\n");
            }

            if (count(scandir($applicationRootPath)) !== 2) {
                return $response->setContent("Directory '$applicationRootPath' is not empty\n");
            }
        } else {
            if (!mkdir($applicationRootPath, 0775, true)) {
                return $response->setContent("Can't create application directory $applicationRootPath\n");
            }
        }

        foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($skeletonTemplatesDir, \FilesystemIterator::SKIP_DOTS)) as $fileInfo) {
            $filePath = $fileInfo->getPathname();
            $content = $viewReplace->render($filePath, $replaces);
            $destinationPath = $applicationRootPath.str_replace($skeletonTemplatesDir, '', $filePath);
            $destinationDir = dirname($destinationPath);
            if (!is_dir($destinationDir)) {
                mkdir($destinationDir, 0775, true);
            }
            file_put_contents($destinationPath, $content);
        }

        return $response->setContent("Skeleton application '$applicationName' generated and stored under '$applicationRootPath'\n");
    }
1246929
public static void main(String[] args) 
      throws NoSuchAlgorithmException, IOException, InvalidKeyException, XmlPullParserException {
    try {
      /* play.min.io for test and development. */
      MinioClient minioClient = new MinioClient("https://play.min.io:9000", "Q3AM3UQ867SPQQA43P2F",
                                                "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

      /* Amazon S3: */
      // MinioClient minioClient = new MinioClient("https://s3.amazonaws.com", "YOUR-ACCESSKEYID",
      //                                           "YOUR-SECRETACCESSKEY");

      // Create some content for the object.
      StringBuilder builder = new StringBuilder();
      for (int i = 0; i < 1000; i++) {
        builder.append("Sphinx of black quartz, judge my vow: Used by Adobe InDesign to display font samples. ");
        builder.append("(29 letters)\n");
        builder.append("Jackdaws love my big sphinx of quartz: Similarly, used by Windows XP for some fonts. ");
        builder.append("(31 letters)\n");
        builder.append("Pack my box with five dozen liquor jugs: According to Wikipedia, this one is used on ");
        builder.append("NASAs Space Shuttle. (32 letters)\n");
        builder.append("The quick onyx goblin jumps over the lazy dwarf: Flavor text from an Unhinged Magic Card. ");
        builder.append("(39 letters)\n");
        builder.append("How razorback-jumping frogs can level six piqued gymnasts!: Not going to win any brevity ");
        builder.append("awards at 49 letters long, but old-time Mac users may recognize it.\n");
        builder.append("Cozy lummox gives smart squid who asks for job pen: A 41-letter tester sentence for Mac ");
        builder.append("computers after System 7.\n");
        builder.append("A few others we like: Amazingly few discotheques provide jukeboxes; Now fax quiz Jack! my ");
        builder.append("brave ghost pled; Watch Jeopardy!, Alex Trebeks fun TV quiz game.\n");
        builder.append("---\n");
      }
      // Create a InputStream for object upload.
      ByteArrayInputStream bais = new ByteArrayInputStream(builder.toString().getBytes("UTF-8"));
        
      // Generate a new 256 bit AES key - This key must be remembered by the client.
      byte[] key = "01234567890123456789012345678901".getBytes("UTF-8"); 
      SecretKeySpec secretKeySpec = new SecretKeySpec(key, "AES");
        
      ServerSideEncryption ssePut = ServerSideEncryption.withCustomerKey(secretKeySpec);
      ServerSideEncryption sseSource = ServerSideEncryption.copyWithCustomerKey(secretKeySpec);
        
      byte[] keyTarget = "98765432100123456789012345678901".getBytes("UTF-8"); 
      SecretKeySpec secretKeySpecTarget = new SecretKeySpec(keyTarget, "AES");

      ServerSideEncryption sseTarget = ServerSideEncryption.withCustomerKey(secretKeySpecTarget);
        
      // Create object 'my-objectname' in 'my-bucketname' with content from the input stream.
      minioClient.putObject("my-bucketname", "my-objectname", bais, bais.available(), ssePut);
      System.out.println("my-objectname is uploaded successfully");
        
      minioClient.copyObject("my-bucketname", "my-objectname", sseSource, "my-destbucketname",
                             "my-objectname-copy", null, sseTarget);

      bais.close();

      System.out.println("my-objectname-copy copied to my-destbucketname successfully.");
    } catch (MinioException e) {
      System.out.println("Error occurred: " + e);
    }
    System.out.println("finished");
  }
226382
public function applicationConsole()
    {
        $this->setIsCli(true);
        $config = $this->getConfigArray();
        $config['defaultRoute'] = 'help';
        if (isset($config['components'])) {
            if (isset($config['components']['composition'])) {
                unset($config['components']['composition']);
            }
        }
        
        $this->includeYii();

        $baseUrl = null;
        if (isset($config['consoleBaseUrl'])) {
            $baseUrl = $config['consoleBaseUrl'];
        } elseif (isset($config['consoleHostInfo'])) {
            $baseUrl = '/';
        }
        
        $mergedConfig = ArrayHelper::merge($config, [
            'bootstrap' => ['luya\console\Bootstrap'],
            'components' => [
                'urlManager' => [
                    'class' => 'yii\web\UrlManager',
                    'enablePrettyUrl' => true,
                    'showScriptName' => false,
                    'baseUrl' => $baseUrl,
                    'hostInfo' => isset($config['consoleHostInfo']) ? $config['consoleHostInfo'] : null,
                ],
            ],
        ]);
        $this->app = new ConsoleApplication($mergedConfig);
        if (!$this->mockOnly) {
            exit($this->app->run());
        }
    }
543433
public function trackingCodeGenerator()
    {
        Piwik::checkUserHasSomeViewAccess();
        
        $view = new View('@CoreAdminHome/trackingCodeGenerator');
        $this->setBasicVariablesView($view);
        $view->topMenu  = MenuTop::getInstance()->getMenu();

        $viewableIdSites = APISitesManager::getInstance()->getSitesIdWithAtLeastViewAccess();

        $defaultIdSite = reset($viewableIdSites);
        $view->idSite = $this->idSite ?: $defaultIdSite;

        if ($view->idSite) {
            try {
                $view->siteName = Site::getNameFor($view->idSite);
            } catch (Exception $e) {
                // ignore if site no longer exists
            }
        }

        $view->defaultReportSiteName = Site::getNameFor($view->idSite);
        $view->defaultSiteRevenue = Site::getCurrencySymbolFor($view->idSite);
        $view->maxCustomVariables = CustomVariables::getNumUsableCustomVariables();

        $view->defaultSite = array('id' => $view->idSite, 'name' => $view->defaultReportSiteName);

        $allUrls = APISitesManager::getInstance()->getSiteUrlsFromId($view->idSite);
        if (isset($allUrls[1])) {
            $aliasUrl = $allUrls[1];
        } else {
            $aliasUrl = 'x.domain.com';
        }
        $view->defaultReportSiteAlias = $aliasUrl;

        $mainUrl = Site::getMainUrlFor($view->idSite);
        $view->defaultReportSiteDomain = @parse_url($mainUrl, PHP_URL_HOST);

        $dntChecker = new DoNotTrackHeaderChecker();
        $view->serverSideDoNotTrackEnabled = $dntChecker->isActive();

        return $view->render();
    }
50668
public function main()
    {
        if ($this->params['stagger']) {
            sleep(rand(0, $this->params['stagger']));
        }

        Configure::write('App.baseUrl', '/');
        $emailQueue = TableRegistry::getTableLocator()->get('EmailQueue', ['className' => EmailQueueTable::class]);
        $emails = $emailQueue->getBatch($this->params['limit']);

        $count = count($emails);
        foreach ($emails as $e) {
            $configName = $e->config === 'default' ? $this->params['config'] : $e->config;
            $template = $e->template === 'default' ? $this->params['template'] : $e->template;
            $layout = $e->layout === 'default' ? $this->params['layout'] : $e->layout;
            $headers = empty($e->headers) ? [] : (array)$e->headers;
            $theme = empty($e->theme) ? '' : (string)$e->theme;
            $viewVars = empty($e->template_vars) ? [] : $e->template_vars;
            $errorMessage = null;

            try {
                $email = $this->_newEmail($configName);

                if (!empty($e->from_email) && !empty($e->from_name)) {
                    $email->setFrom($e->from_email, $e->from_name);
                }

                $transport = $email->getTransport();

                if ($transport && $transport->getConfig('additionalParameters')) {
                    $from = key($email->getFrom());
                    $transport->setConfig(['additionalParameters' => "-f $from"]);
                }

                if (!empty($e->attachments)) {
                    $email->setAttachments($e->attachments);
                }

                $sent = $email
                    ->setTo($e->email)
                    ->setSubject($e->subject)
                    ->setEmailFormat($e->format)
                    ->addHeaders($headers)
                    ->setViewVars($viewVars)
                    ->setMessageId(false)
                    ->setReturnPath($email->getFrom());

                $email->viewBuilder()
                    ->setLayout($layout)
                    ->setTheme($theme)
                    ->setTemplate($template);

                $email->send();
            } catch (SocketException $exception) {
                $this->err($exception->getMessage());
                $errorMessage = $exception->getMessage();
                $sent = false;
            }

            if ($sent) {
                $emailQueue->success($e->id);
                $this->out('<success>Email ' . $e->id . ' was sent</success>');
            } else {
                $emailQueue->fail($e->id, $errorMessage);
                $this->out('<error>Email ' . $e->id . ' was not sent</error>');
            }
        }
        if ($count > 0) {
            $locks = collection($emails)->extract('id')->toList();
            $emailQueue->releaseLocks($locks);
        }
    }
1208279
static function Configshow(PHP_ParserGenerator_Config $cfp)
    {
        $fp = fopen('php://output', 'w');
        while ($cfp) {
            if ($cfp->dot == $cfp->rp->nrhs) {
                $buf = sprintf('(%d)', $cfp->rp->index);
                fprintf($fp, '    %5s ', $buf);
            } else {
                fwrite($fp,'          ');
            }
            $cfp->ConfigPrint($fp);
            fwrite($fp, "\n");
            if (0) {
                //SetPrint(fp,cfp->fws,$this);
                //PlinkPrint(fp,cfp->fplp,"To  ");
                //PlinkPrint(fp,cfp->bplp,"From");
            }
            $cfp = $cfp->next;
        }
        fwrite($fp, "\n");
        fclose($fp);
    }
208131
function DevAdapter (controller) {
    
    // Define or LEX/Bison grammar to handle device packet
    var grammar = {
    "lex": {
        "rules" : [ ["\\s+" , "/* skip whitespace */"]
            // Lex rules==> smallest token after big/generic ones ex: 'b,'/'b', [A,C]/[a-Z], etc ...
            ,['help\\b'             , "return 'HELP';"]
            ,['quit\\b'             , "return 'QUIT';"]
            ,['ctrl\\b'             , "return 'CTRL';"]
            ,['back\\b'             , "return 'BACK';"]
            
            ,['evt\\b'              , "return 'EVTS';"]
            ,['start\\b'            , "return 'STAR';"]
            ,['on\\b'               , "return 'STAR';"]
            ,['stop\\b'             , "return 'STOP';"]
            ,['off\\b'              , "return 'STOP';"]
            
            ,['dev\\b'              , "return 'DEV';"]
            ,['list\\b'             , "return 'LIS';"]
            ,['login\\b'            , "return 'LOG';" ]
            ,['logout\\b'           , "return 'OUT';" ]
            ,['track\\b'            , "return 'TRK';" ]
            ,['info\\b'             , "return 'INF';" ]
            ,['track\\b'            , "return 'TRK';" ]
            
            ,['snd\\b'              , "return 'SEND';"]
            ,['all\\b'              , "return 'ALL';" ]

            ,['db\\b'               , "return 'BASE';"]
            ,['create\\b'           , "return 'CREA';"]
            ,['remove\\b'           , "return 'DROP';"]
            ,['search\\b'           , "return 'SEAR';"]
            ,['show\\b'             , "return 'SEAR';"]
            ,['init\\b'             , "return 'INIT';"]

            ,['[\',\"]'             , "/* ignored */" ]
            ,['[^ ]+\\b'            , "return 'TXT';" ]
            ,['\\n'                 , "return 'EOL';" ]
            ,[';'                   , "return 'EOL';" ]
            ,['$'                   , "return 'EOL';" ]
        ]
    },  // end Lex rules
    
    "bnf": { // WARNING: only one space in between TOKEN ex: "STOP EOF"
        'data': [["EOL"        ,"this.cmd='EMPTY'; return (this);"]
            ,["QUIT EOL"   ,"this.cmd='QUIT'   ; return (this);"]
            ,["HELP EOL"   ,"this.cmd='HELP'   ; return (this);"]
            ,["CTRL EOL"   ,"this.cmd='CONTROL'; return (this);"]
            ,["BACK EOL"   ,"this.cmd='BACKEND'; return (this);"]
            ,["COMMD EOL"  ,"return (this);"]

            ,["DEV LIS EOL"  ,"this.cmd='DEVLIST' ; return (this);"]
            ,["DEV ALL EOL"  ,"this.cmd='DEVALL' ; return (this);"]
            ,["DEV LOG TXT EOL"   ,"this.cmd='DEVIN'  ; this.devid=$3; return (this);"]
            ,["DEV OUT TXT EOL"   ,"this.cmd='DEVOUT' ; this.devid=$3; return (this);"]
            ,["DEV OUT ALL EOL"   ,"this.cmd='DEVOUT' ; this.devid=0;  return (this);"]
            ,["DEV TRK TXT EOL"   ,"this.cmd='DEVTRCK'; this.devid=$3; return (this);"]
            ,["DEV TRK ALL EOL"   ,"this.cmd='DEVTRCK'; this.devid=0;  return (this);"]
            ,["DEV INF TXT EOL"   ,"this.cmd='DEVINFO'; this.devid=$3; return (this);"]

            ,["BASE INIT EOL"     ,"this.cmd='DBINIT' ;return (this);"]
            ,["BASE DROP TXT EOL" ,"this.cmd='DBDROP' ; this.devid=$3;return (this);"]
            ,["BASE SEAR TXT EOL" ,"this.cmd='DBSEAR' ; this.devid=$3; this.args=5; return (this);"]
            ,["BASE SEAR TXT TXT EOL" ,"this.cmd='DBSEAR' ; this.devid=$3; this.limit=parseInt($4); return (this);"]
            ,["BASE CREA TXT TXT TXT TXT TXT TXT TXT ARGS EOL","this.cmd='DBCREA' ; this.devid=$3; this.mmsi=$4; this.callsign=$5; this.cargo=$6; this.length=$7; this.width=$8; this.model=$9; return (this);"]

            ,["EVTS STAR EOL" ,"this.cmd='EVTSTART' ; return (this);"]
            ,["EVTS STOP EOL" ,"this.cmd='EVTSTOP'  ; return (this);"]
           ] 
        ,'COMMD':[
            ,["SEND TXT ALL ARGS"     , "this.cmd='SEND'; this.action=$2; this.devid=0;"]
            ,["SEND TXT TXT ARGS"     , "this.cmd='SEND'; this.action=$2; this.devid=$3;"]
            ,["SEND TXT ALL"          , "this.cmd='SEND'; this.action=$2; this.devid=0;"]
            ,["SEND TXT TXT"          , "this.cmd='SEND'; this.action=$2; this.devid=$3;"]
            ,["SEND HELP TXT"         , "this.cmd='SEND'; this.devid=$3; this.action='help';"]
        ]
        ,'ARGS':[
             ["TXT"                   , "this.args=[$1];"]
            ,["ARGS TXT"              , "this.args.push ($2);"]
        ]
    }};

    this.id        = controller.svc;
    this.uid       = "//" + controller.svcopts.adapter + "/" + controller.svc + ":" +  controller.svcopts.port;;
    this.control   = "tcpsock";
    this.info      = "Telnet";
    this.debug     = controller.svcopts.debug;  // inherit debug from controller
    this.Debug     (1,"uid=%s", this.uid);
    this.controller= controller;  // keep a link to device controller and TCP socket
    this.parser    = new Jison(grammar);
    this.request   = 0; // job request number for gateway queue
    try {
        this.prompt= controller.gateway.opts.name +"> ";
    } catch (err) {
        this.prompt= "GatewayTracker> ";
    }
}
409862
public function Index() {
      $this->AddJsFile('setup.js');
      
      $this->ApplicationFolder = 'dashboard';
      $this->MasterView = 'setup';
      // Fatal error if Garden has already been installed.
      $Installed = C('Garden.Installed');
      if ($Installed) {
         $this->View = "AlreadyInstalled";
         $this->Render();
         return;
      }
      
      if (!$this->_CheckPrerequisites()) {
         $this->View = 'prerequisites';
      } else {
         $this->View = 'configure';
         
         // Make sure the user has copied the htaccess file over.
         if (!file_exists(PATH_ROOT.'/.htaccess') && !$this->Form->GetFormValue('SkipHtaccess')) {
            $this->SetData('NoHtaccess', TRUE);
            $this->Form->AddError(T('You are missing Vanilla\'s .htaccess file.', 'You are missing Vanilla\'s <b>.htaccess</b> file. Sometimes this file isn\'t copied if you are using ftp to upload your files because this file is hidden. Make sure you\'ve copied the <b>.htaccess</b> file before continuing.'));
         }
         
         $ApplicationManager = new Gdn_ApplicationManager();
         
         // Need to go through all of the setups for each application. Garden,
         if ($this->Configure() && $this->Form->IsPostBack()) {
            // Get list of applications to enable during install
            // Override by creating conf/config.php and adding this setting before install begins
            $AppNames = C('Garden.Install.Applications', array('Conversations', 'Vanilla'));
            try {
               // Step through the available applications, enabling each of them.
               foreach ($AppNames as $AppName) {
                  $Validation = new Gdn_Validation();
                  $ApplicationManager->RegisterPermissions($AppName, $Validation);
                  $ApplicationManager->EnableApplication($AppName, $Validation);
               }
            } catch (Exception $ex) {
               $this->Form->AddError($ex);
            }
            if ($this->Form->ErrorCount() == 0) {
               // Save a variable so that the application knows it has been installed.
               // Now that the application is installed, select a more user friendly error page.
               $Config = array('Garden.Installed' => TRUE);
               SaveToConfig($Config);
               
               // Go to the dashboard
               Redirect('/settings/gettingstarted');
            }
         }
      }
      $this->Render();
   }
833657
def cli(**settings):
    
    setup_logging(settings)
    settings = setup_languages(settings)
    channels = setup_channel_map(settings)
    app = CriticApp(**dict(settings, channels=channels))
    if settings['sentry_dsn']:
        app.sentry_client = Client(settings['sentry_dsn'])
        logger.debug('Errors are reported to %s' % settings['sentry_dsn'])
    else:
        app.sentry_client = None

    if settings['version']:
        click.echo('Version %s' % critics.__version__)
        return
    if not (settings['ios'] or settings['android']):
        click.echo('Please choose either --ios or --android')
        return

    loop = tornado.ioloop.IOLoop.instance()

    if app.load_model():
        logger.debug('Model loaded OK, not skipping notify on first run')
        notify = True
    else:
        notify = False

    if settings['ios']:
        logger.info('Tracking IOS apps: %s', ', '.join(settings['ios']))
        itunes = tornado.ioloop.PeriodicCallback(partial(app.poll_store, 'ios'),
                                                 1000 * settings['beat'], loop)
        itunes.start()
    if settings['android']:
        logger.info('Tracking Android apps: %s', ', '.join(settings['android']))
        google_play = tornado.ioloop.PeriodicCallback(partial(app.poll_store, 'android'),
                                                      1000 * settings['beat'], loop)
        google_play.start()

    echo_channel_map(channels)

    if settings['ios']:
        app.poll_store('ios', notify=notify)
    if settings['android']:
        app.poll_store('android', notify=notify)

    if settings['stats']:
        port = int(settings['stats'])
        logger.debug('Serving metrics server on port %s' % port)
        start_http_server(port)

    if settings['daemonize']:
        loop.start()
633330
private void setupStormCode(String topologyId, String tmpJarLocation,
                                Map<Object, Object> stormConf, StormTopology topology, boolean update)
            throws Exception {
        String codeKey = StormConfig.master_stormcode_key(topologyId);
        String confKey = StormConfig.master_stormconf_key(topologyId);
        String codeKeyBak = StormConfig.master_stormcode_bak_key(topologyId);

        // in local mode there is no jar
        if (tmpJarLocation != null) {
            setupJar(tmpJarLocation, topologyId, update);
        }

        if (update) {
            backupBlob(codeKey, codeKeyBak, topologyId);
        }
        createOrUpdateBlob(confKey, Utils.serialize(stormConf), update, topologyId);
        createOrUpdateBlob(codeKey, Utils.serialize(topology), update, topologyId);
    }
1089820
function yy_r154(){
    if (!$this->security || $this->smarty->security_policy->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) {
        if (strcasecmp($this->yystack[$this->yyidx + -3]->minor,'isset') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'empty') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'array') === 0 || is_callable($this->yystack[$this->yyidx + -3]->minor)) {
            $func_name = strtolower($this->yystack[$this->yyidx + -3]->minor);
            if ($func_name == 'isset') {
                if (count($this->yystack[$this->yyidx + -1]->minor) == 0) {
                    $this->compiler->trigger_template_error ('Illegal number of paramer in "isset()"');
                }
                $par = implode(',',$this->yystack[$this->yyidx + -1]->minor);
                if (strncasecmp($par,'$_smarty_tpl->getConfigVariable',strlen('$_smarty_tpl->getConfigVariable')) === 0) {
                    self::$prefix_number++;
                    $this->compiler->prefix_code[] = '<?php $_tmp'.self::$prefix_number.'='.str_replace(')',', false)',$par).';?>';
                    $isset_par = '$_tmp'.self::$prefix_number;
                } else {
                    $isset_par=str_replace("')->value","',null,true,false)->value",$par);
                }
                $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". $isset_par .")";
            } elseif (in_array($func_name,array('empty','reset','current','end','prev','next'))){
                if (count($this->yystack[$this->yyidx + -1]->minor) != 1) {
                    $this->compiler->trigger_template_error ('Illegal number of paramer in "empty()"');
                }
                if ($func_name == 'empty') {
                    $this->_retvalue = $func_name.'('.str_replace("')->value","',null,true,false)->value",$this->yystack[$this->yyidx + -1]->minor[0]).')';
                } else {
                    $this->_retvalue = $func_name.'('.$this->yystack[$this->yyidx + -1]->minor[0].')';
                }
            } else {
                $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". implode(',',$this->yystack[$this->yyidx + -1]->minor) .")";
            }
        } else {
            $this->compiler->trigger_template_error ("unknown function \"" . $this->yystack[$this->yyidx + -3]->minor . "\"");
        }
    }
    }
1015081
public function header()
    {
        $this->SetY(4);
        
        $this->MultiCell(50, 0, '<img src="' . $this->logoPath . '">', 0, 'L', 0, 0, '', '', true, null, true);
        $this->setFontSize(10);
        
        $convertedHeaderRight = '<br />'.Configure::read('appDb.FCS_APP_NAME').'<br />'.Configure::read('appDb.FCS_APP_ADDRESS').'<br />'.Configure::read('appDb.FCS_APP_EMAIL');
        $convertedHeaderRight = Configure::read('app.htmlHelper')->prepareDbTextForPDF($convertedHeaderRight);
        
        // add additional line break on top if short address
        $lineCount = substr_count($convertedHeaderRight, "\n");
        if ($lineCount < 5) {
            $convertedHeaderRight = "\n" . $convertedHeaderRight;
        }
        
        $this->headerRight = $convertedHeaderRight;
        
        $this->MultiCell(145 - $this->lMargin, 0, $this->headerRight, 0, 'R', 0, 1, '', '', true);
        
        $this->SetY(36);
        $this->drawLine();
    }
1357726
private function publishAppBaseController()
    {
        $templateHelper = new TemplatesHelper();
        $templateData = $templateHelper->getTemplate('AppBaseController', 'controller');

        $templateData = GeneratorUtils::fillTemplate(CommandData::getConfigDynamicVariables(), $templateData);

        $fileName = 'AppBaseController.php';

        $filePath = Config::get('generator.path_controller', app_path('Http/Controllers/'));

        $fileHelper = new FileHelper();
        $fileHelper->writeFile($filePath.$fileName, $templateData);
        $this->comment('AppBaseController generated');
        $this->info($fileName);
    }
648256
public function update_9001001() {
    $this->updater->syncWithTemplate('.gitignore', TRUE);
    $composer_json = $this->updater->getComposerJson();
    if (isset($composer_json['extra']['installer-paths']['drush/contrib/{$name}'])) {
      unset($composer_json['extra']['installer-paths']['drush/contrib/{$name}']);
    }
    $composer_json['extra']['installer-paths']['drush/Commands/{$name}'][] = 'type:drupal-drush';
    $this->updater->writeComposerJson($composer_json);
    $messages = [
      "Your composer.json file has been modified to be compatible with Drush 9.",
      "You must execute `composer update --lock` to update your lock file.",
    ];
    $formattedBlock = $this->updater->getFormatter()->formatBlock($messages, 'ice');
    $this->updater->getOutput()->writeln("");
    $this->updater->getOutput()->writeln($formattedBlock);
    $this->updater->getOutput()->writeln("");
  }
47728
function intro() {
  // @TODO: How best to pull in .scss color data export to reference branch colors below?
  const b = chalk.hex('#545DA6'); // indigo, light
  const y = chalk.hex('#ffcc4d'); // yellow, base

  const CLI_TITLE = chalk.bold.underline('Bolt-CLI');
  const CLI_DESCRIPTION = 'Welcome to the Bolt CLI ⚡️  Have fun!';
  const CLI_USAGE = 'Usage: `bolt <command> [options ...]`';
  const HELP_USAGE = 'Help: `bolt -h` or `bolt <command> --help`';

  // const HELP_HEADER_BACKUP = `
  //     /˜˜˜˜˜˜˜˜˜˜˜˜\
  //    / /˜˜˜˜/|˜˜˜˜\ \
  //   / /    / |     \ \
  //  / /    /  |____  \ \
  // / /    /       /   \ \
  // \ \   /____   /    / /
  //  \ \      |  /    / /
  //   \ \     | /    / /
  //    \ \____|/____/ /
  //     \____________/
  // `

  // ^ Colorized + partially filled in version of logo above
  const HELP_HEADER = `
    ${b('///////|\\\\\\\\\\\\')}
   ${b('///˜˜˜˜')}${y('/|')}${b('˜˜˜˜\\\\\\')}
  ${b('///    ')}${y('//|')}${b('     \\\\\\')}     ${CLI_TITLE}
 ${b('///    ')}${y('///|____')}${b('  \\\\\\')}
${b('///    ')}${y('/////////')}${b('   \\\\\\')}   ${CLI_DESCRIPTION}
${b('\\\\\\   ')}${y('/////////')}${b('    ///')}
 ${b('\\\\\\      ')}${y('|///')}${b('    ///')}    ${CLI_USAGE}
  ${b('\\\\\\     ')}${y('|//')}${b('    ///')}     ${HELP_USAGE}
   ${b('\\\\\\____')}${y('|/')}${b('____///')}
    ${b('\\\\\\\\\\\\|///////')}
`;

  info(HELP_HEADER);
}