Beklendiği gibi bu kod çalışmaz:
// $field contains the name of a subclass of WMSInput.
$fieldClone = clone $field;
echo $fieldClone->getInputName();
// Method on abstract WMSInput superclass.
$fieldClone->setInputName( 'name' );
echo $fieldClone->getInputName();
WMSInput class:
abstract class WMSInput {
private $inputName;
public function setInputName( $inputName ) {
$this->inputName = $inputName;
}
}
Hayır PHP hataları (hata raporlama E_ALL ayarlanır) vardır.
Actual Results
email
email
Expected Results
email
name
Herhangi bir fikir?