public function process($value)
        {

            if ($this->isMandatory() && !$value)
            {
                throw new Exception($this->getMessage(self::IS_MISSING, ['param', $this->reference]));
            }

            $dataProcessor = $this->getDataProcessor();

            if ($dataProcessor instanceof ApplicationAwareInterface)
            {
                $dataProcessor->setApplication($this->getApplication());
            }

            $processedValue = $dataProcessor->process($value);

            if($this->isMandatory() && is_null($processedValue))
            {
                throw new Exception($this->getMessage(self::IS_MISSING, ['param', $this->reference]));
            }

            return $processedValue;
        }
public function process($value)
        {

            if ($this->isMandatory() && !$value)
            {
                throw new Exception($this->getMessage(self::IS_MISSING, ['param', $this->reference]));
            }

            $dataProcessor = $this->getDataProcessor();

            if ($dataProcessor instanceof ApplicationAwareInterface)
            {
                $dataProcessor->setApplication($this->getApplication());
            }

            $processedValue = $dataProcessor->process($value);

            if($this->isMandatory() && is_null($processedValue))
            {
                throw new Exception($this->getMessage(self::IS_MISSING, ['param', $this->reference]));
            }

            return $processedValue;
        }
public function process ( $ value ) { if ( $ this -> isMandatory ( ) && ! $ value ) { throw new Exception ( $ this -> getMessage ( self :: IS_MISSING , [ 'param' , $ this -> reference ] ) ) ; } $ dataProcessor = $ this -> getDataProcessor ( ) ; if ( $ dataProcessor instanceof ApplicationAwareInterface ) { $ dataProcessor -> setApplication ( $ this -> getApplication ( ) ) ; } $ processedValue = $ dataProcessor -> process ( $ value ) ; if ( $ this -> isMandatory ( ) && is_null ( $ processedValue ) ) { throw new Exception ( $ this -> getMessage ( self :: IS_MISSING , [ 'param' , $ this -> reference ] ) ) ; } return $ processedValue ; }
Process a value

The processed value will be stored as parameter value

@param mixed $value
@return mixed
@throws Exception
Process a value