Ver Mensaje Individual
  #7 (permalink)  
Antiguo 29/12/2010, 11:21
niewpendejo
 
Fecha de Ingreso: agosto-2009
Mensajes: 138
Antigüedad: 14 años, 8 meses
Puntos: 0
Busqueda Respuesta: Integrar Doctrine 2 con Zend framework

Los links estan muy bien ,pero hay que darle mejor las gracias a quien se lo ha currado , yo simplemente buscado por google...

Y sigo con el mismo problema y no encuentro la solucion :

Fatal error: Class 'Symfony\Component\Console\Helper\HelperSet' not found in C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\zf\library\bin\cli-config.php on line 26

mi estructura es la siguiente , es algo de los path , pero no consigo resolverla...
library:
-Doctrine
-Common
-ORM
-DBAL
-Symfony
-Zend

-Zend
-bin
-cli-config.php
-doctrine.bat
-doctrine
-doctrine.php
-zf.sh
-zf.bat
-zf.php

mi
y mi cli-config.php es:
Código PHP:
<?php

require_once 'C:/Archivos de programa/Apache Software Foundation/Apache2.2/htdocs/zf/library/Doctrine/Common/ClassLoader.php';

$classLoader = new DoctrineCommonClassLoader('Application\Models'dirname(dirname(dirname(__FILE__))));
$classLoader->register();

$classLoader = new DoctrineCommonClassLoader('Application\Models\Proxies'dirname(dirname(dirname(__FILE__))));
$classLoader->register();

$config = new DoctrineORMConfiguration();
$cache = new DoctrineCommonCacheArrayCache();
$config->setMetadataCacheImpl($cache);
$driverImpl $config -> newDefaultAnnotationDriver(dirname(dirname(dirname(__FILE__))) . '/application/models');
$config->setMetadataDriverImpl($driverImpl);
$config->setProxyDir(dirname(dirname(dirname(__FILE__))) . '/application/models/proxies');
$config->setProxyNamespace('Application\Models\Proxies');

$connectionOptions = array(
    
'driver' => 'pdo_mysql',
    
'path' => dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR implode(DIRECTORY_SEPARATOR, array('data''db''database-dev.db'))
);

$em DoctrineORMEntityManager::create($connectionOptions$config);

$helperSet = new SymfonyComponentConsoleHelperHelperSet(array(
    
'db' => new DoctrineDBALToolsConsoleHelperConnectionHelper($em->getConnection()),
    
'em' => new DoctrineORMToolsConsoleHelperEntityManagerHelper($em)
));
y mi doctrine.php es.

Código PHP:
<?php
/*
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * This software consists of voluntary contributions made by many individuals
 * and is licensed under the LGPL. For more information, see
 * <http://www.doctrine-project.org>.
 */

$lib ='C:/Archivos de programa/Apache Software Foundation/Apache2.2/htdocs/zf/library/';
require_once 
'C:/Archivos de programa/Apache Software Foundation/Apache2.2/htdocs/zf/library/Doctrine/Common/ClassLoader.php';
$classLoader = new DoctrineCommonClassLoader('Doctrine\Common'$lib);
$classLoader->register();

//$classLoader = new \Doctrine\Common\ClassLoader('C:/Archivos de programa/Apache Software Foundation/Apache2.2/htdocs/zf/library/Doctrine');
//$classLoader->register();

$classLoader = new DoctrineCommonClassLoader('Doctrine\DBAL'$lib);
$classLoader->register();

$classLoader = new DoctrineCommonClassLoader('Doctrine\ORM'$lib);
$classLoader->register();



/*$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Zend', $lib);
$classLoader->register();*/
$classLoader = new DoctrineCommonClassLoader('Doctrine\Symfony''C:/Archivos de programa/Apache Software Foundation/Apache2.2/htdocs/zf/library/Doctrine');
$classLoader->register();


$configFile getcwd() . DIRECTORY_SEPARATOR 'cli-config.php';

$helperSet null;

if (
file_exists($configFile)) {
    if ( ! 
is_readable($configFile)) {
        
trigger_error(
            
'Configuration file [' $configFile '] does not have read permission.'E_ERROR
        
);
    }
   
    require 
$configFile;

   
    foreach (
$GLOBALS as $helperSetCandidate) {
        if (
$helperSetCandidate instanceof SymfonyComponentConsoleHelperHelperSet) {
            
$helperSet $helperSetCandidate;
            break;
        }
    }
}

$helperSet = ($helperSet) ?: new SymfonyComponentConsoleHelperHelperSet();

DoctrineORMToolsConsoleConsoleRunner::run($helperSet);
Un saludo , a ver si alguien ve el error...q yo ya no veo naaa de naaa