bd808 / graphite-graph-php

PHP DSL for generating Graphite graph specifications
http://bd808.com/graphite-graph-php
BSD 2-Clause "Simplified" License
16 stars 6 forks source link

Better support for multi-arg functions #13

Closed bd808 closed 12 years ago

bd808 commented 12 years ago

There are several functions that take multiple arguments. When using the ini configuration method there is a way to supply these args using the [] array notation feature of php's ini parser. While this works it's a little confusing to less php savvy users.

Since we know from the CallSpec if a function accepts multiple arguments or not it would be nice to do some sort of auto-splitting of comma-separated list values. For example:

[my-metric]
aliasbynode = 1,3,5

should be treated the same as

[my-metric]
aliasbynode[] = 1
aliasbynode[] = 3
aliasbynode[] = 5

with both generating aliasByNode(my-metric, 1, 3, 5) as the output series.

bd808 commented 12 years ago

Fixed in pull request from Issue #16.