2017 © Pedro Peláez
 

library phing-property-bundle

Helper to make it easier to load entire config directories into phing properties.

image

surangapg/phing-property-bundle

Helper to make it easier to load entire config directories into phing properties.

  • Monday, January 8, 2018
  • by surangapg
  • Repository
  • 1 Watchers
  • 1 Stars
  • 7,341 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 12 % Grown

The README.md

Phing property bundle

Contains a tasks to load in a full complement of all the files in a directory. This allows phing to load in a set of files without being overly verbose or tedious to maintain. For example, pointing at a /properties folder with 8 yml files will automatically load in all 8 files into properties (prefixed with their filename)., (*1)

Use cases

Assume you have a project with a lot of properties and various stages, environements etc. But still want to automate this build process. You could put everything in a very large build.properties file. But using this task you can make it into a dir based structure., (*2)

E.g the file system looks like this:, (*3)

properties/ dist/ project.yml behat.yml githook.yml env/ githook.yml stage/ db.yml, (*4)

Using the tasks

Before any of the tasks are available you'll need to load them in via the build.xml., (*5)


<includepath classpath="${project.basedir}/vendor/surangapg/phing-property-bundle/src" /> <taskdef classname="PropertyDirWriteTask" name="property-dir-write" /> <taskdef classname="PropertyDirLoadTask" name="property-dir" />

Writing all the properties

This will write a full set of consolidated properties to the /properties dir., (*6)

    <taskdef classname="PropertyDirLoadTask" name="property-dir-load" />
    <property-dir-load originDir="${project.basedir}/properties"
                   subLevels="dist,env,stage"
                   outputDir="${project.basedir}/properties"
                   order="project,dir,bin,behat"
                   override="true"
                   outputFull="true"
    />

Writing reading in a properties dir

Reads all the consolidated data from the new dir., (*7)

    <property-dir propertyDir="${project.basedir}/properties"/>

The Versions

08/01 2018

dev-master

9999999-dev https://github.com/SurangaPG/phing-property-bundle

Helper to make it easier to load entire config directories into phing properties.

  Sources   Download

LGPL-3.0

The Requires

 

by Suranga Gamage

task tool build phing

08/01 2018

0.0.3

0.0.3.0 https://github.com/SurangaPG/phing-property-bundle

Helper to make it easier to load entire config directories into phing properties.

  Sources   Download

LGPL-3.0

The Requires

 

by Suranga Gamage

task tool build phing

10/05 2017

0.0.2

0.0.2.0 https://github.com/SurangaPG/phing-property-bundle

Helper to make it easier to load entire config directories into phing properties.

  Sources   Download

LGPL-3.0

The Requires

 

by Suranga Gamage

task tool build phing

03/05 2017

0.0.1

0.0.1.0 https://github.com/SurangaPG/phing-property-bundle

Helper to make it easier to load entire config directories into phing properties.

  Sources   Download

LGPL-3.0

The Requires

 

by Suranga Gamage

task tool build phing