This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* mb_str_pad | |
* | |
* @param string $input | |
* @param int $pad_length | |
* @param string $pad_string | |
* @param int $pad_type | |
* @return string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class IndexController extends Zend_Controller_Action { | |
public function someAction() { | |
if ( true === $this->getRequest()->isPost() ) { | |
// Validate form. | |
$someForm = new App_Filter_Input_SomeForm(); | |
$someForm->setData( $this->getRequest()->getPost() ); | |
if ( false === $someForm->isValid() ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# How to install php/java bridge on Ubuntu. | |
# | |
# aptitude install sun-java6-jre sun-java6-fonts sun-java6-jdk liblucene-java libitext-java \ | |
php5-dev php5-cgi libtcnative-1 | |
# update-java-alternatives -s java-6-sun | |
# dpkg --force-architecture -i php-java-bridge_5.4.4.2-3_i386.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined( "APPLICATION_PATH" ) | |
|| define( "APPLICATION_PATH", realpath( dirname( __FILE__ ) ) ); | |
// Ensure library/ is on include_path. | |
set_include_path( implode( PATH_SEPARATOR, array( | |
realpath( APPLICATION_PATH . "/library" ), // Aca va a estar la carpeta Zend que viene con el .tag.gz del ZF | |
get_include_path(), | |
) ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ErrorController extends Zend_Controller_Action | |
{ | |
public function errorAction() | |
{ | |
/** Other suff */ | |
if ( true === $this->getRequest()->isXmlHttpRequest() ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class IndexController extends Zend_Controller_Action | |
{ | |
public function exportXlsAction() | |
{ | |
set_time_limit( 0 ); | |
$model = new Default_Model_SomeModel(); | |
$data = $model->getData(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class App_Thumb | |
{ | |
protected $_width = null; | |
protected $_oldWidth = null; | |
protected $_height = null; | |
protected $_oldHeight = null; | |
protected $_imagePath = null; | |
protected $_resource = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOR /F "tokens=*" %G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q %G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Based on FileCache class by Erik Giberti, | |
* http://af-design.com/blog/2010/07/30/simple-file-based-caching-in-php/ | |
* | |
* @author nebiros | |
*/ | |
class App_Cache { | |
/** |
OlderNewer