Search Results

Search found 7819 results on 313 pages for 'zend mail'.

Page 99/313 | < Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >

  • Zend_Form and Liskov Substitution Principle

    - by blockhead
    A very common pattern I see (I'm picking on Zend Framework, only because I was dealing with it at the moment of this question), is something like this: class My_Form extends Zend_Form { public function init() { $this->addElement(); } } Zend_Form is not an abstract class, but is perfectly usable on its own. This seems to be "recommended" as place to "encapsulate" your forms into a nice class. Does this violate the Liskov Substitution Principle? Each subclass of Zend_Form will have a wildy different behavior than the base class. Would it be better to use composition for this, or am I totally misunderstanding this principle?

    Read the article

  • Redirect URL from AJAX Calls

    - by Vincent
    All, I have an application written in Zend MVC Framework. So, naturally all regular requests and ajax requests go through /public/index.php. I want my application to support maintenance mode. So, in my index.php file, I have the following code: if( Zend_Registry::get('config')->maintenance == 'true' ) { header('Location:/maintenance.php'); } The issue is, when ajax requests are called they render servermaintenance.php inside the page instead of redirecting to this page. How can I make sure it gets redirected instead of getting rendered? Thanks

    Read the article

  • zfdatagrid : how to set the relative order of columns?

    - by user522350
    To those of you who are familiar with zfdatagrid for the Zend framework: I got a recordset by a JOIN query, say from tables s and t, now I want to set the order in which the columns appear in the deployed table. For example, 5th column of table t to appear at the leftmost side, then 3rd column of table s, then 2nd column of table t, then 4th column of table s. How do I do this? Whatever I tried, it always shows first the columns of the left table of the JOIN, then the columns of the right table of the JOIN. I only know how to tell it which columns to show, but not their order. Thanks!

    Read the article

  • Adding custom validator without using Zend_Form's addElementPrefixPath

    - by nush
    The problem is that I don't use Zend_Form, so I can't use the built in capabilities. I usually look for three things when setting a validator: - its path (usually in library/path/validators/MyValidator.php) - its class name (tried Validators_MyValidator) and - in application.ini, the autoloaderNamespaces[] = "Validators" I've tried different settings/namings/layouts to no avail. When using a validator in my Zend_Validate_Input, an exception occurs, saying that it couldn't find my plugin/validator, the classes being searched only in Zend/Validate with the Zend_Validate prefix (I didn't try this prefix, though). Wasn't there a setting in app.ini that added a prefix and a path?

    Read the article

  • ready to use design pattern APIs for PHP?

    - by ajsie
    i know that in Java you can use their built-in APIs for design pattern. eg. if you want to use the observer pattern, you just have to extend your Subject class with the Observable class. is this possible for PHP? are there any libraries for the design patterns ready to use. in this way you don't have to reinvent the wheel and you also let many developers follow a standard. does Zend library have these API:s?

    Read the article

  • Cannot redeclare class but there are no other classes with that name

    - by hsz
    Hello ! I am working right now with Zend Framework and I've created a Model_User_Row in app\models\User\Row.php. When I try to create an instance of that class in IndexController I get an error: Fatal error: Cannot redeclare class Model_User_Row in F:\Projekty\www\inz\app\models\User\Row.php on line 14 14th line is a close brace. <?php class Model_User_Row extends Zend_Db_Table_Row { /** * @return array */ public function toArray() { $res = parent::toArray(); unset($res['password']); return $res; } } // #14 In my project I have no other class called Model_User_Row. I am a bit confused - how to debug this case ?

    Read the article

  • Would you hire a foreigner ? [closed]

    - by user229999
    Hi! I'd like to dedicate this question (hope it's not a subjective) especially to people who own their companies. Would you (and why) hire a foreigner, which experience is documented in CV and portfolio, which can communicate in english (with grammar mistakes, but still)? I am writing in the name of all these guys looking for great opportunities abroad, living in countries which do not give you any opportunities at all. Is it real, to be hired like a programmer (PHP, Ruby, Python, C#) in country like UK, USA, Nederland, Sweeden or even Germany, if you're a foreigner? Please response in two categories: a) foreigner with engineer degree, zend certificate, few open source projects b) foreigner without any degree, with nice portfolio, and few big projects created Also, does First Certificate in English aka FCE matter for you ?

    Read the article

  • how to call a view method to a model in zendframework

    - by Awais Qarni
    hello I just want to ask whether we can call a view method to a model? I know that we can call it on our controller in zend framework. Like if I want to call the url method of view on my controller I can call it like this $this->view->url(array(),''); and on the view we just can call it by $this->url(array(),''); But When I tried to call the same method on my model by $this->view->url(array(),''); it generates an error of call to undefined method url. Now I want to ask whether it is possible to call view method to a model? If yes then how? What Am I doing wrong. Thanks

    Read the article

  • Keeping Track of Dependant Third-party Library Releases

    - by Sonny
    I am building a web application that is dependent upon several third-party libraries. What is a good strategy for making sure that you're always using the most fully patched versions? A simple method would be to keep the versions written down and visit the websites at regular intervals, but I am looking for some way to get the information 'pushed' to me if possible. I figured that there might be others out there who have needed to do the same thing and have worked out a good solution. Here are a few libraries I am using: Zend Framework jQuery HTMLPurifier Markdownify InnovaStudio WYSIWYG Editor Fancybox MojoZoom

    Read the article

  • how to show jquery notify bar on submit form using php or zf

    - by user1400
    hi guys in my application on zend framework i use of 'jQuery Notify Bar' plugin for display messages, i'd like to show message when my form submit ,the other page is opened and notify bar be open until the other page is completely load and even some second more but the problem is that notify bar show for short Moment and when the other page begin to load , notify bar is closed, and the delay property is not effect to that $('#myForm').submit(function(){ $.notifyBar({ html: "Thank you, your settings were updated!", **delay: 20000,** animationSpeed: "normal" }); how to show notify bar in the other page too? thanks

    Read the article

  • What is the difference between if ($this-> _hasParam('name') and if($this->_getParam('name')), Ze

    - by Linto davis
    I want to check in zend, whether a posted form value 'name' contains a value.For this i have used the following code one method if ($this->_getPatram('name') != null ) { echo 'field name contains value'; } else { echo 'field name contains no value'; } second method if ($this->_hasParam('name')) { echo 'field name contains value'; } else { echo 'field name contains no value'; } output , when submitting the form with the 'name' field contains no value in first method field name contains no value (result is correct) in second method field name contains value (result is wrong) So what is the difference between these two ? _hasParam and _getParam

    Read the article

  • Front-end phtml template form doesn't connect to controller.php file

    - by user888786
    The web system which I'm working on right now, has a add.phtml (in views folder) form, which contain normal form elements and pageController.php (in Controller folder) file which has function to be connected when user hit "add page" button on the form. The codes goes like this. on add.phtml file, input type = "submit" value ="Add Page" on pageController.php file, function insertAction(){ } For some reason these two doesn't connect now. Is anybody have any idea why this doesn't work or what should I check on this kind of a problem. The web system on zend framewok. I really appreciate if someone can help me.

    Read the article

  • Extending Zend_Log for application-specific need

    - by spdaly
    I am building a Zend Framework application that performs jobs submitted by the user. The actions taken need to be logged to a database. I would like to correlate the job with its log entries. Instead of creating my own logging class, I would like to extend Zend_Log since it provides 99% of the functionality that I need. All I need to do is add a foreign key of the job id to the log data model. Is this possible? I'm also looking for a good example of Zend_Log writing to a database. I haven't searched SO yet. I will do that after I post this. Thanks in advance... Steve

    Read the article

  • ZF2 Vertical Form

    - by yunhasnawa
    I created a simple form in typical ZF2 application. The form class code is just a modified code provided by Zend's Album example. <?php namespace Admin\Form; use Zend\Form\Form; class CityForm extends Form { public function __construct($name = null) { parent::__construct('city'); $this->setAttribute('method', 'post'); $this->add(array( 'name' => 'id', 'attributes' => array( 'type' => 'hidden', ), )); $this->add(array( 'name' => 'name', 'attributes' => array( 'type' => 'text' ), 'options' => array( 'label' => 'Name', ), )); $this->add(array( 'name' => 'province', 'attributes' => array( 'type' => 'text' ), 'options' => array( 'label' => 'Province', ), )); $this->add(array( 'name' => 'country', 'attributes' => array( 'type' => 'text' ), 'options' => array( 'label' => 'Country', ), )); $this->add(array( 'name' => 'coordinate', 'attributes' => array( 'type' => 'text' ), 'options' => array( 'label' => 'Coordinate', ), )); $this->add(array( 'name' => 'submit', 'attributes' => array( 'type' => 'submit', 'value' => 'Save', 'id' => 'submitButton', ), )); } } And call it like this in CityController, a typical controller extends AbstractActionController: public function addAction() { $form = new CityForm(); $viewData = array( 'form' => $form ); return new ViewModel($viewData); } Finally in view I echo it like this: <?php $title = 'Add New City'; ?> <?php $this->headtitle($title); ?> <h1><?php echo $this->escapehtml($title); ?></h1> <?php $form = $this->form; ?> <?php $form->setAttribute('action', $this->url('city', array('action' => 'add'))); ?> <?php $form->prepare(); ?> <?php echo $this->form()->openTag($form); echo $this->formHidden($form->get('id')); echo $this->formRow($form->get('name')); echo $this->formRow($form->get('province')); echo $this->formRow($form->get('country')); echo $this->formRow($form->get('coordinate')); echo $this->formSubmit($form->get('submit')); echo $this->form()->closeTag(); ?> What I expected to see is a vertical form like this: But what i got is an ugly form like this: What's wrong with my code? Please help. EDIT: When I inspect element, the form generated is strange. The <input> element is inside the <label> element. <form id="city" name="city" method="post" action="/karciscus/public/admin/city/add"> <input type="hidden" value="" name="id"> <label> <span>Name</span><input type="text" value="" name="name"> </label> <label> <span>Province</span><input type="text" value="" name="province"> </label> <label> <span>Country</span><input type="text" value="" name="country"> </label> <label> <span> Coordinate</span><input type="text" value="" name="coordinate"> </label> <input type="submit" value="Save" id="submitButton" name="submit"> </form> I'm pretty sure it is the cause of my ugly rendered form. I think it is not supposedly like that. How to fix it?

    Read the article

  • how to prevent database to add slash to quotes

    - by black sensei
    i know this sounds really common and so trivial but , am having a challenge here. I have a web site with Zend/Doctrine and i use ckeditor for the backend management. after uploading the site i've realized that during edit testing the look and feel of the site is messed up. with the help of firebug, i've seen that there are slashes all over the html. after inline edition, the look and feel came back to normal. There are so many files , i can't think of doing other decoding before outputting data from mysql. What options do i have to solve this problem. the site is up already and i feel a bit unconfortable about this. Can anyone give a hint? thanks

    Read the article

  • how many dojo fliteringselect can I have on a form?

    - by Grant Collins
    I have a quick question How many dojo filteringselects can I have on a form? I have a form with 2 filteringselects on it, both getting data from different json datastores to populate the values. However only the first filteringselect is being populated, the other grabs no data. I am using Zend Framework and Zend_Dojo_Form to create the form elements for this. Many thanks. Ok looks like my code is broken somewhere then. The element that is failing in my form is: $location = new Zend_Dojo_Form_Element_FilteringSelect('location'); $location->setAutocomplete(true) ->setStoreId('countiesstore') ->setStoreType('dojo.data.ItemFileReadStore') ->setStoreParams(array('url' => $baseUrl.'/dojo/counties')) ->setAttrib('searchAttr', 'title') ->setRequired(true) ->removeDecorator('DtDdWrapper') ->removeDecorator('label') ->removeDecorator('HtmlTag') ->removeDecorator('Error'); When I go to http://localhost/dojo/counties I get the json file to read, but the element isn't populated with any data. Any ideas?

    Read the article

  • Zend_Soap with attachments (server)

    - by Tom
    i'm trying to build a SOAP service with Zend_Soap. Everything is working great but the client needs the ability to send attachments to the service (not base64 encoded strings, as this service will be called multiple times a day with various file sizes so processing all that in memory is not possible. So I'd like to handle a normal SOAP attachment (DIME/MIME) with the SOAP server in Zend Framework however I'm unable to find documentation about it. Can I access it with $_FILES[] or any other way? Is it even possible in Zend_Soap (as there's not that much info available). SOAP is a must - so thanks for the advice but it has to be SOAP, not REST.

    Read the article

  • DomDocument::loadHTML() error during phpunit test execution

    - by ranhan
    I am currently trying to write some unit test against my zend framework controller. When I run the following code I receive this error: public function testListActionShouldContainListTable() { $this->loginToSystem(); $uri = $this->_uriBase . 'campaign/list'; $_SERVER["REQUEST_URI"] = $uri; $this->dispatch('/campaign/list'); $this->assertController('campaign'); $this->assertAction('list'); $this->assertQueryCount('#list',1); } CampaignControllerTests::testListActionShouldContainListTable DOMDocument::loadHTML(): ID alrt already defined in Entity, line: 36 This occurs using any of the assertQuery and assertQueryContains methods. I have searched around but am not really finding a good answer to why it won't allow me to find this html node or how to get around this error. Thanks in advance for any help!

    Read the article

  • Using Google's Contacts API's, how can I get the user's name and gmail address?

    - by chris
    I know how to get the entire contacts list using Google Contacts API (I get a session token and use Google's Zend package for PHP). But how can I get the person's name and email address? Currently, the Contacts API just seems to give all of the contacts. I'm not sure how to distinguish which email and name out of that list corresponds to the user's account. Is there an easy way to get the user's full name and email address? Any help would be useful. Thanks!

    Read the article

  • new controller in oo php

    - by pradeep
    Hi , I have a practical doubt , I am using OO php , and i am new to it. I am using zend framework to be clear. I am writing controllers(class) and actions(methods) with in it say PatientMapper.php which has all single mysql table related actions and Patient.php which has all setter and getter functions. I get a doubt that when should i write a new controller. Should i write a controller for all the actions on a single mysql table . or a single controller for all actions related to a module.

    Read the article

  • Using SSIS to send a HTML E-Mail Message with built-in table of Counts.

    - by Kevin Shyr
    For the record, this can be just as easily done with a .NET class with a DLL call.  The two major reasons for this ending up as a SSIS package are: There are a lot of SQL resources for maintenance, but not as many .NET developers. There is an existing automated process that links up SQL Jobs (more on that in the next post), and this is part of that process.   To start, this is what the SSIS looks like: The first part of the control flow is just for the override scenario.   In the Execute SQL Task, it calls a stored procedure, which already formats the result into XML by using "FOR XML PATH('Row'), ROOT(N'FieldingCounts')".  The result XML string looks like this: <FieldingCounts>   <Row>     <CellId>M COD</CellId>     <Mailed>64</Mailed>     <ReMailed>210</ReMailed>     <TotalMail>274</TotalMail>     <EMailed>233</EMailed>     <TotalSent>297</TotalSent>   </Row>   <Row>     <CellId>M National</CellId>     <Mailed>11</Mailed>     <ReMailed>59</ReMailed>     <TotalMail>70</TotalMail>     <EMailed>90</EMailed>     <TotalSent>101</TotalSent>   </Row>   <Row>     <CellId>U COD</CellId>     <Mailed>91</Mailed>     <ReMailed>238</ReMailed>     <TotalMail>329</TotalMail>     <EMailed>291</EMailed>     <TotalSent>382</TotalSent>   </Row>   <Row>     <CellId>U National</CellId>     <Mailed>63</Mailed>     <ReMailed>286</ReMailed>     <TotalMail>349</TotalMail>     <EMailed>374</EMailed>     <TotalSent>437</TotalSent>   </Row> </FieldingCounts>  This result is saved into an internal SSIS variable with the following settings on the General tab and the Result Set tab:   Now comes the trickier part.  We need to use the XML Task to format the XML string result into an HTML table, and I used Direct input XSLT And here is the code of XSLT: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes"/>   <xsl:template match="/ROOT">         <table border="1" cellpadding="6">           <tr>             <td></td>             <td>Mailed</td>             <td>Re-mailed</td>             <td>Total Mail (Mailed, Re-mailed)</td>             <td>E-mailed</td>             <td>Total Sent (Mailed, E-mailed)</td>           </tr>           <xsl:for-each select="FieldingCounts/Row">             <tr>               <xsl:for-each select="./*">                 <td>                   <xsl:value-of select="." />                 </td>               </xsl:for-each>             </tr>           </xsl:for-each>         </table>   </xsl:template> </xsl:stylesheet>    Then a script task is used to send out an HTML email (as we are all painfully aware that SSIS Send Mail Task only sends plain text) Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 using System; using System.Data; using Microsoft.SqlServer.Dts.Runtime; using System.Windows.Forms; using System.Net.Mail; using System.Net;   namespace ST_b829a2615e714bcfb55db0ce97be3901.csproj {     [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]     public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase     {           #region VSTA generated code         enum ScriptResults         {             Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,             Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure         };         #endregion           public void Main()         {             String EmailMsgBody = String.Format("<HTML><BODY><P>{0}</P><P>{1}</P></BODY></HTML>"                                                 , Dts.Variables["Config_SMTP_MessageSourceText"].Value.ToString()                                                 , Dts.Variables["InternalStr_CountResultAfterXSLT"].Value.ToString());             MailMessage EmailCountMsg = new MailMessage(Dts.Variables["Config_SMTP_From"].Value.ToString().Replace(";", ",")                                                         , Dts.Variables["Config_SMTP_Success_To"].Value.ToString().Replace(";", ",")                                                         , Dts.Variables["Config_SMTP_SubjectLinePrefix"].Value.ToString() + " " + Dts.Variables["InternalStr_FieldingDate"].Value.ToString()                                                         , EmailMsgBody);             //EmailCountMsg.From.             EmailCountMsg.CC.Add(Dts.Variables["Config_SMTP_Success_CC"].Value.ToString().Replace(";", ","));             EmailCountMsg.IsBodyHtml = true;               SmtpClient SMTPForCount = new SmtpClient(Dts.Variables["Config_SMTP_ServerAddress"].Value.ToString());             SMTPForCount.Credentials = CredentialCache.DefaultNetworkCredentials;               SMTPForCount.Send(EmailCountMsg);               Dts.TaskResult = (int)ScriptResults.Success;         }     } } Note on this code: notice the email list has Replace(";", ",").  This is only here because the list is configurable in the SQL Job Step at Set Values, which does not react well with colons as email separator, but system.Net.Mail only handles comma as email separator, hence the extra replace in the string. The result is a nicely formatted email message with count information:

    Read the article

  • Magento Community - Hosting :: Need Advice which sharing hosting will run magento fast

    - by user43353
    Hi, Need Advice which sharing hosting will run Magento Community fast or some other not expensive solution. This website will not have a lot of users, I only need that it will run fast for 100-20 users in same time. The problem with magento is database design that make this system very slow , also other staff not the best. I had hostmonster.com and justhost.com for previous website but it wasn't fast enough for single user that not located in USA (my customer areas: Asia, Africa). each action that involve database takes a lot of time. Thanks

    Read the article

  • Magento Community - Hosting :: Need Advice which sharing hosting will run magento fast

    - by user43353
    Hi, Need Advice which sharing hosting will run Magento Community fast or some other not expensive solution. This website will not have a lot of users, I only need that it will run fast for 100-20 users in same time. The problem with magento is database design that make this system very slow , also other staff not the best. I had hostmonster.com and justhost.com for previous website but it wasn't fast enough for single user that not located in USA (my customer areas: Asia, Africa). each action that involve database takes a lot of time. Thanks

    Read the article

  • Cannot install xdebug

    - by Nathan Mann
    I'm getting a large number of undefined references when using $ld xdebug.so I have added the "zend_extension="/bla/xdebug.so"" to the conf for apache and it is giving me a config test failed because it cannot find the file. The file has been chown'd to www-data, so I do not believe it is a permissions error. I have run the wizard at xdebug.org/wizard.php to make sure the version would be correct, I updated to the version it recommended with an install from source and still receive the same error with apache and same output from $ld. I originally installed xdebug with: $apt-get install php5-xdebug And have also tried with: $pecl install xdebug

    Read the article

  • Installing ZendServer on IIS6

    - by Wayne M
    I need to run ASP and PHP applications side by side, so I installed ZendServer Community Edition on our existing Server 2003 platform. I specified it to use the existing IIS instance so I don't have to deal with multiple ports (we use ZoneEdit to manage our DNS and they don't seem to allow anything other than port 80 without forwarding). The install went smooth but when I try to configure and manage the install by going to http://localhost/ZendServer (or even just localhost) I get a Bad Request (Invalid Hostname) error. I haven't done anything except install the server, and this is my first time working with ZendServer. How do I fix this so I can get things set up?

    Read the article

< Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >