mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Merging current trunk into my sandbox.
Added docblocks that where missing from some files in the trunk git-svn-id: https://svn.cakephp.org/repo/trunk/cake@227 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f98a79266f
commit
dada2432f0
1 changed files with 35 additions and 0 deletions
|
@ -189,10 +189,24 @@ class Flay extends Object {
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enter description here...
|
||||||
|
*
|
||||||
|
* @param unknown_type $string
|
||||||
|
* @return unknown
|
||||||
|
*/
|
||||||
function extractWords ($string) {
|
function extractWords ($string) {
|
||||||
return preg_split('/[\s,\.:\/="!\(\)<>~\[\]]+/', $string);
|
return preg_split('/[\s,\.:\/="!\(\)<>~\[\]]+/', $string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enter description here...
|
||||||
|
*
|
||||||
|
* @param unknown_type $words
|
||||||
|
* @param unknown_type $string
|
||||||
|
* @param unknown_type $max_snippets
|
||||||
|
* @return unknown
|
||||||
|
*/
|
||||||
function markedSnippets ($words, $string, $max_snippets=5) {
|
function markedSnippets ($words, $string, $max_snippets=5) {
|
||||||
|
|
||||||
$string = strip_tags($string);
|
$string = strip_tags($string);
|
||||||
|
@ -214,6 +228,13 @@ class Flay extends Object {
|
||||||
return Flay::colorMark($words, $snips);
|
return Flay::colorMark($words, $snips);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enter description here...
|
||||||
|
*
|
||||||
|
* @param unknown_type $words
|
||||||
|
* @param unknown_type $string
|
||||||
|
* @return unknown
|
||||||
|
*/
|
||||||
function colorMark($words, $string) {
|
function colorMark($words, $string) {
|
||||||
$colors = array('yl','gr','rd','bl','fu','cy');
|
$colors = array('yl','gr','rd','bl','fu','cy');
|
||||||
|
|
||||||
|
@ -226,10 +247,24 @@ class Flay extends Object {
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enter description here...
|
||||||
|
*
|
||||||
|
* @param unknown_type $text
|
||||||
|
* @return unknown
|
||||||
|
*/
|
||||||
function toClean ($text) {
|
function toClean ($text) {
|
||||||
return strip_tags(html_entity_decode($text, ENT_QUOTES));
|
return strip_tags(html_entity_decode($text, ENT_QUOTES));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enter description here...
|
||||||
|
*
|
||||||
|
* @param unknown_type $text
|
||||||
|
* @param unknown_type $length
|
||||||
|
* @param unknown_type $elipsis
|
||||||
|
* @return unknown
|
||||||
|
*/
|
||||||
function fragment ($text, $length, $elipsis='...') {
|
function fragment ($text, $length, $elipsis='...') {
|
||||||
$soft=$length-5;
|
$soft=$length-5;
|
||||||
$hard=$length+5;
|
$hard=$length+5;
|
||||||
|
|
Loading…
Add table
Reference in a new issue