Development

#3005 (sfFileCache: Method read() phpdoc)

You must first sign up to be able to contribute.

Ticket #3005 (closed documentation: fixed)

Opened 9 months ago

Last modified 9 months ago

sfFileCache: Method read() phpdoc

Reported by: Markus.Staab Assigned to: fabien
Priority: minor Milestone:
Component: cache Version: 1.1.0 DEV
Keywords: Cc:
Qualification: Design decision

Description

it says

 /**
  * Reads the cache file and returns the content.
  *
  * @param string The file path
  * @param mixed  The type of data you want to be returned
  *               sfFileCache::READ_DATA: The cache content
  *               sfFileCache::READ_TIMEOUT: The timeout
  *
  * @return string The content of the cache file.
  *
  * @throws sfCacheException
  */

but has to be

 /**
  * Reads the cache file and returns the content.
  *
  * @param string The file path
  * @param mixed  The type of data you want to be returned
  *               sfFileCache::READ_DATA: The cache content
  *               sfFileCache::READ_TIMEOUT: The timeout
  *               sfFileCache::READ_LAST_MODIFIED: The last modification timestamp
  *
  * @return string The content of the cache file.
  *
  * @throws sfCacheException
  */

Flag READ_LAST_MODIFIED is missing..

Change History

02/25/08 13:27:42 changed by Markus.Staab

  • type changed from defect to documentation.

02/25/08 13:29:06 changed by Markus.Staab

also this class uses a mixture of camel-case and underscore nameing convention for the methods..

see getTimeout() setcache_dir()

02/25/08 17:57:27 changed by FabianLange

  • status changed from new to closed.
  • version changed from 1.0.10 to 1.1.0.
  • resolution set to fixed.
  • qualification changed from Unreviewed to Design decision.

I added the phpdoc.

I think Fabien used setcache_dir() intentionally. It looks a bit strange I admit, but the option used there is "cache_dir" I would at least expect it to be setCache_dir but as fabien preserved the lowercase "cache_dir" troughout the class I guess the method name is okay as is.

Set the version to 1.1 because those constants were not in use in 1.0.x