# \cge_cached_remote_file

A class to copy a remote URL to a local, temporary location for a specified amount of time.

## Summary

Methods
Properties
Constants
__construct()
get_source()
get_dest()
get_cache_timelimit()
set_cache_timelimit()
file()
file_get_contents()
md5()
size()
cleanup()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

File
  lib/class.cge_cached_remote_file.php
Package
  \CGExtensions
Class hierarchy
  \cge_cached_remote_file

## Tags

todo |

## Methods

### __construct()

    __construct(string $src, int $timelimit, string $dest)

Constructor

#### Parameters

string | $src | The source URL
int | $timelimit | The amount of time in minutes before this file must be refreshed. Default is 24 hours.
string | $dest | Optional destination filename.

#

## Tags

todo |

### get_source()

    get_source() : string

Return the source URL

#### Returns

string

#

## Tags

todo |

### get_dest()

    get_dest() : string

Get the destination filename

#### Returns

string

#

## Tags

todo |

### get_cache_timelimit()

    get_cache_timelimit() : int

Get the time limit

#### Returns

int

#

## Tags

todo |

### set_cache_timelimit()

    set_cache_timelimit(int $minutes)

Adjust the time limit

#### Parameters

int | $minutes | The number of minutes before this item needs refreshing

#

## Tags

todo |

### file()

    file() : array

Return the entire cached file into an array

#### Returns

array

#

See also

## Tags

todo |

### file_get_contents()

    file_get_contents() : string

Return the contents of the cached file as a single string

#### Returns

string

#

## Tags

todo |

### md5()

    md5() : string

Return the md5 signature of the cached file

#### Returns

string

#

## Tags

todo |

### size()

    size() : int

Get the size of the cached file

#### Returns

int

#

## Tags

todo |

### cleanup()

    cleanup()

Clean up the cached file.

#

## Tags

todo |

### class.cge_cached_remote_file.php