Could not open input file: composer.phar
Use this : php -r “readfile(‘https://getcomposer.org/installer’);” | php This will install composer to the current directory so that you can use php composer.phar
Use this : php -r “readfile(‘https://getcomposer.org/installer’);” | php This will install composer to the current directory so that you can use php composer.phar
OK, i think i finally understood what you’re doing. I’ve found a solution that i think matches your criteria. Though i am sure that there is room for improvement, as there’s some nasty handwork to be done… public function indexAction() { if (!$this->getRequest()->isXmlHttpRequest()) { return array(); } $htmlViewPart = new ViewModel(); $htmlViewPart->setTerminal(true) ->setTemplate(‘module/controller/action’) ->setVariables(array( ‘key’ … Read more
The problem is a missing Router (or to be more precise, a Zend\Mvc\Router\RouteStackInterface). A route stack is a collection of routes and can use a route name to turn that into an url. Basically it accepts a route name and creates an url for you: $url = $routeStack->assemble(‘my/route’); This happens inside the MVC Pages of … Read more
If you look at the Zend\Db\Adapter\AdapterServiceFactory, you’ll see that your adapter configuration points to only one key ‘db’. Which means that the Adapter that it builds will always use this (unique) configuration key. I recommend you to create your own factory that would look like this : namespace Your\Namespace; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\Db\Adapter\Adapter; … Read more
PHP CLI SAPI is using different php.ini than CGI or Apache module. Find line ;extension=php_openssl.dll in wamp/bin/php/php#.#.##/php.ini and uncomment it by removing the semicolon (;) from the beginning of the line.
The easiest way to do that would be to use the Params plugin, introduced in beta5. It has utility methods to make it easy to access different types of parameters. As always, reading the tests can prove valuable to understand how something is supposed to be used. Get a single value To get the value … Read more
If you have an association on a property pointing to the user (let’s say Credit\Entity\UserCreditHistory#user, picked from your example), then the syntax is quite simple: public function getHistory($users) { $qb = $this->entityManager->createQueryBuilder(); $qb ->select(‘a’, ‘u’) ->from(‘Credit\Entity\UserCreditHistory’, ‘a’) ->leftJoin(‘a.user’, ‘u’) ->where(‘u = :user’) ->setParameter(‘user’, $users) ->orderBy(‘a.created_at’, ‘DESC’); return $qb->getQuery()->getResult(); } Since you are applying a condition … Read more
Array dereferencing, which is what you are using, was introduced in PHP 5.4 and won’t work in PHP 5.3. So $dbSettings = $sm->get( ‘Config’ )[ ‘doctrine’ ][ ‘connection’ ][ ‘orm_default’ ][ ‘params’ ]; Would need to be: $dbSettings = $sm->get( ‘Config’ ); $params = $dbSettings[ ‘doctrine’ ][ ‘connection’ ][ ‘orm_default’ ][ ‘params’ ];