@param string $value

@return Video|\Traversable
434036
public function reverseTransform($value)
    {
        if (!$value) {
            return null;
        }

        if (!is_string($value)) {
            throw new TransformationFailedException('Expected a string.');
        }

        if (!$value || !$this->parseUrl($value)) {
            throw new TransformationFailedException('Empty or invalid string.');
        }

        $video = $this->videoManager->findByVideoId($this->videoId);

        if (!$video) {
            $video = $this->videoManager->createVideo();

            $video->setVideoId($this->videoId);
            $video->setType($this->videoType);
            $video->setUrl($value);
        }

        return $video;
    }
847697
public function setCoreTvsBelowContent($value)
    {
        $this->setFieldName('tvs_below_content');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
1242684
public function hash2SortOrder($value)
    {
        $sortOrder = null;

        if ($value !== null) {
            if (strtoupper($value) === 'ASC') {
                $sortOrder = Location::SORT_ORDER_ASC;
            } else {
                $sortOrder = Location::SORT_ORDER_DESC;
            }
        }

        return $sortOrder;
    }
1193061
public function next($value): self
    {
        $this->ensureIsNotLocked();

        $this->value = $value;
        $this->locked = true;

        return $this;
    }
342897
public function transform($value)
    {
        $transitions = array();

        foreach ($value as $transition) {
            $transitions[] = $this->generateTransitionName($transition->getStatusFrom(), $transition->getStatusTo());
        }

        return $transitions;
    }
811402
public function transform($value)
    {
        if (null === $value) {
            $value = $this->fieldType->getEmptyValue();
        }

        return array_merge(
            $this->getDefaultProperties(),
            [
                'hasController' => $value->hasController,
                'loop' => $value->loop,
                'autoplay' => $value->autoplay,
                'width' => $value->width,
                'height' => $value->height,
            ]
        );
    }
118331
protected function filter($value)
    {
        if (!$this->filters instanceof IFilterCollection) {
            return $value;
        }

        return $this->filters->filter($value);
    }
796775
protected function compileEchos($value)
    {
        $difference = strlen($this->contentTags[0]) - strlen($this->escapedTags[0]);

        if ($difference > 0) {
            return $this->compileEscapedEchos($this->compileRegularEchos($value));
        }

        return $this->compileRegularEchos($this->compileEscapedEchos($value));
    }
1205081
public static function convertDashToCamelCase ($value)
    {
        $Filter = new \Zend\Filter\Word\DashToCamelCase();
        return $Filter->filter($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);
    }
676851
public function cast($value)
    {
        if (isset($this->traversable) && !is_a($this->traversable, Traversable::class, true)) {
            return $this->dontCast($value, "{$this->traversable} is not Traversable");
        }

        $fn = 'cast' . ucfirst(gettype($value));
        $result = method_exists($this, $fn) ? $this->$fn($value) : (array)$value;

        if (!is_iterable($result)) {
            return $result;
        }

        //Commented out as there's no HandlerRepositoryInterface
        // if (isset($this->subtype)) {
        //     $result = $this->typecast instanceof HandlerRepositoryInterface
        //         ? $this->castEachWithHandler($result, $this->typecast)
        //         : $this->castEach($result);
        // }

        if (isset($this->subtype)) {
            $result = $this->castEach($result);
        }

        if (is_array($result) && isset($this->traversable)) {
            $class = $this->traversable;
            $result = new $class($result);
        }

        return $result;
    }
678981
public function selectLink($value)
    {
        $xpath = sprintf('descendant-or-self::a[contains(concat(\' \', normalize-space(string(.)), \' \'), %s) ', static::xpathLiteral(' '.$value.' ')).
                            sprintf('or ./img[contains(concat(\' \', normalize-space(string(@alt)), \' \'), %s)]]', static::xpathLiteral(' '.$value.' '));

        return $this->filterRelativeXPath($xpath);
    }
25900
public function filter($value)
    {
        if (!is_scalar($value)) {
            return $value;
        }
        $value = (string) $value;

        if (null !== $this->getEncoding()) {
            return mb_strtolower($value, $this->options['encoding']);
        }

        return strtolower($value);
    }
1013756
private function makeReal($value)
    {
        if (is_array($value)) {
            foreach ($value as $key => $val) {
                $value[$key] = $this->makeReal($val);
            }
        }

        if ($value instanceof ObjectStub) {
            return $value->getObject();
        }

        return $value;
    }
1267477
private function PrepareValue( $value )
	{
		if ( is_null( $value ) )
			return Undefined::getValue();

		if ( $value instanceof \DOMNode )
		{
			$nav = new DOM\DOMXPathNavigator( $value );
			return $nav;
		}

		if ( $value instanceof XPath2NodeIterator )
		{
			return $value;
		}

		if ( is_array( $value ) || $value instanceof \ArrayIterator )
		{
			return new NodeIterator( function() use( $value ) { return $this->CreateIterator( $value ); } );
		}

		return $value;
	}
128477
public function setCoreXhtmlUrls($value)
    {
        $this->setFieldName('xhtml_urls');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
749896
private function toObjectArray(\Traversable $value) {
        $class = get_class($value);
        if ($value instanceof \ArrayObject) {
            return new $class($value->getArrayCopy(), $value->getFlags(), $value->getIteratorClass());
        } elseif ($value instanceof \ArrayAccess) {
            $r = new $class;
            foreach ($value as $k => $v) {
                $r[$k] = $v;
            }
            return $r;
        }
        return iterator_to_array($value);
    }