library/Garp/Cli/Command/Image.php
protected function _generateScaledImagesForTemplate($template, $overwrite = false) {
        Garp_Cli::lineOut('Generating scaled images for template "' . $template . '".');

        $imageModel = new Model_Image();
        $records    = $imageModel->fetchAll();
        $file       = new Garp_Image_File(Garp_File::FILE_VARIANT_UPLOAD);
        $scaler     = new Garp_Image_Scaler();
        $success    = 0;

        foreach ($records as $record) {
            $success += (int)$this->_scaleDatabaseImage(
                $record, $file, $scaler, $template, $overwrite
            );
        }

        Garp_Cli::lineOut('Done scaling images for template "' . $template . '".');
        return $success == count($records);
    }
protected function _generateScaledImagesForTemplate($template, $overwrite = false) {
        Garp_Cli::lineOut('Generating scaled images for template "' . $template . '".');

        $imageModel = new Model_Image();
        $records    = $imageModel->fetchAll();
        $file       = new Garp_Image_File(Garp_File::FILE_VARIANT_UPLOAD);
        $scaler     = new Garp_Image_Scaler();
        $success    = 0;

        foreach ($records as $record) {
            $success += (int)$this->_scaleDatabaseImage(
                $record, $file, $scaler, $template, $overwrite
            );
        }

        Garp_Cli::lineOut('Done scaling images for template "' . $template . '".');
        return $success == count($records);
    }
protected function _generateScaledImagesForTemplate ( $ template , $ overwrite = false ) { Garp_Cli :: lineOut ( 'Generating scaled images for template "' . $ template . '".' ) ; $ imageModel = new Model_Image ( ) ; $ records = $ imageModel -> fetchAll ( ) ; $ file = new Garp_Image_File ( Garp_File :: FILE_VARIANT_UPLOAD ) ; $ scaler = new Garp_Image_Scaler ( ) ; $ success = 0 ; foreach ( $ records as $ record ) { $ success += ( int ) $ this -> _scaleDatabaseImage ( $ record , $ file , $ scaler , $ template , $ overwrite ) ; } Garp_Cli :: lineOut ( 'Done scaling images for template "' . $ template . '".' ) ; return $ success == count ( $ records ) ; }
Generate scaled versions of all source files, along given template.

@param string $template Template name, as it appears in configuration.
@param bool $overwrite
@return bool
Generate scaled versions of all source files along given template .