Craft\Imager_TinyPngTask::runStep PHP Méthode

runStep() public méthode

public runStep ( integer $step ) : boolean
$step integer
Résultat boolean
    public function runStep($step)
    {
        if (is_array($this->_paths)) {
            $path = $this->_paths[$step];
        } else {
            $path = $this->_paths;
        }
        // Run TinyPNG
        craft()->imager->runTinypng($path);
        // if AWS is enabled, upload file
        if (craft()->imager->getSetting('awsEnabled')) {
            try {
                craft()->imager_aws->uploadToAWS($path);
            } catch (\Exception $e) {
                ImagerPlugin::log("Upload to AWS failed for {$path} in Imager_TinyPngTask: " . $e->getMessage(), LogLevel::Error);
            }
        }
        return true;
    }