Do a pass on the gallery::find_file and Gallery_View::{script,css} PHPdoc.

This commit is contained in:
Bharat Mediratta
2009-09-28 19:30:34 -07:00
parent f9b351559c
commit a0a62a0992
2 changed files with 10 additions and 11 deletions
+4 -5
View File
@@ -80,15 +80,14 @@ class gallery_Core {
}
/**
* Provide a wrapper function for Kohana::find_file, that first strips the extension and
* then calls the Kohana::find_file supply that extension
* Provide a wrapper function for Kohana::find_file that first strips the extension and
* then calls the Kohana::find_file and supplies the extension as the type.
* @param string directory to search in
* @param string filename to look for
* @param boolean file required (optional: default false)
* @param boolean make the file name relative (optiona: default false)
* @return array if the type is config, i18n or l10n
* @return array if the extension is config, i18n or l10n
* @return string if the file is found (relative to the DOCROOT)
* @return FALSE if the file is not found
* @return false if the file is not found
*/
static function find_file($directory, $file, $required=false) {
$file_name = substr($file, 0, -strlen($ext = strrchr($file, '.')));
+6 -6
View File
@@ -24,9 +24,9 @@ class Gallery_View_Core extends View {
/**
* Add a script to the combined scripts list.
* @param $file the file name or path of the script to include. if a path is specified then
* the location needs to be DOCROOT/lib. Just specifying a file name will result
* in searching the hierarchical file system.
* @param $file the file name or path of the script to include. If a path is specified then
* it needs to be relative to DOCROOT. Just specifying a file name will result
* in searching Kohana's cascading file system.
*/
public function script($file) {
if (($path = gallery::find_file("js", $file, false))) {
@@ -47,9 +47,9 @@ class Gallery_View_Core extends View {
/**
* Add a css file to the combined css list.
* @param $file the file name or path of a css file to include. if a path is specified then
* the location needs to be DOCROOT/lib. Just specifying a file name will result
* in searching the hierarchical file system.
* @param $file the file name or path of the script to include. If a path is specified then
* it needs to be relative to DOCROOT. Just specifying a file name will result
* in searching Kohana's cascading file system.
*/
public function css($file) {
if (($path = gallery::find_file("css", $file, false))) {