public function processPreSet($entity, $name, &$value, $locale=null, $hook=true, $silentException=false) {
		if($hook)
			$this->trigger('set', [$entity, $name, &$value, $locale]);

		if($this->hasProperty($name)) {
			if($this->property($name)->get('hooks.set')) {
				$hook = $this->property($name)->get('hooks.set');
				$value = call_user_func_array($hook, [$value, $entity]);
			}

			if($this->property($name)->get('i18n')) {
				if($locale == 'all') {
					$val = [];
					foreach($value as $one => $v)
						$val[$one] = $this->property($name)->setDecorator($v, $entity, $name, $silentException);
					$value = $val;
				}
				else
					$value = $this->property($name)->setDecorator($value, $entity, $name, $silentException);
			}
			else
				$value = $this->property($name)->setDecorator($value, $entity, $name, $silentException);
		}
	}
public function processPreSet($entity, $name, &$value, $locale=null, $hook=true, $silentException=false) {
		if($hook)
			$this->trigger('set', [$entity, $name, &$value, $locale]);

		if($this->hasProperty($name)) {
			if($this->property($name)->get('hooks.set')) {
				$hook = $this->property($name)->get('hooks.set');
				$value = call_user_func_array($hook, [$value, $entity]);
			}

			if($this->property($name)->get('i18n')) {
				if($locale == 'all') {
					$val = [];
					foreach($value as $one => $v)
						$val[$one] = $this->property($name)->setDecorator($v, $entity, $name, $silentException);
					$value = $val;
				}
				else
					$value = $this->property($name)->setDecorator($value, $entity, $name, $silentException);
			}
			else
				$value = $this->property($name)->setDecorator($value, $entity, $name, $silentException);
		}
	}
public function processPreSet ( $ entity , $ name , & $ value , $ locale = null , $ hook = true , $ silentException = false ) { if ( $ hook ) $ this -> trigger ( 'set' , [ $ entity , $ name , & $ value , $ locale ] ) ; if ( $ this -> hasProperty ( $ name ) ) { if ( $ this -> property ( $ name ) -> get ( 'hooks.set' ) ) { $ hook = $ this -> property ( $ name ) -> get ( 'hooks.set' ) ; $ value = call_user_func_array ( $ hook , [ $ value , $ entity ] ) ; } if ( $ this -> property ( $ name ) -> get ( 'i18n' ) ) { if ( $ locale == 'all' ) { $ val = [ ] ; foreach ( $ value as $ one => $ v ) $ val [ $ one ] = $ this -> property ( $ name ) -> setDecorator ( $ v , $ entity , $ name , $ silentException ) ; $ value = $ val ; } else $ value = $ this -> property ( $ name ) -> setDecorator ( $ value , $ entity , $ name , $ silentException ) ; } else $ value = $ this -> property ( $ name ) -> setDecorator ( $ value , $ entity , $ name , $ silentException ) ; } }
Process values before entity set.
@param  Entity  $entity
@param  string  $name
@param  mixed   $value
@param  string  $locale
@param  boolean $hook             True to enable hooks.
@param boolean  $silentException
Process values before entity set .