当前位置: 首页>>代码示例>>PHP>>正文


PHP Index::info方法代码示例

本文整理汇总了PHP中Index::info方法的典型用法代码示例。如果您正苦于以下问题:PHP Index::info方法的具体用法?PHP Index::info怎么用?PHP Index::info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Index的用法示例。


在下文中一共展示了Index::info方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 /**
  * Runs the CLI process
  *
  * @param array $args CLI arguments
  *
  * @return mixed
  */
 public function run(array $args)
 {
     Index::info('Usage: `cradle package <vendor/package> <command>`  - Runs a package event');
     Index::info('Usage: `cradle <vendor/package> <command>`          - Runs a package event');
     Index::info('Usage: `cradle event <event name> <json|query>`     - Runs an event');
     Index::info('Usage: `cradle <event name> <json|query>`           - Runs an event');
 }
开发者ID:cradlephp,项目名称:command-line,代码行数:14,代码来源:Help.php

示例2: run

 /**
  * Runs the CLI process
  *
  * @param array $args CLI arguments
  *
  * @return mixed
  */
 public function run(array $args)
 {
     Index::info('Help Menu');
     Index::info('- `eve generate <schema*> <namespace>`    Generates files based on schema');
     Index::info('- `eve database <schema*>`                Generates database table/s schema');
     Index::info('- `eve install`                           Generates default framework files');
     Index::info('- `eve job <name*> <data*>`               Executes a job');
     Index::info('- `eve queue <name*> <data*>`             Queues a job');
     die(0);
 }
开发者ID:javinc,项目名称:Framework,代码行数:17,代码来源:Help.php

示例3: run

 /**
  * Runs the CLI Generate process
  *
  * @param array $args CLI arguments
  *
  * @return void
  */
 public function run($args)
 {
     $this->setup($args);
     //normalize the schema
     $this->fixSchema();
     Index::info('Creating database table.');
     $this->createTable();
     Index::success('`' . $this->schema['name'] . '` has been successfully created.');
     $this->createRelations();
     foreach ($this->schema['relations'] as $table => $many) {
         Index::success('`' . $this->schema['name'] . '_' . $table . '` has been successfully created.');
     }
     if (!isset($this->schema['fixture']) || !is_array($this->schema['fixture'])) {
         return;
     }
     Index::info('Fixtures found. Installing');
     $this->insertFixtures();
     Index::success('Fixtures has been successfully inserted.');
     die(0);
 }
开发者ID:javinc,项目名称:Framework,代码行数:27,代码来源:Database.php

示例4: copy

 /**
  * Copy the contents from to
  *
  * @return Eve\Framework\Cli\Generate
  */
 public function copy($source, $destination)
 {
     $contents = $this('file', $source)->getContent();
     $template = $this->engine->compile($contents);
     $code = $template($this->schema);
     $code = str_replace('\\\\', '\\', $code);
     $code = str_replace('\\}', '}', $code);
     $code = str_replace('\\{', '{', $code);
     $code = str_replace('{ ', '{', $code);
     $code = preg_replace('/\\n\\s*\\n\\s*\\n/', "\n\n", $code);
     Index::info('Installing to' . $destination);
     $this('file', $destination)->setContent($code);
     return $this;
 }
开发者ID:javinc,项目名称:Framework,代码行数:19,代码来源:Generate.php

示例5: run

 /**
  * Runs the CLI Install process
  *
  * @param array $args CLI arguments
  *
  * @return void
  */
 public function run($args)
 {
     $this->setup($args);
     Index::info('Downloading files..');
     $this('curl')->setUrl('https://github.com/Eve-PHP/Shade/archive/master.zip')->setFile($this->file)->setFollowLocation(true)->setSslVerifyPeer(false)->send();
     fclose($this->file);
     Index::info('Extracting files..');
     try {
         $zip = new \ZipArchive();
         $resource = $zip->open($this->cwd . '/tmp/framework.zip');
         if (!$resource) {
             throw new \Exception('Cannot extract data. Aborting.');
         }
         $zip->extractTo($this->cwd . '/tmp');
         $zip->close();
         Index::info('Copying files..');
         $root = $this->cwd . '/tmp/Shade-master';
         $files = $this('folder', $root)->getFiles(null, true);
         foreach ($files as $file) {
             $destination = str_replace('/tmp/Shade-master', '', $file->get());
             $folder = $this('file', $destination)->getFolder();
             if (!is_dir($folder)) {
                 mkdir($folder, 0777, true);
             }
             copy($file->get(), $destination);
         }
     } catch (\Exception $e) {
         Index::error($e->getMessage(), false);
     }
     Index::info('Cleaning up ..');
     $tmp = $this('folder', $this->cwd . '/tmp');
     $files = $tmp->getFiles(null, true);
     $folders = $tmp->getFolders(null, true);
     $folders = array_reverse($folders);
     foreach ($files as $file) {
         $file->remove();
     }
     foreach ($folders as $folder) {
         $folder->remove();
     }
     $tmp->remove();
     Index::info('Copying settings..');
     $this('file', $this->cwd . '/settings/databases.php')->setData($this->databases);
     copy($this->cwd . '/settings/sample.config.php', $this->cwd . '/settings/config.php');
     copy($this->cwd . '/settings/sample.test.php', $this->cwd . '/settings/test.php');
     Index::info('Creating database..');
     $this->install();
     Index::success('Database created.');
     Index::warning('Please set the configs in the settings folder');
     Index::system('Control Login is: admin@openovate.com / admin');
     Index::success('Framework installation complete!');
     die(0);
 }
开发者ID:javinc,项目名称:Framework,代码行数:60,代码来源:Install.php


注:本文中的Index::info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。