main/app/API/Transfer/Adapter/CsvAdapter.php
private function getCsvSerialized(\stdClass $object, $path)
    {
        //it's easier to work with objects here
        $parts = explode('.', $path);
        $first = array_shift($parts);

        if (property_exists($object, $first) && is_object($object->{$first})) {
            return $this->getCsvSerialized($object->{$first}, implode($parts, '.'));
        }

        if (property_exists($object, $first) && is_array($object->{$first})) {
            return $this->getCsvArraySerialized($object->{$first}, implode($parts, '.'));
        }

        if (property_exists($object, $first) && !is_array($object->$first)) {
            return $object->{$first};
        }
    }
private function getCsvSerialized(\stdClass $object, $path)
    {
        //it's easier to work with objects here
        $parts = explode('.', $path);
        $first = array_shift($parts);

        if (property_exists($object, $first) && is_object($object->{$first})) {
            return $this->getCsvSerialized($object->{$first}, implode($parts, '.'));
        }

        if (property_exists($object, $first) && is_array($object->{$first})) {
            return $this->getCsvArraySerialized($object->{$first}, implode($parts, '.'));
        }

        if (property_exists($object, $first) && !is_array($object->$first)) {
            return $object->{$first};
        }
    }
private function getCsvSerialized ( \ stdClass $ object , $ path ) { //it's easier to work with objects here $ parts = explode ( '.' , $ path ) ; $ first = array_shift ( $ parts ) ; if ( property_exists ( $ object , $ first ) && is_object ( $ object -> { $ first } ) ) { return $ this -> getCsvSerialized ( $ object -> { $ first } , implode ( $ parts , '.' ) ) ; } if ( property_exists ( $ object , $ first ) && is_array ( $ object -> { $ first } ) ) { return $ this -> getCsvArraySerialized ( $ object -> { $ first } , implode ( $ parts , '.' ) ) ; } if ( property_exists ( $ object , $ first ) && ! is_array ( $ object -> $ first ) ) { return $ object -> { $ first } ; } }
Returns the property of the object according to the path for the csv export.

@param \stdClass $object
@param string    $path

@return string
Returns the property of the object according to the path for the csv export .