Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/03/2013, 17:53
Samou
 
Fecha de Ingreso: junio-2009
Mensajes: 115
Antigüedad: 14 años, 9 meses
Puntos: 0
Autoload de directorio library

Hola a todos estoy encontrando problemas para cargar clases que tengo en el repertorio library de mi proyecto en zend framework (estoy usando la version 1.12). La estructura de mi proyecto es la siguiente:
Código:
/application
    /configs
    /controllers
    /forms
    /layouts
    /models
    /views
/data
/library
/public
En el fichero de application.ini tengo lo siguiente:

Código:
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
Y el archivo index.php contiene lo siguiente:
Código PHP:
<?php
// Define path to application directory
defined('APPLICATION_PATH')
    || 
define('APPLICATION_PATH'realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || 
define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    
realpath(APPLICATION_PATH '/../library'),
    
get_include_path(),
)));

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    
APPLICATION_ENV,
    
APPLICATION_PATH '/configs/application.ini'
);
$application->bootstrap()
            ->
run();
Pero cuando llamo a la clase TwitterOAuth que se encuentra dentro de library la aplicacion retorna el siguiente error: PHP Fatal error: Class 'TwitterOAuth' not found

Código PHP:
$twitterObj = new TwitterOAuth($consumerKey$consumerSecret); 
Espero puedan a ayudarme a resolver este problema q me trae de cabeza desde hace 2 dias. Muchas gracias de antemano!