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


PHP io::info方法代码示例

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


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

示例1: checkCondition

 /**
  * Проверяет условия указанные в теге condition.
  *
  * В данной момент реализована проверка установленного пакета
  *
  * @param DOMNode 
  * @return bool
  */
 private function checkCondition(DOMNode $node)
 {
     IO::info('Check Condition ', false);
     $attr = $node->attributes;
     $packageName = is_null($attr->getNamedItem('package')) ? null : $attr->getNamedItem('package')->nodeValue;
     if (!is_null($packageName)) {
         $version = is_null($attr->getNamedItem('version')) ? null : $attr->getNamedItem('version')->nodeValue;
         $rel = is_null($attr->getNamedItem('rel')) ? null : Deps::normalizeRel($attr->getNamedItem('rel')->nodeValue);
         if (is_null($version) && $rel != '!=') {
             $version = '0.0';
             $rel = '>=';
         } elseif (is_null($rel)) {
             $rel = '=';
         }
         io::info($packageName . ' ' . $rel . ' ' . $version . "\t", false);
         $p = PackageManager::getInstalledPackage($packageName);
         if ($rel == '!=') {
             $res = $p === false;
         } elseif ($p !== false) {
             $res = version_compare($p->version, $version, $rel);
         } else {
             $res = false;
         }
         io::info('', $res ? IO::MESSAGE_OK : IO::MESSAGE_FAIL);
         return $res;
     }
 }
开发者ID:point,项目名称:cassea,代码行数:35,代码来源:Deployer.php

示例2: framework

 public function framework()
 {
     /*
      * You can echo HTML and other information directly from  models or controllers
      * however it is usually better to create views for displaying model data.
      */
     // Session tracking
     io::library('session');
     // HTML Header
     echo '<h2>Internal Framework Information</h2>';
     echo '<p>This method may be useful during development. It contains a list of available helpers, libraries, paths to the various folders, routing information, files that have been loaded, as well as all the objects loaded by Ornithopter.io ...</p>';
     // Explain a little bit
     echo '<blockquote>Accessible by calling <strong class="io">io::info()</strong> within Ornithopter.io</blockquote>';
     // Like so...
     var_dump(io::info());
 }
开发者ID:olscore,项目名称:ornithopter.io,代码行数:16,代码来源:demo.php

示例3: push

 /**
  * Добавление пакета в очередь
  *
  * @param Package $f package to add
  * @pad string optiontal parametr to finest output
  * @return true if pckage added and all depnedencies is statisfied.
  */
 private function push(Package $f, $deep = 1, $pad = '')
 {
     io::info($pad . '    ' . $f->name . ' ' . $f->version . '{');
     $oldPad = $pad . '    ';
     $pad .= "\t";
     $packageDeps = $f->deps;
     // check env dependencie
     static $cached = array();
     if (!isset($caches[$f->name][$f->version])) {
         if (!$this->checkEnviroment($packageDeps)) {
             return false;
         }
     }
     $caches[$f->name][$f->version] = true;
     foreach ($packageDeps['packages'] as $nvr) {
         //io::out($pad."deps: ".$nvr['name'].' '.$nvr['rel'].' '.$nvr['version']);
         if (($d = $this->searchInQueue($nvr['name'])) === false) {
             $d = new DepsItem($nvr['name']);
             $this->queue[] = $d;
         }
         io::info($pad . $d->getPackageName() . ': ( ' . $d->getFilteredStr() . ' )', false);
         io::info(' ' . $nvr['rel'] . ' ' . $nvr['version'] . '   : ', false);
         if (!$d->merge($nvr['version'], $nvr['rel'])) {
             io::info('~RED~Unable merge version. trying other one.~~~');
         } else {
             io::info($d->getFilteredStr());
         }
         $d->updateDeep($deep);
         while (!is_null($fpi = $d->popNext()) && !$this->push($fpi, $deep + 1, $pad)) {
         }
         // доступные версии пакета закончились раньше чем push вернул true;
         // те неудовлетворенная зависимость.
         if (is_null($fpi)) {
             return $d->unmerge();
         }
         // false
         // найден пакет удовлетворяющий зависимостям.
         // запихиваем его обратно зависимость
         $d->pushBack($fpi);
     }
     io::info($oldPad . '}');
     return true;
 }
开发者ID:point,项目名称:cassea,代码行数:50,代码来源:Deps.php

示例4: del

 public function del()
 {
     if (!count($this->list)) {
         return;
     }
     if (is_null($this->backup)) {
         foreach ($this->list as $l) {
             $olist[] = is_dir($this->target->getFile($l)) ? $this->target->getDir($l) : $this->target->getFile($l);
         }
     } else {
         $olist = $this->backup();
     }
     //io::out(substr($path, strlen($this->target))."\t" , false);
     if (count($olist)) {
         foreach ($olist as $obj) {
             io::info("\t[~PURPLE~D~~~] " . substr($obj, strlen($this->target)));
             $obj->delete();
         }
     }
 }
开发者ID:point,项目名称:cassea,代码行数:20,代码来源:FileUpdater.php

示例5: rename

 private function rename($param)
 {
     if (!isset($param['to'])) {
         throw new ConfigTaskException('New Key name( \\"to\\") not set in "' . __FUNCTION__ . '" operation. File(' . basename($this->file) . ')');
     }
     $to = $param['to'];
     if (!isset($param['key'])) {
         throw new ConfigTaskException('Key name not set in "' . __FUNCTION__ . '" operation. File(' . basename($this->file) . ')');
     }
     $key = $param['key'];
     if (!isset($param['section'])) {
         foreach ($this->pattern as $sect => $keys) {
             if (isset($this->pattern[$sect][$key])) {
                 $param['section'] = $sect;
                 $this->rename($param);
             }
         }
         return;
     }
     $section = $param['section'];
     io::info("\t[~PURPLE~R~~~] [" . $section . "] " . $key);
     if (!isset($this->pattern[$section][$key])) {
         throw new ConfigTaskException('Config key [' . $section . '][' . $key . '] not found', IO::MESSAGE_WARN);
     }
     $this->addRollbackOperation('rename', array('key' => $to, 'to' => $key, 'section' => $section));
     $lines = $this->lines;
     $li = $this->k2l[$section][$key];
     $a = explode('=', $lines[$li]);
     $a[0] = $to . ' ';
     $lines[$li] = implode('=', $a);
     $newini = $this->getPattern($lines);
     $diff = self::diffArray($newini, $this->pattern);
     if ($diff['del'] != 1 || $diff['add'] != 1 || $diff['modify'] != 0) {
         throw new ConfigTaskException('Error while rename constant. Given diff: ' . implode('-', $diff));
     }
     $this->lines = $this->processLines($lines, $newK2l);
     $this->pattern = $newini;
     $this->k2l = $newK2l;
 }
开发者ID:point,项目名称:cassea,代码行数:39,代码来源:ConfigTask.php

示例6: error_404

 /**
  * Public function the developer can call for sending a 404 error. This is
  * the default error which uses 404.html in the root directory. If the file
  * is not provided PHP will still send a 404 HEADER to the browser.
  */
 public static function error_404($path = false)
 {
     // Send a 404 HTTP HEADER error code to the browser
     header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
     // Include the 404.html file or exit on failure
     (include $path ?: \io::info()['paths']['root'] . '/404.html') ?: exit;
     // Exit anyways
     exit;
 }
开发者ID:olscore,项目名称:ornithopter.io,代码行数:14,代码来源:web.php


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