ZENDFRAMEWORK SCRIPTS
Other
Search with Zend_Lucene and Doctrine
Extends php doctrine record for search with Zend_Lucene
Usage:
1.- Replace base model:
Ex:
replace
abstract class BaseBlacklisted extends Doctrine_Record
with
abstract class BaseBlacklisted extends...
Obfuscate php code
A class to obfuscate php code:
if (!defined('T_ML_COMMENT')) {
define('T_ML_COMMENT', T_COMMENT);
} else {
define('T_DOC_COMMENT', T_ML_COMMENT);
}
class ofusca {
var $target =...
Function to split the words of a string with invisible chars
Function to split the words of a string with invisible chars function trunk($texto) { $largomax = 10; $arrayTexto = explode(' ',$texto); $texto2=''; for($n=0;$n<count($arrayTexto);$n++) { if...Generate unique identifier for a friendly url
class Helper_Mid extends Zend_Controller_Action_Helper_Abstract { function get($seed, $table = null) { $temp = preg_replace('/[\W|_]{1,}/','-', $seed); $temp = preg_replace('/[^a-zA-Z0-9-]/', '',...1