fix calendar css, take 2. (#213)
[openemr.git] / interface / modules / zend_modules / library / Zend / Code / Generator / TraitUsageInterface.php
blobe5c0bda7cf7dc498b7f4e2d9926b3bbe42f43013
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
9 namespace Zend\Code\Generator;
11 interface TraitUsageInterface
13 /**
14 * Add a class to "use" classes
16 * @param string $use
17 * @param string|null $useAlias
18 * @return self
20 public function addUse($use, $useAlias = null);
22 /**
23 * Returns the "use" classes
25 * @return array
27 public function getUses();
29 /**
30 * Add trait takes an array of trait options or string as arguments.
32 * Array Format:
33 * key: traitName value: String
35 * key: aliases value: array of arrays
36 * key: method value: @see addTraitAlias
37 * key: alias value: @see addTraitAlias
38 * key: visibility value: @see addTraitAlias
40 * key: insteadof value: array of arrays
41 * key: method value: @see self::addTraitOverride
42 * key: traitToReplace value: @see self::addTraitOverride
44 * @param mixed $trait String | Array
45 * @return self
47 public function addTrait($trait);
49 /**
50 * Add multiple traits. Trait can be an array of trait names or array of trait
51 * configurations
53 * @param array $traitName Array of string names or configurations (@see addTrait)
54 * @return self
56 public function addTraits(array $traits);
58 /**
59 * Check to see if the class has a trait defined
61 * @param strint $traitName
62 * @return bool
64 public function hasTrait($traitName);
66 /**
67 * Get a list of trait names
69 * @return array
71 public function getTraits();
73 /**
74 * Remove a trait by its name
76 * @param $traitName
78 public function removeTrait($traitName);
80 /**
81 * Add a trait alias. This will be used to generate the AS portion of the use statement.
83 * $method:
84 * This method provides 2 ways for defining the trait method.
85 * Option 1: String
86 * Option 2: Array
87 * key: traitName value: name of trait
88 * key: method value: trait method
90 * $alias:
91 * Alias is a string representing the new method name.
93 * $visibilty:
94 * ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PRIVATE| ReflectionMethod::IS_PROTECTED
96 * @param mixed $method String or Array
97 * @param string $alias
98 * @param int $visiblity
100 public function addTraitAlias($method, $alias, $visibility = null);
103 * @return array
105 public function getTraitAliases();
108 * Add a trait method override. This will be used to generate the INSTEADOF portion of the use
109 * statement.
111 * $method:
112 * This method provides 2 ways for defining the trait method.
113 * Option 1: String Format: <trait name>::<method name>
114 * Option 2: Array
115 * key: traitName value: trait name
116 * key: method value: method name
118 * $traitToReplace:
119 * The name of the trait that you wish to supersede.
121 * This method provides 2 ways for defining the trait method.
122 * Option 1: String of trait to replace
123 * Option 2: Array of strings of traits to replace
125 * @param mixed $method
126 * @param mixed $traitToReplace
128 public function addTraitOverride($method, $traitsToReplace);
131 * Remove an override for a given trait::method
133 * $method:
134 * This method provides 2 ways for defining the trait method.
135 * Option 1: String Format: <trait name>::<method name>
136 * Option 2: Array
137 * key: traitName value: trait name
138 * key: method value: method name
140 * $overridesToRemove:
141 * The name of the trait that you wish to remove.
143 * This method provides 2 ways for defining the trait method.
144 * Option 1: String of trait to replace
145 * Option 2: Array of strings of traits to replace
147 * @param $traitAndMethod
148 * @param null $overridesToRemove
149 * @return $this
151 public function removeTraitOverride($method, $overridesToRemove = null);
154 * Return trait overrides
156 * @return array
158 public function getTraitOverrides();