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 | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
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
#!/bin/sh | |
# Migrates a SVN repository to a git repository. | |
# | |
# Author: Augusto Pascutti <augusto@phpsp.org.br> | |
COMMAND=$0; | |
SVN=`which svn 2> /dev/null`; | |
GIT=`which git 2> /dev/null`; | |
READER=""; | |
RETURN=""; |
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
==> Downloading http://www.andre-simon.de/zip/highlight-3.5.tar.bz2 | |
File already downloaded in /Users/pascutti/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/pascutti/Library/Caches/Homebrew/highlight-3.5.tar.bz2 | |
==> make PREFIX=/usr/local/Cellar/highlight/3.5 conf_dir=/usr/local/etc/highlight | |
make PREFIX=/usr/local/Cellar/highlight/3.5 conf_dir=/usr/local/etc/highlight | |
make -C ./src -f ./makefile HL_DATA_DIR=/usr/local/Cellar/highlight/3.5/share/highlight/ HL_CONFIG_DIR=/usr/local/etc/highlight | |
c++ -Wall -O2 -O3 -march=core2 -msse4.1 -w -pipe -DNDEBUG -c -I ./include/ -I/usr/include/lua5.1 ./core/stylecolour.cpp | |
c++ -Wall -O2 -O3 -march=core2 -msse4.1 -w -pipe -DNDEBUG -c -I ./include/ -I/usr/include/lua5.1 ./core/stringtools.cpp | |
c++ -Wall -O2 -O3 -march=core2 -msse4.1 -w -pipe -DNDEBUG -c -I ./include/ -I/usr/include/lua5.1 ./core/xhtmlgenerator.cpp | |
c++ -Wall -O2 -O3 -march=core2 -msse4.1 -w -pipe -DNDEBUG -c -I ./include/ -I/usr/include/lua5.1 ./core/latexgenerator.cpp |
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
#!/bin/bash | |
# | |
# Downloads and install latest APC extension to OSX php (Zend Server). | |
# Tested under OSX 10.6.7, more feedback is appreciated. | |
# | |
# OSX is 64bit but the PHP binary in Zend Server is compiled in 32bit mode only, | |
# so to have APC working with Zend Server on OSX statically compiling it with default | |
# recommended flags and forced i386 architecture. | |
# I suppose that Zend Server's binary path is already into your PATH variable and it | |
# is used before the native PHP binary bundled with OSX. |
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 SingletonPattern | |
{ | |
private static $instance; | |
private function __construct() | |
{ | |
} | |
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 | |
function examples() { | |
$say = new Sql(); | |
echo $say->what->happens->when->you->think->out->of->the->box->raw('?'),"\n\n"; | |
// Our database | |
$pdo = new Pdo('sqlite::memory:'); | |
//$pdo = new Pdo('mysql:dbname=test;host=127.0.0.1', 'zend', ''); | |
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
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 | |
$map = array('id'=>'id', 'login'=>'login', 'passwd'=>'passwd'); | |
$origin = array('id'=>1, 'login'=>'foo', 'passwd'=>'bar'); | |
$mapper = new Respect\Data\Mapper($map); | |
$object = new StdClass; | |
$mapper->toInstance($origin, $object); |
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
{% if cases_list.ProcessInstance is defined %} | |
{% for case in cases_list.ProcessInstance %} | |
{% for activity in case.activities.children() %} | |
<tr> | |
{% for variable in case.clientVariables.children() %} | |
{{ set value = variable.xpath('string[2]') }} | |
<td>{{ array_pop(value) }}</td> | |
{% endfor %} | |
<td><a href="{{ cloud_link_address }}{{ activity.uuid.value }}" target="_blank">{{ activity.name }}</a></td> | |
<td>#</td> |
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 Entidade | |
{ | |
public function toArray() | |
{ | |
return array('uhull'); | |
} | |
} | |
class EntityIterator extends \ArrayIterator |
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 | |
/** | |
* Simple loader class | |
* | |
* Usage: new Vortice\Common\Loader('Zend', './Zend'); | |
* @author Carlos André Ferrari <carlos@ferrari.eti.br> | |
*/ | |
namespace Vortice\Common; |
OlderNewer