src/Represent/Builder/Format/HalFormatBuilder.php
protected function handleProperty(\ReflectionProperty $property, ClassContext $classContext, $original, \stdClass $output)
    {
        $propertyContext = $this->propertyBuilder->propertyContextFromReflection($property, $original, $classContext);
        $value           = $propertyContext->value;
        $name            = $propertyContext->name;
        switch (true):
            case $this->checkArrayCollection($value):
                $value = $value->toArray();
            case is_array($value);
                $output->$name = $this->handleArray($value, $classContext->views);
                break;
            case is_object($value);
                $output->$name = $this->handleObject($value, $classContext->views);
                break;
            default:
                $output->$name = $value;
                break;
        endswitch;

        return $output;
    }
protected function handleProperty(\ReflectionProperty $property, ClassContext $classContext, $original, \stdClass $output)
    {
        $propertyContext = $this->propertyBuilder->propertyContextFromReflection($property, $original, $classContext);
        $value           = $propertyContext->value;
        $name            = $propertyContext->name;
        switch (true):
            case $this->checkArrayCollection($value):
                $value = $value->toArray();
            case is_array($value);
                $output->$name = $this->handleArray($value, $classContext->views);
                break;
            case is_object($value);
                $output->$name = $this->handleObject($value, $classContext->views);
                break;
            default:
                $output->$name = $value;
                break;
        endswitch;

        return $output;
    }
protected function handleProperty ( \ ReflectionProperty $ property , ClassContext $ classContext , $ original , \ stdClass $ output ) { $ propertyContext = $ this -> propertyBuilder -> propertyContextFromReflection ( $ property , $ original , $ classContext ) ; $ value = $ propertyContext -> value ; $ name = $ propertyContext -> name ; switch ( true ) : case $ this -> checkArrayCollection ( $ value ) : $ value = $ value -> toArray ( ) ; case is_array ( $ value ) ; $ output -> $ name = $ this -> handleArray ( $ value , $ classContext -> views ) ; break ; case is_object ( $ value ) ; $ output -> $ name = $ this -> handleObject ( $ value , $ classContext -> views ) ; break ; default : $ output -> $ name = $ value ; break ; endswitch ; return $ output ; }
Used to handle determining representing object properties
@param \ReflectionProperty             $property
@param                                 $original
@param                                 $output
@param \Represent\Context\ClassContext $classContext
@return stdClass
Used to handle determining representing object properties