b07a5fdf94e794361fb702c924f0bbc0a57972bd
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / src / Annotation / Rewriter.php
1 <?php
2
3 namespace Drupal\drupalmoduleupgrader\Annotation;
4
5 use Drupal\Component\Annotation\Plugin;
6
7 /**
8  * Defines a Plugin annotation object for parametric rewriters.
9  *
10  * Parametric rewriters are intelligent search-and-replace plugins which act
11  * on a function body based on one of the function's parameters. The parameter
12  * type must be known ahead of time.
13  *
14  * Plugin Namespace: Plugin\DMU\Rewriter
15  *
16  * @Annotation
17  */
18 class Rewriter extends Plugin {
19
20   /**
21    * The plugin ID.
22    *
23    * @var string
24    */
25   public $id;
26
27   /**
28    * Optional type hint to set on the parameter.
29    *
30    * @var
31    */
32   public $type_hint;
33
34   /**
35    * Properties known to the rewriter, keyed by property. Each property can
36    * have 'get' and 'set' keys, which are the corresponding getter and setter
37    * methods to replace the property with. The 'get' key is required; the
38    * setter is only needed if it's possible to set the property at all (for
39    * example, an entity ID property would not have a setter).
40    *
41    * @var array
42    */
43   public $properties = [];
44
45 }