public function getData(Entity $entity)
    {
        $column = $this->analyzer->listColumns();
        $data = array();

        foreach ($column as $key => $value) {
            $method = 'get' . Utils::capitalize($key);
            $data[$key] = $entity->$method();
            if (is_null($data[$key])) $data[$key] = array();
            if ($data[$key] instanceof ArrayCollection) $data[$key] = $data[$key]->toArray();
        }

        $data['objectclass'] = $entity->getObjectClass()->toArray();

        return $data;
    }
public function getData(Entity $entity)
    {
        $column = $this->analyzer->listColumns();
        $data = array();

        foreach ($column as $key => $value) {
            $method = 'get' . Utils::capitalize($key);
            $data[$key] = $entity->$method();
            if (is_null($data[$key])) $data[$key] = array();
            if ($data[$key] instanceof ArrayCollection) $data[$key] = $data[$key]->toArray();
        }

        $data['objectclass'] = $entity->getObjectClass()->toArray();

        return $data;
    }
public function getData ( Entity $ entity ) { $ column = $ this -> analyzer -> listColumns ( ) ; $ data = array ( ) ; foreach ( $ column as $ key => $ value ) { $ method = 'get' . Utils :: capitalize ( $ key ) ; $ data [ $ key ] = $ entity -> $ method ( ) ; if ( is_null ( $ data [ $ key ] ) ) $ data [ $ key ] = array ( ) ; if ( $ data [ $ key ] instanceof ArrayCollection ) $ data [ $ key ] = $ data [ $ key ] -> toArray ( ) ; } $ data [ 'objectclass' ] = $ entity -> getObjectClass ( ) -> toArray ( ) ; return $ data ; }
Inverse the hydrate method
@param $entity
@return array
Inverse the hydrate method