33 lines
		
	
	
		
			572 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			572 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace Picea\Caching;
 | |
| 
 | |
| class Memory {
 | |
| 
 | |
|     protected string $cachePath = "";
 | |
| 
 | |
|     public function __construct(string $cachePath)
 | |
|     {
 | |
|         $this->cachePath = $cachePath;
 | |
|     }
 | |
| 
 | |
|     public function loadFile(string $fileName) : bool
 | |
|     {
 | |
|         if ( file_exists($path = $this->filePath($fileName)) ) {
 | |
|             require_once($path);
 | |
|         }
 | |
| 
 | |
|         return false;
 | |
|     }
 | |
| 
 | |
|     public function saveFile(string $fileName) : bool
 | |
|     {
 | |
| 
 | |
|     }
 | |
| 
 | |
|     public function filePath(string $fileName) : string
 | |
|     {
 | |
|         return $this->cachePath . $fileName;
 | |
|     }
 | |
| }
 |