phpcr/phpcr-utils — pull request #71 by dantleech (2013-06-15 18:08:29+00:00)
Title: [RFC] Added `--apply-closure` option

This option gives us a very quick and flexible solution for migrations:

````
./bin/phpcr phpcr:nodes:update --query="SELECT * FROM [nt:unstructured] WHERE ..." --apply-closure="function ($session, $node) { if (null !== $node->getProperty('url')) { $node->setProperty('linkType', 'externalUrl'); }"
````
What do people think?