Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / src / RewriterInterface.php
1 <?php
2
3 namespace Drupal\drupalmoduleupgrader;
4
5 use Pharborist\Functions\ParameterNode;
6
7 /**
8  * Defines a parametric rewriter.
9  *
10  * Parametric rewriters are utility plugins which can alter a function body
11  * in the context of a specific parameter. If a parameter is explicitly defined
12  * as a node, for example, the rewriter can alter the function body so that
13  * $node->nid becomes $node->id(). Rewriters work from property maps defined
14  * in the plugin definition.
15  */
16 interface RewriterInterface {
17
18   /**
19    * Parametrically rewrites the function containing the given parameter.
20    *
21    * @param ParameterNode $parameter
22    *  The parameter upon which to base the rewrite. The parameter must be
23    *  attached to a function or method declaration node, or fatal errors will
24    *  likely result.
25    */
26   public function rewrite(ParameterNode $parameter);
27
28 }