public function handle(DOMElement $row, XMLAConnectionContext $context, NamedList $list) { $schemaName = XMLAUtil::stringElement($row, "SCHEMA_NAME") === NULL ? '' : XMLAUtil::stringElement($row, "SCHEMA_NAME"); $catalogName = XMLAUtil::stringElement($row, "CATALOG_NAME"); if (!$catalogName && XMLAUtil::stringElement($row, "CUBE_NAME")) { $catalogName = XMLAUtil::stringElement($row, "CUBE_NAME"); } //print $catalogName . ':' . $schemaName . PHP_EOL; //echo 'XMLACatalogSchmeHandler: before if'; if ($this->catalogName == $catalogName && $list->get($schemaName) === NULL) { //echo 'XMLACatalogSchmeHandler: inside if'; if ($schemaName !== null) { $list->add(new XMLASchema($context->getCatalog($row), $schemaName)); } } }
public function get($index) { if ($this->state == self::STATE_NEW) { $this->getList(); } return parent::get($index); /* if ( parent::offsetExists( $index ) ) return parent::offsetGet ( $index ); // trying to get by index if ( is_numeric( $index ) ) { $index = (int)$index; // since PHP arrays are actually hash tables, "index" doesn't really exist. // in this case, we emulate it with a counting foreach loop. it's still fast. if ( $index <= 0 || $index >= parent::count () ) return NULL; $i = 0; foreach ( $this as $key => $obj ) { if ( $i == $index ) return $obj; $i++; } } else { return parent::offsetExists ( $index ) ? parent::offsetGet ( $index ) : NULL; } * */ }