zend-framework2

ZendMail - error in headers

↘锁芯ラ 提交于 2019-12-11 23:07:39
问题 Fatal error: Uncaught exception 'Zend\Mail\Exception\RuntimeException' with message 'Malformed header detected' in /var/www/html/plugins/ZendFramework/ZendFramework-2.4.7/library/Zend/Mail/Headers.php on line 88 This is the error message that I get when I try use the Zend\Mail\Storage\Imap::getMessage() function. If I comment out the line, where the error is thrown(to be more precise I have to comment out both lines where this same error is thrown from the same function), I am able to read

ZF2 - Doctrine ORM, Simple Table Join

懵懂的女人 提交于 2019-12-11 22:51:46
问题 I am currently learning how to use Doctrine ORM with ZF2 and currently my goal is to retrieve data from a simple table join and display it to screen. I have read the documents and it looks pretty simple to do. These are my tables: user ------------------------ |user_id | name | email | -------------------------- | 1 | John | j@b.com | -------------------------- | 2 | Bob | b@j.com | -------------------------- user_role_linker -------------------------- |user_id | role_id | -------------------

ZF2 validating date and time format PT_BR always The input does not appear to be a valid date

不羁岁月 提交于 2019-12-11 22:15:12
问题 Project utilizing ZF2 + Doctrine 2. I Tried many formats. I'm working with a Form without validation. My last try was: $traindate = new Element\DateTime('trainDate'); $traindate->setAttributes(array( 'name' => 'trainDate', 'id' => 'trainDate', 'size' => '30', 'class' => 'datepicker', 'options' => array( 'label' => '', 'format' => 'd-m-Y H:i' ), )); I need to use a input to set a date and time of a event. On Brazil the basic format is: 14-05-2014 14:20 15-05-2015 15:00 With means Days Months

Extending ZfcUser's UserController in custom module

白昼怎懂夜的黑 提交于 2019-12-11 21:27:40
问题 In my custom Module I have a custom UserController that extends the ZfcUser vendor's UserController in order to customize the indexAction and registerAction . namesapce MyModule; class UserController extends ZfcUser\Controller\UserController { public function indexAction() { /* my code */ } public function registerAction() { /* my code */ } } I add the following in my custom Module's module.config.php : // some more config 'controllers' => array( 'invokables' => array( 'MyModule\Controller

ZF2 + Doctrine2: Error when validate a collection field of an One To Many association in zend form

 ̄綄美尐妖づ 提交于 2019-12-11 21:22:40
问题 Before anything else, thanks for read and sorry for my english. Entities: Morfologia namespace Content\Entity; /** * Morfologia * * @ORM\Entity * @ORM\Table(name="morfologia") * @Annotation\Name("morfologia") * @Annotation\Hydrator("Zend\Stdlib\Hydrator\ObjectProperty") */ class Morfologia { /** * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") * @ORM\Column(type="integer") * @Annotation\Type("Zend\Form\Element\Hidden") */ private $id; /** @ORM\Column(type="string") * @Annotation\Type("Zend

zend2 doctrine 2 form intgergration OneToOne

二次信任 提交于 2019-12-11 21:19:51
问题 I am trying to integrate Doctrine 2 to my Zend 2 . I wish to join two entities on my form; i.e ONeToOne. I followed the tutorial by gammamatrix. I was able to successfully integrate doctrine and was able to Hydrate one of the entities. The problem occurs when I try to join the second entity fieldset to the first entity. I keep getting the following fatal error message: **Catchable fatal error: Argument 1 passed to Workers\Form\Fieldset\WorkerAddressFieldset::__construct() must implement

Nesting layouts/views keeping the content variable in Zend Framework 2

别来无恙 提交于 2019-12-11 20:18:07
问题 I am trying to nest two (or more) views using the following code. I am struggling to find a way to successfully nest these views without losing the final view content and passing it through the $this->content variable within the last layout, as it just returns an empty string. core/Framework/Mvc/Controller/BaseActionController.php This is a simple base controller which uses the $frame and $layout variables (so that they can be used within any controller extending this class). The idea is the

ZF2 Nav replace Params in view

微笑、不失礼 提交于 2019-12-11 20:08:15
问题 I am trying to create a dynamic reusable menu for use on my application. I have a very basic route that has :id in it which represents the record id. In the submenu I want this :id to be replace dynamically with the record that the user is currently interacting with. Please see below for complete details. Here is my Route 'item' => array( 'type' => 'Literal', 'options' => array( 'route' => '/Item/', 'defaults' => array( '__NAMESPACE__' => 'ReserveAnything\Item\Controller', 'controller' =>

zftable module zend framework 2

最后都变了- 提交于 2019-12-11 19:59:11
问题 I am trying to use the ZF2 Album tutorial and set up zfTable module, which is availible here: https://github.com/dudapiotr/ZfTable I have followed the install instructions on this site, and I feel that is fine. I do however feel there is a lack of detail on the implementation part for someone new to zendframework 2. Could anyone explain how to take a basic example and implement the result into the table? I think the Album example is perfect as many people use this as a starting block. http:/

How to Extend a Fieldset in ZF2

非 Y 不嫁゛ 提交于 2019-12-11 19:26:23
问题 Doctrine’s Class Table Inheritance mapping strategy involves joining a parent table with one of a number of child tables depending on the value in a discriminator column in the parent table. For example, a parent table might contain the columns a, b, and c; with the values in column c being either foo or bar . A child table named ‘foo’ might contain the columns d, e, f and g; while a child table named ‘bar’ might contain the columns p, q, r and s. A single entity is defined for the parent and