ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 7656


Ignore:
Timestamp:
Jul 8, 2008, 1:21:20 AM (13 years ago)
Author:
ebihara
Message:

OpenPNE_Img_Cache を作成し、 OpenPNE_Img_Generator::$cache_dir を OpenPNE_Img_Cache::$cache_dir に移動

Location:
OpenPNE/branches/work/ebihara/prj_renew_OpenPNE_Img/webapp/lib/OpenPNE/Img
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/work/ebihara/prj_renew_OpenPNE_Img/webapp/lib/OpenPNE/Img/Generator.php

    r7640 r7656  
    3131    var $height = 0;
    3232
    33 
    3433    /**
    3534     * @var string
     
    4443    var $output_format;
    4544
    46 
    4745    /**
    4846     * @var string
    4947     * @access protected
    5048     */
    51     var $cache_dir;
    52 
    53     /**
    54      * @var string
    55      * @access protected
    56      */
    5749    var $cache_fullpath;
    5850
     
    6759     */
    6860    var $allowed_size;
     61
     62    /**
     63     * @var OpenPNE_Img_Cache
     64     * @access public
     65     */
     66    var $cache;
    6967
    7068    /**
     
    8482        }
    8583
    86         if (!empty($options['cache_dir'])) {
    87             $this->cache_dir = $options['cache_dir'];
    88         }
     84        require_once 'OpenPNE/Img/Cache.php';
     85        $this->cache =& new OpenPNE_Img_Cache($options);
    8986    }
    9087
     
    109106
    110107        // キャッシュを生成
    111         $this->createCacheSubdir($this->cache_dir);
     108        $this->createCacheSubdir($this->cache->getCacheDir());
    112109        if ($output_img) {
    113110            $this->createCache($output_img);
     
    202199    {
    203200        $path = OpenPNE_Img::get_cache_path($filename, $this->width, $this->height, $this->getOutputFormat());
    204         $this->cache_fullpath = $this->cache_dir . '/' . $path;
     201        $this->cache_fullpath = $this->cache->getCacheDir() . '/' . $path;
    205202    }
    206203
  • OpenPNE/branches/work/ebihara/prj_renew_OpenPNE_Img/webapp/lib/OpenPNE/Img/Generator/ImageMagick.php

    r7551 r7656  
    4444        $path = sprintf('%s/w_h_raw/%s', $format, $file);
    4545
    46         $this->raw_cache_fullpath = $this->cache_dir . '/' . $path;
     46        $this->raw_cache_fullpath = $this->cache->getCacheDir() . '/' . $path;
    4747    }
    4848
Note: See TracChangeset for help on using the changeset viewer.