zend-framework2

zf2 application folder repetition in 'Modules/Application' and 'Modules/Application/src/Application' [closed]

我怕爱的太早我们不能终老 提交于 2019-12-13 01:24:57
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Why have zf2 Application folder inside Modules/ and Modules/Application/src? I mean... why not the structure Modules/Application/src

Apache - how to make http requests into https only? [duplicate]

二次信任 提交于 2019-12-13 01:24:25
问题 This question already has answers here : http to https through .htaccess (15 answers) Closed 3 years ago . How to tell if http://ttt.com or http://www.ttt.com is used by the user, redirect it to https://www.ttt.com ? httpd.conf: <VirtualHost *:80> ServerName www.ttt.com ServerAlias ttt.com DocumentRoot /home/www/html/ttt/public <Directory /home/www/html/ttt/public> #Options ExecCGI #AddDefaultCharset utf-8 DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory>

Execution of mySQL query in jQuery.Post method

非 Y 不嫁゛ 提交于 2019-12-13 01:16:05
问题 I have created a javascript file that contains js to trigger an event onchange of a drop down list. The JS is below: // /public/js/custom.js jQuery(function($) { $("#parent").change(function(event){ event.preventDefault(); var parentID = $('#parent').val(); var id = $('#id').val(); $.post("/menu/GetMenuChildren", {pID: parentID, thisID: id }, function(data){ if(data.response === true){ var $el = $("#Position"); $el.empty(); // remove old options $.each(data.newOptions, function(key, value) {

ZF2 : ServiceLocatorAwareInterface is deprecated and will be removed in version 3.0

主宰稳场 提交于 2019-12-13 00:57:47
问题 How can fix it (zend version 2.5) ? ServiceLocatorAwareInterface is deprecated and will be removed in version 3.0, along with the ServiceLocatorAwareInitializer. Please update your class Teacher\Controller\TeacherController to remove the implementation, and start injecting your dependencies via factory instead I tried : class TeacherControllerFactory implements FactoryInterface { public function __invoke(ContainerInterface $container, $name, array $options = null) { return new

Unable to use Zend\I18n\View\Helper\CurrencyFormat class

我与影子孤独终老i 提交于 2019-12-13 00:56:09
问题 I'm trying to implement the CurrencyFormat Helper, but when I instance and object of CurrencyFormat the application is raising an exeption: $var new CurrencyFormat(); File: /site/vendor/zendframework/zend-i18n/Zend/I18n/View/Helper/CurrencyFormat.php :63 Message: Zend\I18n\View\Helper component requires the intl PHP extension In my controller I'm including the library use Zend\I18n\View\Helper\CurrencyFormat; I guess I need to add something in composer.json or config files? Thanks! 回答1: The

Possible to create a factory to instantiate custom Form validators?

丶灬走出姿态 提交于 2019-12-13 00:44:15
问题 (using Zend Framework 2.2.4) My validator factory, doesn't seem to "exist" at validation time. If I attempt to instantiate the validator from the controller in which the form is housed, it conversely works fine: This works... $mycustomvalidator = $this->getServiceLocator() ->get('ValidatorManager') ->get('LDP_PinAvailable'); Here's how things are set up otherwise in the code, I can't seem to find the problem, and was hopeful to avoid opening up ZF2 source to understand. By way of

Generate entities with mappers

我的梦境 提交于 2019-12-13 00:34:41
问题 I am trying to find the best way to generate an enities, this is what I am doing at the moment. I create an entity trough a mapper and a hydrator like this: namespace Event\Model\Mapper; use ZfcBase\Mapper\AbstractDbMapper; class Event extends AbstractDbMapper { protected $tableName = 'events'; public function findEventById($id) { $id = (int) $id; $select = $this->getSelect($this->tableName) ->where(array('event_index' => $id)); $eventEntity = $this->select($select)->current(); if(

Doctrine and ZF2

梦想与她 提交于 2019-12-13 00:26:58
问题 I am facing trouble using doctrine join. I can't share my code. But I can tell you scenario. Please help me to achieve that. I have created 2 entity. One User and Language. User table is having foreign key language_id. and Language is master table with id and code fields. I want to fetch user with some criteria, such a way it returns Language code from Language table as well. I write join for that but it returns some full object... Not sure how to fetch corresponding language code from

ZF2 how to disable Zend\Feed\Writer\Feed extensions

限于喜欢 提交于 2019-12-13 00:21:57
问题 Trying to create a simple rss feed in zend framework2 by using Zend\Feed\Writer\Feed: $feed = new \Zend\Feed\Writer\Feed(); ... $out = $feed->export('rss'); echo $out; And this will output: <?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"> <channel> <title>example</title> <description>example</description> <generator>Zend_Feed_Writer 2 (http://framework.zend.com)</generator> <link>http://www.google.com</link> <item> <title>article1

zend framework 2 + routing database

亡梦爱人 提交于 2019-12-12 23:38:10
问题 hi have a problemn with zend framework 2 i want a create routing database for example /hello/index => is Application/Controllers/HomeController /CustomURL => is Application/Controllers/HomeController the CustomUrl i retrieve from database i here is my configuration file /// module.config.php 'router' => array( 'routes' => array( ..... 'node' => array( 'type' => 'Application\Router\Page',//src/Application/Router/Page.php 'options' => array( 'route' => '/node', 'defaults' => array( 'controller'