Просмотр исходного кода

Do not ask for setter if the property is defined as @ReadOnly

Amal Raghav 13 лет назад
Родитель
Сommit
528620884e
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Metadata/PropertyMetadata.php

+ 1 - 1
Metadata/PropertyMetadata.php

@@ -56,7 +56,7 @@ class PropertyMetadata extends BasePropertyMetadata
                 }
             }
 
-            if (empty($setter)) {
+            if (empty($setter) && !$this->readOnly) {
                 if ($class->hasMethod('set'.$this->name) && $class->getMethod('set'.$this->name)->isPublic()) {
                     $setter = 'set'.$this->name;
                 } else {