简体   繁体   English

应用程序/库中的SocialEngine PHP类未加载

[英]SocialEngine PHP classes in application/libraries are not being loaded

I'm developing a web application based on SocialEnginePHP 4.10. 我正在开发基于SocialEnginePHP 4.10的Web应用程序。

I've added a library to /application/libraries by following these steps: - Developer SDK -> Create a Package (choosing type = Library) - Added the library .tar skeleton via Package Manager -> Install New Package (all good and successful) - I added the files containing the PHP classes of the library inside /application/Libraries - tried to instantiate one of the classes from within a different module but I got this error: 我已按照以下步骤将库添加到/ application / libraries中:-开发人员SDK->创建程序包(选择类型=库)-通过程序包管理器添加了库.tar骨架->安装新程序包(一切正常)-我在/ application / Libraries中添加了包含库的PHP类的文件-试图从其他模块中实例化其中一个类,但出现此错误:

    2018-03-19T22:40:58+00:00 ERR (3): Error Code: 4247ae
Error: Class 'CamShowAPI' not found in /Applications/MAMP/htdocs/social-engine-4.10.1/application/modules/Livecams/controllers/CamshowController.php:9

Stack trace:
#0 /Applications/MAMP/htdocs/social-engine-4.10.1/application/libraries/Zend/Controller/Action.php(516): Livecams_CamshowController->webserviceAction()
#1 /Applications/MAMP/htdocs/social-engine-4.10.1/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('webserviceActio...')
#2 /Applications/MAMP/htdocs/social-engine-4.10.1/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#3 /Applications/MAMP/htdocs/social-engine-4.10.1/application/modules/Core/Bootstrap.php(84): Zend_Controller_Front->dispatch()
#4 /Applications/MAMP/htdocs/social-engine-4.10.1/application/libraries/Engine/Application.php(160): Core_Bootstrap->run()
#5 /Applications/MAMP/htdocs/social-engine-4.10.1/application/index.php(223): Engine_Application->run()
#6 /Applications/MAMP/htdocs/social-engine-4.10.1/index.php(25): include('/Applications/M...')
#7 {main}

Just in case, I then tried to: - Developer SDK -> Build Package - delete the library - add again the library using the newly built package so that all the files would be mentioned inside application/packages/library-camshow-4.0.0.json 为了以防万一,我然后尝试:-开发人员SDK->构建软件包-删除库-使用新构建的软件包再次添加该库,以便在application / packages / library-camshow-4.0.0内提及所有文件.json

Got the same error. 得到了同样的错误。 What am I doing wrong? 我究竟做错了什么? How do I tell SE to load my Libraries' classes? 如何告诉SE加载我的图书馆的课程?

You should create a Module , not a Library . 您应该创建一个Module ,而不是一个Library Developers are adding new features with modules. 开发人员正在为模块添加新功能。 API classes such as CamShowAPI mentioned can go to Api folder of the new module. 提及的诸如CamShowAPI类的API类可以转到新模块的Api文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM