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
<property environment="env" /> | |
<property name="env.PATH" value="${env.Path}" /><!-- because windows --> | |
<scriptdef name="which" language="javascript"> | |
<attribute name="command" /> | |
<attribute name="property" /> | |
<![CDATA[ | |
var cmd = attributes.get("command") || ""; | |
var prop = attributes.get("property") || ""; |
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
<property name="\n" value="${line.separator}" /> | |
<property name="/" value="${file.separator}" /> | |
<property name=":" value="${path.separator}" /> | |
<!-- tab char --> | |
<script language="javascript">project.setUserProperty("\\t", "\t");</script> | |
<!-- for surrounding command line options --> | |
<condition property="'" value=""" else="'"> | |
<os family="windows" /> |
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
<!-- | |
@todo new attributes "include" and/or "require" which take csv file lists. useful for presetdefs | |
@todo new attribute "namespace" (useful?) | |
@todo use "return" instead of "echo", or allow both. maybe use attributes "returnProperty" and "outputProperty" instead of just "property" | |
@todo could (optionally) predefine some variables, such as $basedir | |
@todo could (optionally) use "echoProperties" to dump properties to a temp file and load them into a predefined $ant, $properties, or $p array | |
--> | |
<macrodef name="php" description="Executes PHP code"> | |
<attribute name="code" default="" /> |
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
<!-- | |
Requires Ant 1.8+ | |
Home page: http://ant.apache.org/antlibs/props | |
SVN URL: https://svn.apache.org/repos/asf/ant/antlibs/props/trunk | |
ViewVC: http://svn.apache.org/viewvc/ant/antlibs/props/trunk | |
--> | |
<taskdef resource="org/apache/ant/props/antlib.xml" | |
classpath="${lib.dir}/ant-props-1.0Alpha.jar" /> |
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
ant -logger org.apache.tools.ant.listener.AnsiColorLogger |
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 | |
/** | |
* Creates a tree-structured array of directories and files from a given root folder. | |
* | |
* Gleaned from: http://stackoverflow.com/questions/952263/deep-recursive-array-of-directory-structure-in-php | |
* | |
* @param string $dir | |
* @param string $regex | |
* @param boolean $ignoreEmpty Do not add empty directories to the tree | |
* @return array |
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 | |
/** | |
* Very simple output colorizer. Only changes the foreground color. | |
* Tokens take the form {colorname}. | |
* | |
* Bright colors start with 'b', as in 'bgreen' and 'bblue'. | |
* | |
* You can escape brackets using double brackets {{ and }} | |
* | |
* PHP >= 5.3.0 (but could easily be modified to work with earlier versions) |
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
// | |
// Ant Javascript snippets | |
// | |
import(java.io.File); | |
importClass(Packages.org.apache.tools.ant.types.Environment); | |
importClass(Packages.org.apache.tools.ant.taskdefs.Echo); | |
String.prototype.trim = function() { | |
return this.replace(/^\s+|\s+$/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 | |
namespace My\Doctrine\ORM\Query\Functions; | |
use Doctrine\ORM\Query\AST\Functions\FunctionNode; | |
use Doctrine\ORM\Query\Lexer; | |
use Doctrine\ORM\Query\Parser; | |
use Doctrine\ORM\Query\QueryException; | |
use Doctrine\ORM\Query\SqlWalker; |
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 | |
/** | |
* The DiscriminatorMap() annotation in an entity's class doc comment can be | |
* empty, but if it is, Doctrine will create a default discriminator map | |
* using the lower-case short name of each sub-class as the discriminator | |
* "type" name. This may be just fine for your purposes, but if not, | |
* this listener provides a way to programmatically inject your own | |
* discriminator map. | |
* | |
* To prevent Doctrine from creating the default discriminator map, you will |
OlderNewer