mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 18:42:40 +00:00
adding a newline before all comment blocks
This commit is contained in:
parent
a9d98e73c3
commit
b2142df2bc
460 changed files with 6739 additions and 334 deletions
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
|
||||
/**
|
||||
* Basic Cake functionality.
|
||||
*
|
||||
|
@ -24,6 +25,7 @@
|
|||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Basic defines for timing functions.
|
||||
*/
|
||||
|
@ -34,6 +36,7 @@
|
|||
define('WEEK', 7 * DAY);
|
||||
define('MONTH', 30 * DAY);
|
||||
define('YEAR', 365 * DAY);
|
||||
|
||||
/**
|
||||
* Patch for PHP < 5.0
|
||||
*/
|
||||
|
@ -46,6 +49,7 @@ if (!function_exists('clone')) {
|
|||
}');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads configuration files. Receives a set of configuration files
|
||||
* to load.
|
||||
|
@ -75,6 +79,7 @@ if (!function_exists('clone')) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads component/components from LIBS. Takes optional number of parameters.
|
||||
*
|
||||
|
@ -91,6 +96,7 @@ if (!function_exists('clone')) {
|
|||
require_once(LIBS . strtolower($file) . '.php');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints out debug information about given variable.
|
||||
*
|
||||
|
@ -118,6 +124,7 @@ if (!function_exists('clone')) {
|
|||
}
|
||||
}
|
||||
if (!function_exists('getMicrotime')) {
|
||||
|
||||
/**
|
||||
* Returns microtime for execution time checking
|
||||
*
|
||||
|
@ -129,6 +136,7 @@ if (!function_exists('getMicrotime')) {
|
|||
}
|
||||
}
|
||||
if (!function_exists('sortByKey')) {
|
||||
|
||||
/**
|
||||
* Sorts given $array by key $sortby.
|
||||
*
|
||||
|
@ -160,6 +168,7 @@ if (!function_exists('sortByKey')) {
|
|||
}
|
||||
}
|
||||
if (!function_exists('array_combine')) {
|
||||
|
||||
/**
|
||||
* Combines given identical arrays by using the first array's values as keys,
|
||||
* and the second one's values as values. (Implemented for backwards compatibility with PHP4)
|
||||
|
@ -188,6 +197,7 @@ if (!function_exists('array_combine')) {
|
|||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method for htmlspecialchars.
|
||||
*
|
||||
|
@ -208,6 +218,7 @@ if (!function_exists('array_combine')) {
|
|||
}
|
||||
return htmlspecialchars($text, ENT_QUOTES, $charset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all the given parameters.
|
||||
*
|
||||
|
@ -228,6 +239,7 @@ if (!function_exists('array_combine')) {
|
|||
$args = func_get_args();
|
||||
return $args;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs associative array from pairs of arguments.
|
||||
*
|
||||
|
@ -257,6 +269,7 @@ if (!function_exists('array_combine')) {
|
|||
}
|
||||
return $a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method for echo().
|
||||
*
|
||||
|
@ -266,6 +279,7 @@ if (!function_exists('array_combine')) {
|
|||
function e($text) {
|
||||
echo $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method for strtolower().
|
||||
*
|
||||
|
@ -276,6 +290,7 @@ if (!function_exists('array_combine')) {
|
|||
function low($str) {
|
||||
return strtolower($str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method for strtoupper().
|
||||
*
|
||||
|
@ -286,6 +301,7 @@ if (!function_exists('array_combine')) {
|
|||
function up($str) {
|
||||
return strtoupper($str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method for str_replace().
|
||||
*
|
||||
|
@ -298,6 +314,7 @@ if (!function_exists('array_combine')) {
|
|||
function r($search, $replace, $subject) {
|
||||
return str_replace($search, $replace, $subject);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print_r convenience function, which prints out <PRE> tags around
|
||||
* the output of given array. Similar to debug().
|
||||
|
@ -314,6 +331,7 @@ if (!function_exists('array_combine')) {
|
|||
echo '</pre>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display parameters.
|
||||
*
|
||||
|
@ -329,6 +347,7 @@ if (!function_exists('array_combine')) {
|
|||
}
|
||||
return $p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge a group of arrays
|
||||
*
|
||||
|
@ -350,6 +369,7 @@ if (!function_exists('array_combine')) {
|
|||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an environment variable from available sources, and provides emulation
|
||||
* for unsupported or inconsistent environment variables (i.e. DOCUMENT_ROOT on
|
||||
|
@ -426,6 +446,7 @@ if (!function_exists('array_combine')) {
|
|||
return null;
|
||||
}
|
||||
if (!function_exists('file_put_contents')) {
|
||||
|
||||
/**
|
||||
* Writes data into file.
|
||||
*
|
||||
|
@ -453,6 +474,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads/writes temporary data to cache files or session.
|
||||
*
|
||||
|
@ -504,6 +526,7 @@ if (!function_exists('file_put_contents')) {
|
|||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to delete files in the cache directories, or clear contents of cache directories
|
||||
*
|
||||
|
@ -566,6 +589,7 @@ if (!function_exists('file_put_contents')) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively strips slashes from all values in an array
|
||||
*
|
||||
|
@ -583,6 +607,7 @@ if (!function_exists('file_put_contents')) {
|
|||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a translated string if one is found; Otherwise, the submitted message.
|
||||
*
|
||||
|
@ -605,6 +630,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return I18n::translate($singular);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns correct plural form of message identified by $singular and $plural for count $count.
|
||||
* Some languages have more than one form for plural messages dependent on the count.
|
||||
|
@ -629,6 +655,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return I18n::translate($singular, $plural, null, 6, $count);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to override the current domain for a single message lookup.
|
||||
*
|
||||
|
@ -651,6 +678,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return I18n::translate($msg, null, $domain);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to override the current domain for a single plural message lookup.
|
||||
* Returns correct plural form of message identified by $singular and $plural for count $count
|
||||
|
@ -677,6 +705,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return I18n::translate($singular, $plural, $domain, 6, $count);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to override the current domain for a single message lookup.
|
||||
* It also allows you to specify a category.
|
||||
|
@ -713,6 +742,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return I18n::translate($msg, null, $domain, $category);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to override the current domain for a single plural message lookup.
|
||||
* It also allows you to specify a category.
|
||||
|
@ -753,6 +783,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return I18n::translate($singular, $plural, $domain, $category, $count);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The category argument allows a specific category of the locale settings to be used for fetching a message.
|
||||
* Valid categories are: LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES and LC_ALL.
|
||||
|
@ -785,6 +816,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return I18n::translate($msg, null, null, $category);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the difference of arrays using keys for comparison.
|
||||
*
|
||||
|
@ -819,6 +851,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return $valuesDiff;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the intersection of arrays using keys for comparison
|
||||
*
|
||||
|
@ -837,6 +870,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcut to Log::write.
|
||||
*
|
||||
|
@ -850,6 +884,7 @@ if (!function_exists('file_put_contents')) {
|
|||
$good = ' ';
|
||||
CakeLog::write('error', str_replace($bad, $good, $message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches include path for files.
|
||||
*
|
||||
|
@ -870,6 +905,7 @@ if (!function_exists('file_put_contents')) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert forward slashes to underscores and removes first and last underscores in a string
|
||||
*
|
||||
|
@ -883,6 +919,7 @@ if (!function_exists('file_put_contents')) {
|
|||
$string = str_replace('/', '_', $string);
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements http_build_query for PHP4.
|
||||
*
|
||||
|
@ -922,6 +959,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return implode($argSep, $out);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps ternary operations. If $condition is a non-empty value, $val1 is returned, otherwise $val2.
|
||||
* Don't use for isset() conditions, or wrap your variable with @ operator:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue