Runs all converter functions

Note that if you make use of IDS_Converter::runAll(), existing class
methods will be executed in the same order as they are implemented in the
class tree!

@param string $value the value to convert

@static
@return string
774357
public static function runAll($value)
    {
        foreach (get_class_methods(__CLASS__) as $method) {

            if (strpos($method, 'run') === 0) {
                continue;
            }
            $value = self::$method($value);
        }

        return $value;
    }
384447
private function mapYvalue($value)
    {

        $rangeMapper = new \sb\Math\RangeMapper(Array(30, $this->graph_height), Array($this->min, $this->max));
        return $rangeMapper->convert($value);
    }
1067884
public function move($value)
    {
        // No need to update if $value is already current one
        if ($value === $this->current()) {
            return;
        }

        $index = $this->search($value);

        if (false === $index) {
            throw new \InvalidArgumentException(sprintf('"%s" value not found in JobGraph', $value));
        }

        return $this->seek($index);
    }
1092445
public function reverseTransform($value)
    {
        $transitions = array();

        foreach ($value as $flattened) {
            $statuses = $this->getTransitionStatusIds($flattened);
            $statusFrom = $this->getStatus($statuses['from']);
            $statusTo = $this->getStatus($statuses['to']);
            if ($statusFrom instanceof StatusInterface && $statusTo instanceof StatusInterface) {
                $transitions[] = $this->transitionFactory->create($statusFrom, $statusTo);
            }
        }

        return $transitions;
    }
1288739
protected function castToStdClass($value)
    {
        if (is_object($value) && !$value instanceof \stdClass) {
            $value = get_object_vars($value);
        }

        return $this->castToObject($value);
    }
1283129
public static function get($value): self
    {
        $class = get_called_class();

        if ($value instanceof self) {
            $value = $value->value();
        }

        if (!static::has($value)) {
            throw EnumException::invalidEnumValue($class, $value);
        }

        return static::all()[$value];
    }
95257
public function filter($value)
    {
        foreach($this->getFilters() as $index => $filter) {
            // Extract the params
            list($method, $params) = $filter;

            // If method is null, we use the index as the method name
            $method = is_null($method) ? $index : $method;

            // Build the params for the filter
            array_unshift($params, $value);

            // If it's a anonymous function
            if (!is_string($method) && is_callable($method)) {

                $value = call_user_func_array($method, $params);

                // if it's a local method
            } else {

                if (!method_exists($this, $method)) {
                    throw new \Exception('Method "'. $method .'" not found for filter : ' . $index);
                }

                $value = call_user_func_array([$this, $method], $params);
            }
        }

        return $value;
    }
308715
private function dumpValue($value)
    {
        if (is_array($value)) {
            $code = array();
            foreach ($value as $k => $v) {
                $code[$k] = $this->dumpValue($v);
            }

            return $code;
        } elseif ($value instanceof Reference) {
            return $this->getServiceCall((string) $value, $value);
        } elseif ($value instanceof Parameter) {
            return $this->getParameterCall((string) $value);
        } elseif ($value instanceof Expression) {
            return $this->getExpressionCall((string) $value);
        } elseif (is_object($value) || is_resource($value)) {
            throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
        }

        return $value;
    }
335989
public function transform($value)
    {
        if (null === $value) {
            return '';
        } elseif ($value instanceof Collection) {
            $values = $value->toArray();
        } elseif (is_array($value)) {
            $values = $value;
        } else {
            throw new TransformationFailedException('TagTransformer expects to transform an array or Collection value');
        }

        $propertyAccessor = $this->propertyAccessor;
        $property = $this->property;
        $values = array_map(function ($value) use ($propertyAccessor, $property) {
            return $propertyAccessor->getValue($value, $property);
        }, $values);

        return implode(',', $values);
    }
251638
public function dump($value)
    {
        if (class_exists('Symfony\Component\VarDumper\Cloner\VarCloner')) {
            static $dumper = null;

            // re-use the same var-dumper instance, so it won't re-render the global styles/scripts on each dump.
            if (!$dumper) {
                $dumper = new HtmlDumper();

                $styles = array(
                    'default' => '',
                    'num' => '',
                    'const' => '',
                    'str' => '',
                    'note' => '',
                    'ref' => '',
                    'public' => '',
                    'protected' => '',
                    'private' => '',
                    'meta' => '',
                    'key' => '',
                    'index' => '',
                );
                $dumper->setStyles($styles);
            }

            $cloner = new VarCloner();
            return $dumper->dump($cloner->cloneVar($value));
        }
        return print_r($value, true);
    }
1233346
private function convertValue($value)
    {
        if (empty($value)) {
            return null;
        }

        if (\is_array($value)) {
            return $value;
        }

        switch ($this->fieldType) {
            case 'radio':
                return $value;
            case 'checkbox':
                $delimiter = (false !== \stripos($value, "\t")) ? "\t" : ',';

                return StringUtil::trimsplit($delimiter, $value);
            default:
        }
        throw new \RuntimeException('Unknown field type encountered: ' . $this->fieldType);
    }
637885
private function format($value)
    {
        if (is_callable($this->formatter)) {
            $value = call_user_func($this->formatter, $value, $this->dataSet);
        }
        return $value;
    }
308585
public function transform($value)
    {
        if (null !== $value && 1 !== $this->divisor) {
            if (!is_numeric($value)) {
                throw new TransformationFailedException('Expected a numeric.');
            }
            $value /= $this->divisor;
        }

        return parent::transform($value);
    }
882876
public static function fromValue($value)
    {
        $values = static::getValues();
        if (array_key_exists($value, $values)) {
            return new static($values[$value], $value);
        }
        throw new \InvalidArgumentException("No enum constant value '$value' class " . get_called_class());
    }
25447
public function getTransformer($value): Transformer
    {
        foreach ($this->getAllTransformers() as $transformer) {
            if ($transformer->canTransform($value)) {
                return $transformer;
            }
        }

        throw Untransformable::noTransformerFound($value);
    }
1175183
public function transform($value)
    {
        if (!$value instanceof Value) {
            return '';
        }

        return $this->docbookToXhtml5EditConverter->convert($value->xml)->saveXML();
    }
103352
protected function parseAdvancedUses(string $value): MultiLevel
    {
        $level = 0;
        $uses = [''];
        $current = 0;
        $root = '';

        foreach (\str_split($value) as $char) {
            switch ($char) {
                case '{':
                    if ($level == 0) {
                        $root = $uses[0];
                        $uses[$current] = '';
                        ++$level;
                        break;
                    } else {
                        $uses[$current] .= '{';
                        ++$level;
                        break;
                    }
                    // no break
                case ',':
                    if ($level === 1) {
                        ++$current;
                        $uses[$current] = '';
                        break;
                    } else {
                        $uses[$current] .= ',';
                        break;
                    }
                    // no break
                case '}':
                    if ($level === 2) {
                        $uses[$current] .= '}';
                        --$level;
                        break;
                    } elseif ($level === 1) {
                        ++$current;
                        $uses[$current] = '';
                        --$level;
                        break;
                    }
                    // no break
                default:
                    $uses[$current] .= $char;
            }
        }

        $alias = $uses[$current] ? \str_replace('>', '', $uses[$current]) : $root;

        \array_pop($uses);

        return new MultiLevel($root, $alias, $uses);
    }