for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* Copyright (c) Arnaud Ligny <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cecil\Step;
use Cecil\Util;
/**
* Copy assets files.
class AssetsCopy extends StaticCopy
{
protected $count = 0;
* {@inheritdoc}
public function init($options)
$this->process = true;
}
public function process()
call_user_func_array($this->builder->getMessageCb(), ['COPY', 'Copying assets']);
$cacheDirImages = $this->config->getCachePath().'/'.(string) $this->config->get('cache.images.dir');
if ($this->copy($cacheDirImages, 'images')) {
if ((bool) $this->config->get('cache.enabled') === false) {
Util::getFS()->remove($cacheDirImages);
call_user_func_array($this->builder->getMessageCb(), ['COPY_PROGRESS', 'Start copy', 0, $this->count]);
call_user_func_array($this->builder->getMessageCb(), ['COPY_PROGRESS', 'Copied', $this->count, $this->count]);