nielse63 / php-image-cache

Image Cache is a very simple PHP class that accepts an image source and will compress and cache the file, move it to a new directory, and returns the new source for the image.
http://nielse63.github.io/php-image-cache
Other
457 stars 105 forks source link

Docs do not match code at all #10

Closed manticorp closed 10 years ago

manticorp commented 10 years ago

The docs located at:

http://nielse63.github.io/php-image-cache/

Do not match the functionality at all. For example:

$image = new ImageCache(
    $filebase = '', $dir = null, $create_dir = true, $opts = array()
);
/**
 * @param $filebase (string) - The base URL that will be included in the final output for the image source; primarily used if you want the image source to be an absolute URL; defaults to relative.
 * @param $dir (string/null) - The base directory that houses the image being compressed; defaults to the location of ImageCache.php.
 * @param $create_dir (bool) - Whether or not to create a new directory for the compressed images; defaults to "true"
 * @param $opts (array) - An array of available options that the user can include to the overwrite default settings.  Mostly just for forward-compatibility at the moment.
 */

In the code the constructor actually accepts 3 parameters, 2 of which will be deprecated soon!

Very confusing.

Error behaviour is also completely undocumented.

nielse63 commented 10 years ago

Thanks for the feedback. I'll be cleaning this up soon.

Thanks.

nielse63 commented 10 years ago

New documentation and info is listed on the github.io page. Thanks for the feedback, @manticorp.