zend-framework

More settings for the facebook php API

和自甴很熟 提交于 2020-01-05 19:20:15
问题 Maybe I searched completely in the wrong way, and the facebook documentation pretty much sucks in my opinion. I was wondering, I'm connecting to facebook with the settings below and that works (I'm able to retrieve the profile information of the logged in user allows my application to access his profile.) Are there other options I can set, like the callback url and the expiration (which I want to set to never, so I can save the token in my db and re-use it)? This is the config now: $facebook

Joining Tables With Zend Framework PHP

怎甘沉沦 提交于 2020-01-05 13:28:09
问题 I am relatively new to the Zend Framework. I understand the usage of Zend_Table and can obtain data using the Zend functions from the table associated with that class. For example I have a video table and in another table I have the association between the video and what category it is in. Im a little stumped how to active a select like the following within the framework: SELECT * FROM video , category WHERE category . category_id = 3 AND video . id = category . video_id Any advice would be

Are relatively “thick” controllers normal with Zend_Form? (And if not, how does one thin them out?)

不羁的心 提交于 2020-01-05 10:29:21
问题 I've got a form that looks like this: class Cas_Form_Company extends Zend_Form { /** * @param Cas_Model_Company|null $company */ public function __construct(Cas_Model_Company $company = null) { parent::__construct(); $id = new Zend_Form_Element_Hidden('id'); $name = new Zend_Form_Element_Text('name'); $name->addValidator('stringLength', false, array(2,45)); $name->addValidator(new Cas_Model_Validate_CompanyUnique()); $name->setLabel('Name'); $submit = new Zend_Form_Element_Submit('Submit');

routing of Zend framework

天大地大妈咪最大 提交于 2020-01-05 08:52:47
问题 I create a module in zend project and the module has it's own mvc folders, here's the structure of the module, i want to open the index page which located in the view floder of the visit module here's the path of the index.phtml InspectionSys\application\modules\visits\views\scripts\visits\index.phtml and I try to make routing to the index page in application.ini resources.router.routes.user.route = /visit resources.router.routes.user.defaults.module = visits resources.router.routes.user

Fatal error: Undefined class constant 'INVALID'

陌路散爱 提交于 2020-01-05 08:39:34
问题 I'm going through a book (Zend Framework, A Beginners Guide) and there's quite a few errors in this book, but luckily I've figured all of them out thus far, besides this one. I'm getting the following error: Fatal error: Undefined class constant 'INVALID' in C:\xampp\htdocs\projects\zend\square\library\Square\Form\ItemCreate.php on line 40 The code is here: <?php class Square_Form_ItemCreate extends Zend_Form { public function init() { // initialize form $this->setAction('/catalog/item/create

reverse phrase search in zend lucene

六眼飞鱼酱① 提交于 2020-01-05 08:27:56
问题 Basically I have two tables Location and city , The city has city_name and country_code. location_name field from location table has locations. I want to find the location country. My table structure. City table City country_code city_name US Kansas city ......... (thousands of world country cities) Location table Location location_name Kansas city, mo Kansas city Kansas city, us uSA, Kansas city etc... So I Indexed the two fields(country_code and city_name) in city table using Zend Lucene

How to render several barcodes with Zend 2?

我的梦境 提交于 2020-01-05 07:49:22
问题 I'm trying print several barcodes using the Zend\Barcode namespace. The problem is reading the manual I can't print more than one barcode. I can't print a echo before the barcode too. How can I print several barcodes and texts together? The code I'm using is similar to this one: use Zend\Barcode\Barcode; $barcodeOptions = array('text' => '123456'); $rendererOptions = array(); Barcode::render( 'code39', 'image', $barcodeOptions, $rendererOptions ); $barcodeOptions = array('text' => '654321');

Zend Form class not found error

假装没事ソ 提交于 2020-01-05 07:48:32
问题 I am getting this error what should I do ? Fatal error: Class 'forms_AuthForm' not found in C:\dev\workspaces\ adxweb\application\adxsearch\modules\account\controllers\ AuthController.php on line 26 I have one AuthForm.php in forms folder and Authcontroller.php in controllers folder, and auth.phtml in scripts folder. Thanks kiran 回答1: The default path for forms in ZF projects is APPLICATION_PATH /forms, like this: -- application -- forms AuthForm.php -- models -- modules -- account --

Google App Engine: How to connect to Cloud SQL with Zend DB

只愿长相守 提交于 2020-01-05 05:46:06
问题 I have a Zend Framework 1.12 application that uses the Zend DB Adapter class to connect with MySql. I need to deploy it soon and am investigating Google App Engine. My current problem is that I can't connect the application to Google Cloud SQL. This Google page, https://developers.google.com/appengine/docs/php/cloud-sql/, gives an example using PHP and PDO. It uses a DSN as a parameter. The Zend DB Adapter class does not take a DSN as a parameter, but instead constructs it from the other

Zend AutoLoad Custom Directory?

大憨熊 提交于 2020-01-05 03:45:30
问题 I thought autoloading was build into Zend so that if you tried to instantiate a class it would use the class name to try and find where the class's file was located. I want to be able to load a DTO directory in my application's root directory using autoloader. I thought I could do something like this Application_DTO_MyClass for the file /application/dtos/myClass.php I've tried googling it but haven't found anything useful. Any tips on the best way to do this? 回答1: There are a couple of