Changeset 3335

Show
Ignore:
Timestamp:
12/20/07 02:11:07 (6 years ago)
Author:
takuya
Message:

/lang/php/Cache:ファイル追加

Location:
lang/php/Cache/trunk/Handler/PlugIn
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/php/Cache/trunk/Handler/PlugIn/JSON.php

    r2154 r3335  
    1414    * @access public 
    1515    */ 
    16     public function __construct() 
     16    public function __construct($assoc=false) 
    1717    { 
    18         //do nothing 
     18        $this->assoc = $assoc; 
    1919    } 
    2020    /**  
     
    2626    public function beforeWrite( $data ) 
    2727    { 
    28  
     28                return json_encode($data, $this->$assoc); 
    2929    } 
    3030    /**  
     
    3636    public function afterRead( $data ) 
    3737    { 
    38  
     38                return json_decode($data, $this->$assoc); 
    3939    } 
    4040 
  • lang/php/Cache/trunk/Handler/PlugIn/Yaml.php

    r2154 r3335  
    1616    public function __construct() 
    1717    { 
    18         //do nothing 
     18        //Yamlパーサーを選択する 
     19        //TODO:YAMLのパーサーを選択するロジック 
    1920    } 
    2021    /**  
     
    2627    public function beforeWrite( $data ) 
    2728    { 
    28  
     29                return  Spyc::YAMLDump($array); 
    2930    } 
    3031    /**  
     
    3637    public function afterRead( $data ) 
    3738    { 
    38  
     39                return  Spyc::YAMLLoad($data); 
    3940    } 
    4041 
    41 }<?php 
     42} 
    4243 
    4344