private function convert($value, $prefixFrom)
    {
        foreach ($this->getConstants() as $constName => $constValue) {
            // process constant if she's does start from reserved prefix and values was equals
            if (0 === strpos($constName, $prefixFrom) && $value === $constValue) {
                return $this->getAppropriateConstValue($prefixFrom, $constName);
            }
        }

        throw new UndefinedMapValueException($this->getClassName(), $value);
    }
private function convert($value, $prefixFrom)
    {
        foreach ($this->getConstants() as $constName => $constValue) {
            // process constant if she's does start from reserved prefix and values was equals
            if (0 === strpos($constName, $prefixFrom) && $value === $constValue) {
                return $this->getAppropriateConstValue($prefixFrom, $constName);
            }
        }

        throw new UndefinedMapValueException($this->getClassName(), $value);
    }
private function convert ( $ value , $ prefixFrom ) { foreach ( $ this -> getConstants ( ) as $ constName => $ constValue ) { // process constant if she's does start from reserved prefix and values was equals if ( 0 === strpos ( $ constName , $ prefixFrom ) && $ value === $ constValue ) { return $ this -> getAppropriateConstValue ( $ prefixFrom , $ constName ) ; } } throw new UndefinedMapValueException ( $ this -> getClassName ( ) , $ value ) ; }
Returns appropriated value by received origin value. Humanized value by received database value and vise versa.

@param string|int $value      Value for convert
@param string     $prefixFrom Constant prefix  which determine what the value should be returns
put self::PREFIX_DB to get appropriated humanized value
or self::PREFIX_HUMAN to get appropriated database value

@throws UndefinedMapValueException When received value does not exists

@return string|int
Returns appropriated value by received origin value . Humanized value by received database value and vise versa .