> Estou aguardando aceite. Agora me gerou o seguinte erro:
> *Notice*: Undefined variable: entityManager in *
> C:\srv\htdocs\estagioweb\branches\leandro\estagioweb\php\test_class_UserAdm in.php
> * on line *36
> *Eu configurei o bootstrap.php assim:*
> *
>> <?php
>> require_once 'entities/class_UserAdmin.php';
>> require 'lib/Doctrine/ORM/Tools/Setup.php';
>> $lib = '';
>> Doctrine\ORM\Tools\Setup::registerAutoloadGit($lib);
>> use Doctrine\ORM\Tools\Setup;
>> use Doctrine\ORM\EntityManager;
>> $paths = array("/entities");
>> $isDevMode = false;
>> // the connection configuration
>> $dbParams = array(
>> 'driver' => 'pdo_mysql',
>> 'user' => 'estagioweb',
>> 'password' => 'ufop',
>> 'dbname' => 'estagioweb',
>> );
>> $config = Setup::createAnnotationMetadataConfiguration($paths,
>> $isDevMode);
>> $em = EntityManager::create($dbParams, $config);
> Em sexta-feira, 16 de novembro de 2012 11h55min53s UTC-2, Leandro Gomes da
> Silva escreveu:
>> Hello everyone! First of all, sorry for my english :)
>> Here's the problm: I'm trying to execute this file called
>> test_class_UserAdmin.php, but it insists to return for me this warning:
>> *Warning*: require(Doctrine\Common\Cache\**ArrayCache.php): failed to
>> open stream: No such file or directory in *(...)\Doctrine\Common\
>> ClassLoader.php* on line *163*
>> *Fatal error*: require(): Failed opening required 'Doctrine\Common\Cache\
>> **ArrayCache.php' (include_path='.;C:\srv\PHP5\**PEAR') in *(...)**
>> \Doctrine\Common\ClassLoader.php* on line *163*
>> I have already checked this file ArrayCache.php and it's ok, it is
>> located exactly on his spot.
>> Here's my file test_class_UserAdmin.php (Simple CRUD only):
>>> <?php
>>> require "bootstrap.php";
>>> /** Create a new object called UserAdmin */
>>> $user = new UserAdmin();
>>> /** CREATE */
>>> $user->setName('UserAdmin02');
>>> $user->setEmail('useradmin02@**ufop.br <useradmi...@ufop.br>');
>>> $user->setPassword('**useradmin02');
>>> $user->setActivationCode('**ActivationCode');
>>> $user->setSessionCode('**SessionCode');
>>> $user->setActive(0);
>>> /** READ */
>>> /*
>>> $user = $entityManager->find('**UserAdmin', 2);
>>> echo $user->toString();
>>> */
>>> /** UPDATE */
>>> /*
>>> $user = $entityManager->find('**UserAdmin', 2);
>>> $user->setName('New_**UserAdmin02');
>>> $user->setEmail('new_**useradmi...@ufop.br <new_useradmi...@ufop.br>');
>>> $user->setPassword('**newuseradmin02');
>>> $user->setActivationCode('new_**ActivationCode');
>>> $user->setSessionCode('new_**SessionCode');
>>> $user->setActive(1);
>>> */
>>> /** Persist to database */
>>> $entityManager->persist($user)**;
>>> /** DELETE */
>>> /*
>>> $user = $entityManager->find('**UserAdmin', 2);
>>> $entityManager->remove($user)
>>> */
>>> /** Do the magic */
>>> $entityManager->flush();
>> And my cli-config.php
>>> <?php
>>> require_once "bootstrap.php";
>>> $helperSet = new \Symfony\Component\Console\**Helper\HelperSet(array(
>>> 'em' => new \Doctrine\ORM\Tools\Console\**
>>> Helper\EntityManagerHelper($**entityManager) ));
>>> ?>
>> And finally, my bootstrap.php
>>> <?php
>>> use Doctrine\ORM\Tools\Setup;
>>> // require entities
>>> require_once "entities/class_UserAdmin.php"**;
>>> require_once "entities/class_**UserChefeDepartamento.php";
>>> require "Doctrine/ORM/Tools/Setup.php"**;
>>> require_once 'Doctrine/Common/ClassLoader.**php';
>>> Setup::registerAutoloadPEAR();
>>> $debug = true;
>>> $config = Setup::**createAnnotationMetadataConfig**
>>> uration(array(__DIR__."/**entities"), $debug);
>>> $conn = array(
>>> 'driver' => 'pdo_mysql',
>>> 'user' => 'estagioweb',
>>> 'password' => 'ufop',
>>> 'dbname' => 'estagioweb'
>>> );
>>> $entityManager = \Doctrine\ORM\EntityManager::**create($conn, $config);
>>> ?>
>> I hope someone could help me :)
> --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/doctrine-user/-/Hp4e8caKMiQJ.
> To post to this group, send email to doctrine-user@googlegroups.com.
> To unsubscribe from this group, send email to
> doctrine-user+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/doctrine-user?hl=en.