moin,
ich hab jetzt eine Idee die ich entwickeln werde bezüglich Interfaces
class Between extends AbstractConstruct implements FilterInterface, CountableExpressionInterface { /* .... */}
class Numeral extends AbstractConstruct implements CountableValueInterface, CountableValueInterface { /* ... */}
so kann man die Interfaces näher differenzieren und anstatt das…
// Between
public function __construct (
ConstructInterface $value,
ConstructInterface $minimum,
ConstructInterface $maximum,
bool $negation = false,
bool $safe = false // fuer bindParam()
) { /* ... */ }
…dass…
// Between
public function __construct (
ConstructInterface $value,
CountableExpressionInterface $minimum,
CountableExpressionInterface $maximum,
bool $negation = false,
) { /* ... */ }
…sodass man zumindest in der Initialisierung der Between
-Klasse prüfen kann, ob das die übergebene Objekte $maximum
und $minimum
, die das Interface CountableExpressionInterface
, was ja Konstruktorparameter ist, auch CountableValueInterface
implementieren.
So kann man diese Beiden in ein bindeParam()
packen, weil diese beiden Konstanten sind wie 8
, 'foobar'
, '%somthing_'
. Da hab ihr, Du und @Felix Riesterer, mich aufgeklärt 😀. Dafür mich ich sehr dankbar.
lgmb
--
Sprachstörung
Sprachstörung