diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-12-25 21:17:32 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-01-02 19:38:20 +0400 |
commit | 54f6f1e6b7de3c5ce2414c9f436af1defa6c3c78 (patch) | |
tree | 318a5b923ee58dbddb9bdc06ea930c5a0c33075c /lib | |
parent | 516464ba94a73e9151702ddd08dae1b7501dc79c (diff) |
phpdoc fixes for public api
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/db.php | 8 | ||||
-rw-r--r-- | lib/public/response.php | 18 | ||||
-rw-r--r-- | lib/public/util.php | 116 |
3 files changed, 71 insertions, 71 deletions
diff --git a/lib/public/db.php b/lib/public/db.php index 92ff8f93a22..5d4aadd22ae 100644 --- a/lib/public/db.php +++ b/lib/public/db.php @@ -36,8 +36,8 @@ namespace OCP; class DB { /** * @brief Prepare a SQL query - * @param $query Query string - * @returns prepared SQL query + * @param string $query Query string + * @return \MDB2_Statement_Common prepared SQL query * * SQL query via MDB2 prepare(), needs to be execute()'d! */ @@ -59,7 +59,7 @@ class DB { * 'family' => array ('value' => 'Stefanov'), * 'birth_date' => array ('value' => '1975-06-20') * ); - * @returns true/false + * @return bool * */ public static function insertIfNotExist($table, $input) { @@ -69,7 +69,7 @@ class DB { /** * @brief gets last value of autoincrement * @param $table string The optional table name (will replace *PREFIX*) and add sequence suffix - * @returns id + * @return int * * MDB2 lastInsertID() * diff --git a/lib/public/response.php b/lib/public/response.php index 95e67a85720..bfb84eda5d1 100644 --- a/lib/public/response.php +++ b/lib/public/response.php @@ -31,12 +31,12 @@ namespace OCP; /** - * This class provides convinient functions to send the correct http response headers + * This class provides convenient functions to send the correct http response headers */ class Response { /** * @brief Enable response caching by sending correct HTTP headers - * @param $cache_time time to cache the response + * @param int $cache_time time to cache the response * >0 cache time in seconds * 0 and <0 enable default browser caching * null cache indefinitly @@ -48,7 +48,7 @@ class Response { /** * Checks and set Last-Modified header, when the request matches sends a * 'not modified' response - * @param $lastModified time when the reponse was last modified + * @param string $lastModified time when the reponse was last modified */ static public function setLastModifiedHeader( $lastModified ) { return(\OC_Response::setLastModifiedHeader( $lastModified )); @@ -65,7 +65,7 @@ class Response { /** * Checks and set ETag header, when the request matches sends a * 'not modified' response - * @param $etag token to use for modification check + * @param string $etag token to use for modification check */ static public function setETagHeader( $etag ) { return(\OC_Response::setETagHeader( $etag )); @@ -73,15 +73,15 @@ class Response { /** * @brief Send file as response, checking and setting caching headers - * @param $filepath of file to send + * @param string $filepath of file to send */ static public function sendFile( $filepath ) { return(\OC_Response::sendFile( $filepath )); } /** - * @brief Set reponse expire time - * @param $expires date-time when the response expires + * @brief Set response expire time + * @param string|\DateTime $expires date-time when the response expires * string for DateInterval from now * DateTime object when to expire response */ @@ -91,9 +91,9 @@ class Response { /** * @brief Send redirect response - * @param $location to redirect to + * @param string $location to redirect to */ static public function redirect( $location ) { return(\OC_Response::redirect( $location )); } -}
\ No newline at end of file +} diff --git a/lib/public/util.php b/lib/public/util.php index af782b01483..df09ea81ae1 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -68,7 +68,7 @@ class Util { * @brief write a message in the log * @param string $app * @param string $message - * @param int level + * @param int $level */ public static function writeLog( $app, $message, $level ) { // call the internal log class @@ -77,7 +77,7 @@ class Util { /** * @brief add a css file - * @param url $url + * @param string $url */ public static function addStyle( $application, $file = null ) { \OC_Util::addStyle( $application, $file ); @@ -85,8 +85,8 @@ class Util { /** * @brief add a javascript file - * @param appid $application - * @param filename $file + * @param string $application + * @param string $file */ public static function addScript( $application, $file = null ) { \OC_Util::addScript( $application, $file ); @@ -94,7 +94,7 @@ class Util { /** * @brief Add a custom element to the header - * @param string tag tag name of the element + * @param string $tag tag name of the element * @param array $attributes array of attributes for the element * @param string $text the text content for the element */ @@ -104,8 +104,8 @@ class Util { /** * @brief formats a timestamp in the "right" way - * @param int timestamp $timestamp - * @param bool dateOnly option to ommit time from the result + * @param int $timestamp $timestamp + * @param bool $dateOnly option to omit time from the result */ public static function formatDate( $timestamp, $dateOnly=false) { return(\OC_Util::formatDate( $timestamp, $dateOnly )); @@ -113,11 +113,11 @@ class Util { /** * @brief Creates an absolute url - * @param $app app - * @param $file file - * @param $args array with param=>value, will be appended to the returned url + * @param string $app app + * @param string $file file + * @param array $args array with param=>value, will be appended to the returned url * The value of $args will be urlencoded - * @returns the url + * @returns string the url * * Returns a absolute url to the given app and file. */ @@ -127,8 +127,8 @@ class Util { /** * @brief Creates an absolute url for remote use - * @param $service id - * @returns the url + * @param string $service id + * @returns string the url * * Returns a absolute url to the given app and file. */ @@ -138,8 +138,8 @@ class Util { /** * @brief Creates an absolute url for public use - * @param $service id - * @returns the url + * @param string $service id + * @returns string the url * * Returns a absolute url to the given app and file. */ @@ -149,11 +149,11 @@ class Util { /** * @brief Creates an url - * @param $app app - * @param $file file - * @param $args array with param=>value, will be appended to the returned url + * @param string $app app + * @param string $file file + * @param array $args array with param=>value, will be appended to the returned url * The value of $args will be urlencoded - * @returns the url + * @returns string the url * * Returns a url to the given app and file. */ @@ -163,7 +163,7 @@ class Util { /** * @brief Returns the server host - * @returns the server host + * @returns string the server host * * Returns the server host, even if the website uses one or more * reverse proxies @@ -174,7 +174,7 @@ class Util { /** * @brief returns the server hostname - * @returns the server hostname + * @returns string the server hostname * * Returns the server host name without an eventual port number */ @@ -190,8 +190,8 @@ class Util { /** * @brief Returns the default email address - * @param $user_part the user part of the address - * @returns the default email address + * @param string $user_part the user part of the address + * @returns string the default email address * * Assembles a default email address (using the server hostname * and the given user part, and returns it @@ -210,7 +210,7 @@ class Util { /** * @brief Returns the server protocol - * @returns the server protocol + * @returns string the server protocol * * Returns the server protocol. It respects reverse proxy servers and load balancers */ @@ -220,9 +220,9 @@ class Util { /** * @brief Creates path to an image - * @param $app app - * @param $image image name - * @returns the url + * @param string $app app + * @param string $image image name + * @returns string the url * * Returns the path to the image. */ @@ -232,8 +232,8 @@ class Util { /** * @brief Make a human file size - * @param $bytes file size in bytes - * @returns a human readable file size + * @param int $bytes file size in bytes + * @returns string a human readable file size * * Makes 2048 to 2 kB. */ @@ -243,8 +243,8 @@ class Util { /** * @brief Make a computer file size - * @param $str file size in a fancy format - * @returns a file size in bytes + * @param string $str file size in a fancy format + * @returns int a file size in bytes * * Makes 2kB to 2048. * @@ -256,11 +256,11 @@ class Util { /** * @brief connects a function to a hook - * @param $signalclass class name of emitter - * @param $signalname name of signal - * @param $slotclass class name of slot - * @param $slotname name of slot - * @returns true/false + * @param string $signalclass class name of emitter + * @param string $signalname name of signal + * @param string $slotclass class name of slot + * @param string $slotname name of slot + * @returns bool * * This function makes it very easy to connect to use hooks. * @@ -272,10 +272,10 @@ class Util { /** * @brief emitts a signal - * @param $signalclass class name of emitter - * @param $signalname name of signal - * @param $params defautl: array() array with additional data - * @returns true if slots exists or false if not + * @param string $signalclass class name of emitter + * @param string $signalname name of signal + * @param string $params defautl: array() array with additional data + * @returns bool true if slots exists or false if not * * Emits a signal. To get data from the slot use references! * @@ -306,7 +306,7 @@ class Util { * * This function is used to sanitize HTML and should be applied on any string or array of strings before displaying it on a web page. * - * @param string or array of strings + * @param string|array of strings * @return array with sanitized strings or a single sinitized string, depends on the input parameter. */ public static function sanitizeHTML( $value ) { @@ -316,9 +316,9 @@ class Util { /** * @brief Returns an array with all keys from input lowercased or uppercased. Numbered indices are left as is. * - * @param $input The array to work on - * @param $case Either MB_CASE_UPPER or MB_CASE_LOWER (default) - * @param $encoding The encoding parameter is the character encoding. Defaults to UTF-8 + * @param array $input The array to work on + * @param int $case Either MB_CASE_UPPER or MB_CASE_LOWER (default) + * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8 * @return array * * @@ -330,11 +330,11 @@ class Util { /** * @brief replaces a copy of string delimited by the start and (optionally) length parameters with the string given in replacement. * - * @param $input The input string. .Opposite to the PHP build-in function does not accept an array. - * @param $replacement The replacement string. - * @param $start If start is positive, the replacing will begin at the start'th offset into string. If start is negative, the replacing will begin at the start'th character from the end of string. - * @param $length Length of the part to be replaced - * @param $encoding The encoding parameter is the character encoding. Defaults to UTF-8 + * @param string $input The input string. .Opposite to the PHP build-in function does not accept an array. + * @param string $replacement The replacement string. + * @param int $start If start is positive, the replacing will begin at the start'th offset into string. If start is negative, the replacing will begin at the start'th character from the end of string. + * @param int $length Length of the part to be replaced + * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8 * @return string * */ @@ -345,11 +345,11 @@ class Util { /** * @brief Replace all occurrences of the search string with the replacement string * - * @param $search The value being searched for, otherwise known as the needle. String. - * @param $replace The replacement string. - * @param $subject The string or array being searched and replaced on, otherwise known as the haystack. - * @param $encoding The encoding parameter is the character encoding. Defaults to UTF-8 - * @param $count If passed, this will be set to the number of replacements performed. + * @param string $search The value being searched for, otherwise known as the needle. String. + * @param string $replace The replacement string. + * @param string $subject The string or array being searched and replaced on, otherwise known as the haystack. + * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8 + * @param int $count If passed, this will be set to the number of replacements performed. * @return string * */ @@ -359,10 +359,10 @@ class Util { /** * @brief performs a search in a nested array - * @param haystack the array to be searched - * @param needle the search string - * @param $index optional, only search this key name - * @return the key of the matching field, otherwise false + * @param array $haystack the array to be searched + * @param string $needle the search string + * @param int $index optional, only search this key name + * @return mixed the key of the matching field, otherwise false */ public static function recursiveArraySearch($haystack, $needle, $index = null) { return(\OC_Helper::recursiveArraySearch($haystack, $needle, $index)); |