Search Results

Search found 5683 results on 228 pages for 'zend pdf'.

Page 63/228 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • How do I remove the namespaces in Zend_Soap?

    - by Marc
    Hi There I am trying to use the tranlsation webservice from MyMemory: http://mymemory.translated.net/doc/spec.php Unfortunately, Zend_Soap_Client does generate an XML reqest object that is not recognized by the service. I guess it is because of the ns1-Attribute (Namespace) within the tags. So does anyone know how to remove them? That's basically what I do: $client = new Zend_Soap_Client('http://mymemory.translated.net/otms/?wsdl', array( 'soap_version' => SOAP_1_1 )); Then I call the function: try { $client->otmsGet(array( 'key' => 'xxx', 'q' => array( 'source' => 'Computer Science', 'source_lang' => 'en-US', 'target_lang' => 'de-DE' ) )); } catch(Exception $e) { print $client->getLastRequest(); } The resulting XML looks like this: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/"> <SOAP-ENV:Body> <ns1:otmsGet> <ns1:key>xxx</ns1:key> <ns1:q> <ns1:source>Computer Science</ns1:source> <ns1:source_lang>en-US</ns1:source_lang> <ns1:target_lang>de-DE</ns1:target_lang> </ns1:q> </ns1:otmsGet> </SOAP-ENV:Body> </SOAP-ENV:Envelope> And it should actually look like this: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <otmsGet xmlns="http://tempuri.org/"> <key xmlns:SOAPSDK1="http://tempuri.org/">mmDemo123</key> <q xmlns:SOAPSDK2="http://tempuri.org/"> <source>control panel</source> <source_lang>en-US</source_lang> <target_lang>es-ES</target_lang> </q> </otmsGet> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Thanks for your help!

    Read the article

  • zend_form display group inside foreach

    - by Mike
    I want to create a display group generated from foreach() clause output. I can't seem to get the syntax correct. Here's the business logic: for each category row find the associated fees output the category description as a label and the fees as radio buttons then create a display group with the fees as the group elements and the category description as the legend. I then have a style sheet format the elements on the page. and here's the code: foreach ($categoryData as $categoryRow) { $fees[$i] = new Zend_Form_Element_Radio("fees[$i]"); $fees[$i]->setDescription(strval($categoryRow['description'])); foreach ($feeData as $feeRow) { if ($feeRow['categories_idCategory'] == $categoryRow['idCategory']){ $fees[$i] ->addMultiOption($feeRow['idFees'] . '-' . $feeRow['categories_idCategory'], $feeRow['amount'] . '-' . $feeRow['name']); } } $fees[$i]->setRequired(TRUE); $this->addElements(array($fees[$i])); $this->addDisplayGroup($feeRow['name'], 'feeGroup',array('legend' => strval($feeRow['description']))); $i++; } I tried placing the addDisplayGroup() code within the foreach(), but I get the error: Message: No valid elements specified for display group So, my guess is that I'm making some kind of novice mistake that you experts will spot right away. I appreciate your time and attention to this matter.

    Read the article

  • How can I customise Zend_Form regex error messages?

    - by Matt
    I have the following code: $postcode = $form-createElement('text', 'postcode'); $postcode-setLabel('Post code:'); $postcode-addValidator('regex', false, array('/^[a-z]{1,3}[0-9]{1,3} ?[0-9]{1,3}[a-z]{1,3}$/i')); $postcode-addFilters(array('StringToUpper')); $postcode-setRequired(true); It creates an input field in a form and sets a regex validation rule and works just fine. The problem is that the error message it displays when a user enters an invalid postcode is this: 'POSTCODE' does not match against pattern '/^[a-z]{1,3}[0-9]{1,3} ?[0-9]{1,3}[a-z]{1,3}$/i' (where input was POSTCODE) How can I change this message to be a little more friendly?

    Read the article

  • Zend_Auth multiple credentials?

    - by azz0r
    Login Form: $authAdapter = Zend_Registry::get('authAdapter'); $authAdapter ->setIdentity($formData['email']) ->setCredential($password) ->setCredential(1); Bootstrap: protected function _initAuth(){ $this->bootstrap('db'); $this->bootstrap('session'); $db = $this->getPluginResource('db')->getDbAdapter(); $auth = Zend_Auth::getInstance(); $authAdapter = new Zend_Auth_Adapter_DbTable($db, 'User', 'email', 'password', 'enabled'); Zend_Registry::set('authAdapter', $authAdapter); return $authAdapter; } Obviously since adding 'enabled' its stopped working, if I remove: ->setCredential(1); and 'enabled' from there: ($db, 'User', 'email', 'password', 'enabled'); it works just fine... I would like to only enable users who have an enabled account to login though.

    Read the article

  • Zend_Form - The mimetype of file 'foto.jpg' could not be detected

    - by vian
    I have a Zend_Form with file element like this: ->addElement('file', 'image', array( 'required' => false, 'label' => 'Venue Image', 'validators' => array( array('IsImage', false), array('Size', false, '2097152'), array('Upload', false), ), )) And when I'm using localhost the image is uploaded successfully. But when I move to my hosting the validation error shows for image field. The mimetype of file 'foto.jpg' could not be detected. What can be the reason of this?

    Read the article

  • Default route is matched instead specific route

    - by Supertino7
    www.domain.com community :action/* member/profile-(\d+)-(.+) member/profile-%d-%s 1 2 As you can see, I use a route with :action/* in to cover the homepages and the basics actions on index controller. domain.com/community/random_action = works good. domain.com/community/ doesn't work. The whole homepage is displayed. I checked, and the default route is matched. I tried assemble() on route "www-community-index" and it gives well www.domain.com/community I don't see from where comes the problem :(

    Read the article

  • Zend_Soap_Client - Ignore HTTPS verification

    - by Vincent
    All, I want to use Zend_Soap_Client class to load WSDL from an HTTPS url. Currently, if I call like this, it gives me an error even if the WSDL is perfectly valid: $wsdlUrl = "https://abc.xyz.com/webservices/WeatherService.php?wsdl"; $soapClient = new Zend_Soap_Client($wsdlUrl); The error I receive is: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://abc.xyz.com/webservices /WeatherService.php?wsdl' : Start tag expected, '<' not found If I browse to the WSDL url in the browser, it loads up the WSDL just fine. I think Zend_Soap_Client is trying to validate the certificate and failing. Is there a way to set the SOAP option to ignore the HTTPS verification and just load the WSDL? Thanks

    Read the article

  • Problem with URL encoded parameters in URL view helper

    - by Richard Knop
    So my problem is kinda weird, it only occurs when I test the application offline (on my PC with WampServer), the same code works 100% correctly online. Here is how I use the helper (just example): <a href="<?php echo $this->url(array('module' => 'admin', 'controller' => 'index', 'action' => 'approve-photo', 'id' => $this->escape($a->id), 'ret' => urlencode('admin/index/photos')), null, true); ?>" class="blue">approve</a> Online, this link works great, it goes to the action which looks similar to this: public function approvePhotoAction() { $request = $this->getRequest(); $photos = $this->_getTable('Photos'); $dbTrans = false; try { $db = $this->_getDb(); $dbTrans = $db->beginTransaction(); $photos->edit($request->getParam('id'), array('status' => 'approved')); $db->commit(); } catch (Exception $e) { if (true === $dbTrans) { $db->rollBack(); } } $this->_redirect(urldecode($request->getParam('ret'))); } So online, it approves the photo and redirects back to the URL that is encoded as "ret" param in the URL ("admin/index/photos"). But offline with WampServer I click on the link and get 404 error like this: Not Found The requested URL /public/admin/index/approve-photo/id/1/ret/admin/index/photos was not found on this server. What the hell? I'm using the latest version of WampServer (WampServer 2.0i [11/07/09]). Everything else works. Here is my .htaccess file, just in case: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ /index.php [NC,L] # Turn off magic quotes #php_flag magic_quotes_gpc off I'm using virtual hosts to test ZF projects on my local PC. Here is how I add virtual hosts. httpd.conf: NameVirtualHost *:80 <VirtualHost *:80> ServerName myproject DocumentRoot "C:\wamp\www\myproject" </VirtualHost> the hosts file: 127.0.0.1 myproject Any help would be appreciated because this makes testing and debugging projects on my localhost a nightmare and almost impossible task. I have to upload everything online to check if it works :( UPDATE: Source code of the _redirect helper (built in ZF helper): /** * Set redirect in response object * * @return void */ protected function _redirect($url) { if ($this->getUseAbsoluteUri() && !preg_match('#^(https?|ftp)://#', $url)) { $host = (isset($_SERVER['HTTP_HOST'])?$_SERVER['HTTP_HOST']:''); $proto = (isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']!=="off") ? 'https' : 'http'; $port = (isset($_SERVER['SERVER_PORT'])?$_SERVER['SERVER_PORT']:80); $uri = $proto . '://' . $host; if ((('http' == $proto) && (80 != $port)) || (('https' == $proto) && (443 != $port))) { $uri .= ':' . $port; } $url = $uri . '/' . ltrim($url, '/'); } $this->_redirectUrl = $url; $this->getResponse()->setRedirect($url, $this->getCode()); } UPDATE 2: Output of the helper offline: /admin/index/approve-photo/id/1/ret/admin%252Findex%252Fphotos And online (the same): /admin/index/approve-photo/id/1/ret/admin%252Findex%252Fphotos UPDATE 3: OK. The problem was actually with the virtual host configuration. The document root was set to C:\wamp\www\myproject instead of C:\wamp\www\myproject\public. And I was using this htaccess to redirect to the public folder: RewriteEngine On php_value upload_max_filesize 15M php_value post_max_size 15M php_value max_execution_time 200 php_value max_input_time 200 # Exclude some directories from URI rewriting #RewriteRule ^(dir1|dir2|dir3) - [L] RewriteRule ^\.htaccess$ - [F] RewriteCond %{REQUEST_URI} ="" RewriteRule ^.*$ /public/index.php [NC,L] RewriteCond %{REQUEST_URI} !^/public/.*$ RewriteRule ^(.*)$ /public/$1 RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ - [NC,L] RewriteRule ^public/.*$ /public/index.php [NC,L] Damn it I don't know why I forgot about this, I thought the virtual host was configured correctly to the public folder, I was 100% sure about that, I also double checked it and saw no problem (wtf? am I blind?).

    Read the article

  • Problem retrieving values from Zend_Form_SubForms - no values returned

    - by anu iyer
    I have a Zend_Form that has 4 or more subforms. /** Code Snippet **/ $bigForm = new Zend_Form(); $littleForm1 = new Form_LittleForm1(); $littleForm1->setMethod('post'); $littleForm2 = new Form_LittleForm2(); $littleForm2->setMethod('post'); $bigForm->addSubForm($littleForm1,'littleForm1',0); $bigForm->addSubForm($littleForm2,'littleForm2',0); On clicking the 'submit' button, I'm trying to print out the values entered into the forms, like so: /** Code snippet, currently not validating, just printing **/ if($this-_request-getPost()){ $formData = array(); foreach($bigForm->getSubForms() as $subForm){ $formData = array_merge($formData, $subForm->getValues()); } /* Testing */ echo "<pre>"; print_r($formData); echo "</pre>"; } The end result is that - all the elements in the form do get printed, but the values entered before posting the form don't get printed. Any thoughts are appreciated...I have run around circles working on this! Thanks in advance!

    Read the article

  • Handling one-to-many relationship with ZF partialLoop

    - by snaken
    Lets say i'm listing musical artists, each artist has basic information like Name, Age etc. stored in an artist table. They also have entries in an Albums table (album name/album cover etc), referencing the artist table using the artist id as a foreign key. I have the Model_Artist (Artist.php) file: class Model_Artist extends Zend_Db_Table_Abstract { protected $_name = 'artist'; protected $_dependentTables = array('Model_ArtistAlbums'); public function fetchArtistss() { $select = $this->select(); return $this->fetchAll($select); } } and to the Model_ArtistAlbums (ArtistAlbums.php) file class Model_ArtistAlbums extends Zend_Db_Table_Abstract { protected $_name = 'albums'; protected $_referenceMap = array( 'Artists' => array( 'columns' => 'alb_art_id', 'refTableClass' => 'Model_Artist', 'refColumns' => 'art_id' ) ); // etc } in my controller: public function indexAction() { /* THIS WORKS $art = new Model_Artist(); $artRowset = $art->find(1); $art1 = $artRowset->current(); $artalbums = $art1->findDependentRowset('Model_ArtistAlbums'); foreach($artalbums as $album){ echo $album->alb_title."<br>"; } */ $arts = new Model_Artist(); $this->view->artists = $arts->fetchArtists(); } in the view file: $this->partial()->setObjectKey('artist'); echo $this->partialLoop('admin/list-artists.phtml', $this->artists); but with this code in artists/list-artists.phtml: foreach($this->artist->findDependentRowset('albums') as $album): // other stuff endforeach; i get this error: Fatal error: Call to a member function findDependentRowset() on a non-object A var_dump of $this->artist = NULL.

    Read the article

  • Creating Zend_Form elements from row html

    - by P.M
    Hi there, I am having an issue with Zend_Form and your help will be appreciated. in fact I have a class to generate categories as options $categories = My_Util_Category::toHtmlSelect();//for simplicity I removed other lines this code generates <select> <option > root</option> <option> root / children</option> </select> On another hand, I use Zend_Form form to edit categories. The code looks like: $form = My_Form_Category( $data, $selectElements = array() ); which outputs a form, text field, a select box for parent categories and a submit button. How can I get 'select element' from $form, and replace it with row html 'select' generated with $categories any help, or link will be appreciated. Thanks.

    Read the article

  • Adding a class to the $tag surrounding a <label> in a Zend_Form with the Label decorator

    - by Roderik
    I'm trying to get the following html out of Zend_Form <div class="group wat-cf"> <div class="left"> <label class="label right">Username</label> </div> <div class="right"> <input type="text" class="text_field"> </div> </div> Using the following code: $username->setAttrib("class", "text_field") ->setDecorators(array( 'ViewHelper', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'div', 'class' => 'right')), array('Label', array('tag' => 'div', 'class' => 'label right')), array(array('row'=>'HtmlTag'),array('tag'=>'div', 'class' => 'group wat-cf')) )); I can get the next fragment <div class="group wat-cf"> <div id="username-label"> <label for="username" class="label right required">Username:</label> </div> <div class="right"> <input type="text" name="username" id="username" value="" class="text_field"> </div> </div> so apart from some extra id's and required classes i don't mind, i need to get a class "left" on div id="username-label" Now adding class to the Label line, gets the class added on the element. I also don't see and option to do this in the Label decorator code itself. So i need a custom Label decorator, or is there some other way i'm missing?

    Read the article

  • Zend_Form -> Nicely change setRequired() validate message

    - by dittonamed
    Say I create a text element like this: $firstName = new Zend_Form_Element_Text('firstName'); $firstName->setRequired(true); Whats the best way to change the default error message from: Value is empty, but a non-empty value is required to a custom message? I read somewhere that to replace the message, just use addValidator(..., instead (NO setRequired), like this: $firstName = new Zend_Form_Element_Text('firstName'); $firstName->addValidator('NotEmpty', false, array('messages'=>'Cannot be empty')); but in my testing, this doesn't work - it doesn't validate at all - it will pass with an empty text field. Using both (addValidator('NotEmp.. + setRequired(true)) at the same time doesn't work either - it double validates, giving two error messages. Any ideas? Thanks!

    Read the article

  • Zend_Paginator - Increase querys

    - by poru
    Hello, I started using Zend_Paginator, it works everything fine but I noticed that there is one more query which slows the load time down. The additional query: SELECT COUNT(1) AS `zend_paginator_row_count` FROM `content` The normal query: SELECT `content`.`id`, `content`.`name` FROM `content` LIMIT 2 PHP: $adapter = new Zend_Paginator_Adapter_DbSelect($table->select()->from($table, array('id', 'name'))); $paginator = new Zend_Paginator($adapter); Could I merge the two querys into one (for better performance)?

    Read the article

  • Set Action Controller name for Zend_Tool create controller

    - by Cobby
    Hi All, All my controllers use a custom Action Controller class, is there anyway to set the action controller class it uses when generating the the controller code? Or would be even better if I could set it up to map the action controller class to use based on the module the class is being created under. Cheers.

    Read the article

  • Problem with Zend_Date and ISO_8601 format

    - by Noah Goodrich
    Frankly, I'm flummoxed. Can anyone tell me why I would get a failure message with this code? $date = Zend_Date::now(); $date = $date->getIso(); if(Zend_Date::isDate($date, Zend_Date::ISO_8601)) { print('success'); } else { print('failure'); } exit; It also fails if I just pass in a Zend_Date object. UPDATE: a var_dump of the initial $date object looks like this: object(Zend_Date)#107 (8) { ["_locale:private"]= string(5) "en_US" ["_fractional:private"]= int(0) ["_precision:private"]= int(3) ["_unixTimestamp:private"]= int(1257508100) ["_timezone:private"]= string(14) "America/Denver" ["_offset:private"]= int(25200) ["_syncronised:private"]= int(0) ["_dst:protected"]= bool(true) } And a var_dump of the $date string after calling $date-getIso() looks like this: string(25) "2009-11-06T04:48:20-07:00" I am using ZF 1.9.5 on PHP 5.2.8. I am using XAMPP for Windows too if that makes a difference.

    Read the article

  • Adding Parameters to Zend_Navigation

    - by Grant Collins
    I have a problem with Zend_Navigation that I am hoping for a little guidance on. I'm in the process of adding a Zend_Navigation to a legacy app as described [here on SO].1 The thing that I am not sure of is how to add parameters to the navigation menu after the data is loaded from the xml file. What I want to do is get 2 identifying parameters from the url and add them to the Zend_Navigation so that they are included in things such as the breadcrumb bar, so that if a user selects the previous item in the breadcrumb they are returned with the correct params in the url. The parameters, I believe need to be set at the Action level rather than the controller. Any help would be appreciated. Many thanks.

    Read the article

  • How to setup a Zend_Application with an application.ini and a user.ini

    - by Peter Smit
    I am using Zend_Application and it does not feel right that I am mixing in my application.ini both application and user configuration. What I mean with this is the following. For example, my application needs some library classes in the namespace MyApp_ . So in application.ini I put autoloaderNamespaces[] = "MyApp_". This is pure application configuration, no-one except a programmer would change these. On the other hand I put there a database configuration, something that a SysAdmin would change. My idea is that I would split options between an application.ini and an user.ini, where the options in user.ini take preference (so I can define standard values in application.ini). Is this a good idea? How can I best implement this? The idea's I have are Extending Zend_Application to take multiple config files Making an init function in my Bootstrap loading the user.ini Parsing the config files in my index.php and pass these to Zend_Application (sounds ugly) What shall I do? I would like to have the 'cleanest' solution, which is prepared for the future (newer ZF versions, and other developers working on the same app)

    Read the article

  • How can I simply change the Timezone Offset with Zend_Date?

    - by Nicky Hajal
    I'm using Zend_Date to manage dates/times in a scheduling app. The only way I'm able to determine the user's Timezone is via Javascript which only gives a Timezone Offset. Zend_Date only seems to take Timezones in the 'America/New_York' format. Is there a way to get the users timezone in this format or set the Timezone Offset with Zend_Date? Thanks!

    Read the article

  • Zend_Search_Lucene and range search

    - by ranza
    I have a bunch of int key fields in my index and trying to do a simple range search like this: `gender:1 AND height:[120 TO 180]` This should give me male in the height range 120 to 180. But for some reason i get this exception: `At least one range query boundary term must be non-empty term` How would i debug this? Is it just Zend_Search_Lucene being buggy?

    Read the article

  • How can I set the class for a <dt> element in a Zend_Form?

    - by Mallika Iyer
    I'm trying to set the width of the style for a group of < dt elements in a Zend_Form. Is there a way to set a class for a dt element, so the end result would be something like this: <dt id="name-label" class="xyz" > // trying to add the 'class="xyz" <label class="required" for="name">Name:</label> </dt> <dd id="name-element"> <input type="text" maxlength="255" size="30" value="" id="name" name="name"> </dd>

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >