コード例 #1
0
 protected function _init($path = 'system/queries', $parent_path = NULL)
 {
     if (!isset($parent_path)) {
         $parent_path = Config::get('base_path');
     }
     parent::_init($path, $parent_path);
 }
コード例 #2
0
ファイル: LazyLoad.php プロジェクト: ControleOnline/core
 public static function imgLazyLoad($htmlContent, $config)
 {
     self::setContent($htmlContent);
     self::$config = $config;
     if (self::$config['LazyLoadImages'] && !self::ignoreLazyLoad($htmlContent)) {
         self::removeImagesFromScripts();
         $regex = '/<img((?:.)*?)>/smix';
         $content = preg_replace_callback($regex, function ($script) {
             return LazyLoad::prepareImg($script);
         }, $htmlContent);
         self::setContent($content ?: $htmlContent);
         self::returnImagesFromScripts();
     }
     return self::getContent();
 }