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

		if(!$this->hasProperty($name))
			return;

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

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

		if(!$this->hasProperty($name))
			return;

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

		$value = $this->property($name)->_doSet($value, $entity, $name, $silentException);
	}
public function processPreAdd ( $ entity , $ name , & $ value , $ locale = null , $ hook = true , $ silentException = false ) { if ( $ hook ) $ this -> trigger ( 'set' , [ $ entity , $ name , & $ value , $ locale ] ) ; if ( ! $ this -> hasProperty ( $ name ) ) return ; if ( $ this -> property ( $ name ) -> get ( 'hooks.set' ) ) { $ hook = $ this -> property ( $ name ) -> get ( 'hooks.set' ) ; $ value = call_user_func_array ( $ hook , [ $ value , $ entity ] ) ; } $ value = $ this -> property ( $ name ) -> _doSet ( $ value , $ entity , $ name , $ silentException ) ; }
Process values before adding to a ManyCollection.
@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 adding to a ManyCollection .