==== Entities definieren ===== name; } public function setName($name) { $this->name = $name; } public function getId() { return $this->id; } } ==== XML ===== ==== Konfiguration ==== ` for up to date autoloading details. use Doctrine\ORM\Tools\Setup; require_once "Doctrine/ORM/Tools/Setup.php"; Setup::registerAutoloadPEAR(); // Create a simple "default" Doctrine ORM configuration for XML Mapping $isDevMode = true; $config = Setup::createXMLMetadataConfiguration(array(__DIR__."/config/xml"), $isDevMode); // or if you prefer yaml or annotations //$config = Setup::createAnnotationMetadataConfiguration(array(__DIR__."/entities"), $isDevMode); //$config = Setup::createYAMLMetadataConfiguration(array(__DIR__."/config/yaml"), $isDevMode); // database configuration parameters $conn = array( 'dbname' => 'orcl', 'user' => 'hr', 'password' => 'hr', 'host' => '10.0.2.15', 'port' => '1521', 'driver' => 'oci8', 'charset' => 'NLS_CHARACTERSET', ); // obtaining the entity manager $entityManager = \Doctrine\ORM\EntityManager::create($conn, $config); ==== Bootstrap Code ==== ==== cli-config ==== new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($entityManager) )); ==== Einfuegen ==== setName($newTest); $entityManager->persist($test); $entityManager->flush(); echo "Created Test with ID " . $test->getId() . "\n"; ==== Auslesen ==== createQuery($dql); $query->setMaxResults(30); $tests = $query->getResult(); foreach($tests AS $test) { ## var_dump($test); echo $test->getName()."\n"; }