public function retriveLayerObjects()
    {
        $classes = [];
        foreach ($this->engine->query('//dia:diagram/dia:layer') as $layer) {
            if ($layer->nodeName == 'dia:layer') {
                foreach ($layer->childNodes as $elementObject) {
                    if ($elementObject->nodeName == 'dia:object') {
                        foreach ($elementObject->childNodes as $childNodesAttributes) {
                            if ($childNodesAttributes->nodeName == 'dia:attribute' &&
                                    $childNodesAttributes->attributes->getNamedItem("name")->nodeValue == 'name'
                            ) {
                                $name = str_replace(['#'], [''], $childNodesAttributes->childNodes->item(1)->nodeValue);

                                $classes[$name] = $elementObject;
                            }
                        }
                    }
                }
            }
        }

        return $classes;
    }
public function retriveLayerObjects()
    {
        $classes = [];
        foreach ($this->engine->query('//dia:diagram/dia:layer') as $layer) {
            if ($layer->nodeName == 'dia:layer') {
                foreach ($layer->childNodes as $elementObject) {
                    if ($elementObject->nodeName == 'dia:object') {
                        foreach ($elementObject->childNodes as $childNodesAttributes) {
                            if ($childNodesAttributes->nodeName == 'dia:attribute' &&
                                    $childNodesAttributes->attributes->getNamedItem("name")->nodeValue == 'name'
                            ) {
                                $name = str_replace(['#'], [''], $childNodesAttributes->childNodes->item(1)->nodeValue);

                                $classes[$name] = $elementObject;
                            }
                        }
                    }
                }
            }
        }

        return $classes;
    }
public function retriveLayerObjects ( ) { $ classes = [ ] ; foreach ( $ this -> engine -> query ( '//dia:diagram/dia:layer' ) as $ layer ) { if ( $ layer -> nodeName == 'dia:layer' ) { foreach ( $ layer -> childNodes as $ elementObject ) { if ( $ elementObject -> nodeName == 'dia:object' ) { foreach ( $ elementObject -> childNodes as $ childNodesAttributes ) { if ( $ childNodesAttributes -> nodeName == 'dia:attribute' && $ childNodesAttributes -> attributes -> getNamedItem ( "name" ) -> nodeValue == 'name' ) { $ name = str_replace ( [ '#' ] , [ '' ] , $ childNodesAttributes -> childNodes -> item ( 1 ) -> nodeValue ) ; $ classes [ $ name ] = $ elementObject ; } } } } } } return $ classes ; }
Retrieve layer objects

@return array
Retrieve layer objects