Class

eZ\Publish\Core\REST\Common\Output\ValueObjectVisitorDispatcher

class ValueObjectVisitorDispatcher

Dispatches value objects to a visitor depending on the class name.

Methods

setOutputVisitor(Visitor $outputVisitor)

setOutputGenerator(Generator $outputGenerator)

addVisitor(string $visitedClassName, ValueObjectVisitor $visitor)

mixed visit(object $data)

Details

at line 31
public setOutputVisitor(Visitor $outputVisitor)

Parameters

Visitor $outputVisitor

at line 36
public setOutputGenerator(Generator $outputGenerator)

Parameters

Generator $outputGenerator

at line 45
public addVisitor(string $visitedClassName, ValueObjectVisitor $visitor)

Parameters

string $visitedClassName The FQN of the visited class
ValueObjectVisitor $visitor The visitor object

at line 58
public mixed visit(object $data)

Parameters

object $data The visited object

Return Value

mixed

Exceptions

NoVisitorFoundException
InvalidTypeException