public static function getJustificationConstant($value) {

        // if the value coming in, is a integer, ensure it is one of the constants
        if (is_int($value)) {

            // get the justification integer values
            $values = array_values(self::$justificationConstants);

            // if the integer submitted is one of those values, return it
            if (in_array($value, $values)) {

                // return the valid value
                return $value;
            }

        }
        // if the value coming in is a string
        else if (is_string($value)) {

            // trim the string
            $value = trim($value);

            // transform to uppercase
            $value = strtoupper($value);

            // if it is in the array of string values
            if (isset(self::$justificationConstants[$value])) {

                // return the matching integer value
                return self::$justificationConstants[$value];


            } else {

                // not a valid string
                return self::LEFT;
            }

        } else {

            // something went wrong, return left
            return self::LEFT;
        }

        return self::LEFT;
    }