method process documentation in bbn\Cdn
function()
{
$code = '';
// One file at least
if ($this->cfg['num']) {
// Cache should be checked quickly if in prod, deeply if in dev
/** Do not check the files, send the cache file if not in dev */
if (!$this->checkCache($this->cfg['test'])) {
$c =& $this->cfg;
// New cache file time
$this->file_mtime = time();
if ($c['is_component']) {
$code = $this->getComponents();
}
else {
if ($c['grouped']) {
$codes = $this->cp->groupCompile($this->mode === 'css' ? $c['content']['css'] : $c['content']['js'], $c['test']);
}
elseif ($this->mode) {
$codes = $this->cp->compile($this->mode === 'css' ? $c['content']['css'] : $c['content']['js'], $c['test']);
}
if ($codes) {
if ($this->mode === 'css') {
$code = $this->getCss($codes);
}
elseif ($this->mode === 'js') {
$code = $this->getJs($codes, empty($c['nocompil']) ? true : false);
}
}
}
if ($code) {
if (defined('BBN_IS_DEV') && BBN_IS_DEV) {
$code = sprintf(
self::HEAD_COMMENT,
$this->furl . $this->request,
$c['test'] ? self::TEST_ST : self::NO_TEST_ST
) . $code;
}
file_put_contents($c['cache_file'], $code);
file_put_contents($c['cache_file'] . '.gzip', gzencode($code));
}
}
}
return $this;
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions