mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 14:46:19 +08:00 
			
		
		
		
	Update concept-properties.md
or 应翻译为“或”
This commit is contained in:
		@ -77,8 +77,8 @@ $object->label = 'abc';
 | 
				
			|||||||
  将赋给成员变量而不是 setter `setLabel()` 方法。
 | 
					  将赋给成员变量而不是 setter `setLabel()` 方法。
 | 
				
			||||||
* 这类属性不支持可见性(访问限制)。定义属性的 getter 和 setter 方法是 public、protected 还是 private 对属性的可见性没有任何影响。
 | 
					* 这类属性不支持可见性(访问限制)。定义属性的 getter 和 setter 方法是 public、protected 还是 private 对属性的可见性没有任何影响。
 | 
				
			||||||
* 这类属性的 getter 和 setter 方法只能定义为**非静态**的,若定义为静态方法(static)则不会以相同方式处理。
 | 
					* 这类属性的 getter 和 setter 方法只能定义为**非静态**的,若定义为静态方法(static)则不会以相同方式处理。
 | 
				
			||||||
* 对不确定有无魔术方法(getter setter)的属性正常调用 `property_exists()` 将不会生效。你应该分别调用 [[yii\base\BaseObject::canGetProperty()|canGetProperty()]] 
 | 
					* 对不确定有无魔术方法(getter 或 setter)的属性正常调用 `property_exists()` 将不会生效。你应该分别调用 [[yii\base\BaseObject::canGetProperty()|canGetProperty()]] 
 | 
				
			||||||
和 [[yii\base\BaseObject::canSetProperty()|canSetProperty()]] 。  
 | 
					或 [[yii\base\BaseObject::canSetProperty()|canSetProperty()]] 。  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
回到开头提到的问题,与其处处要调用 `trim()` 函数,
 | 
					回到开头提到的问题,与其处处要调用 `trim()` 函数,
 | 
				
			||||||
现在我们只需在 setter `setLabel()` 方法内调用一次。
 | 
					现在我们只需在 setter `setLabel()` 方法内调用一次。
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user