PHP Fatal error: Call to a member function connect() on a non-object in …/vendor/zendframework/zend-http/Zend/Http/Client.php on line 1359 I used google to find, this partially wrong answer, which essentially tells you to require his version of oAuth. In Lorenzo’s merge request, Maks3w correctly points out, that method: ZendOAuth\Client::getAdapter()

Read more...

Show Tags

Ever wondered what keys should be used to register some service? At this point you should know that you can pass some services to the Zend\ServiceManager\ServiceManager via. This is how you register MyService as a factory with the service_manager key: //modules/MyModule/src/module.config.php <?php return array( ‘service_manager’ => array( ‘factories’ => array( ‘MyService’ => ‘MyModule/Services/MyServiceFactory’, ‘MyService2′ =>

Read more...

At the end of this article you can find the full call stack of the zf2 Application::init() call. When you fresh start with a new framework, you may find it a bit overwhelming to read the whole docs. Similarly reading the code without any explanation to it, may get you lost in the details. Recently

Read more...

Have you ever wondered how many backslashes you should be using when refering to a namspace inside a string? Background In PHP 5 backslashes are used to separate nested namespaces, like this: namespace Name\Spaces\Are\Nested; class NamespacedClass { } Do you recall that strings have backslash escaping? If you write: echo ‘This is my string \\

Read more...

Here is a long time head smasher. Have you ever had a doubt when someone told you: “Yes, just take the horizontal split”. -“Hmmm horizontal… Yes, the hhmm?” I’m sorry for myself to feel like a moron on this. But since I’ve always had the doubt let’s set things straight. Horizontal split could mean, that

Read more...

Show Tags

So here is the best comment ever by Robert Obuch in Zend Framework 2 Getting Started. I was going crazy to find this command over the docs for like 45 seconds! Way too much! So if you want to create a nested directory structure, in one single command, you have to use this: mkdir -p

Read more...

Show Tags

Have you ever wondered where the function dir() got it’s name from? Well apparently it may be inspired by the Windows “Directory Listing”.

But it is used to list the attributes and methods of an object! Then why would it be called after Windows directory listing? Any clue?

 

I don’t know about you, but I have plenty of ideas every day about projects I would like to do. The problem is that resources are limited (time, money, knowledge, energy…) so I always end up discarding 99% of them. Some of those are just discarded because they are plain silly or just unrealistic… But

Read more...

1. Save the page 1.2 beautify 4gen.js modify var adjacentVisiblePages = 2; and replace 2 with 300 or whatever number you like… 2. Beautify html 3. Search for and remove : – Google Analytics START:<script type=”text/javascript”> var _gaq = _gaq || []; END:</script> – Global header START: <div class=”global_header” id=”global_header”> <div class=”inner”> END:</noscript> (delete until

Read more...

So here are the steps you need to follow if you are trying to create or upload a new project to GitHub. There are a thousand of articles like this, but I need one at hand, so you will probably find better step by steps out there. Step 1. Create a repo: Projects are called

Read more...

Show Tags