How to create web-services in Zend Framework 2? : <p>How to create web services over HTTP REST protocol using Zend Framework 2 (third party)</p>

<p>We use this code in Zend Framework 1 :</p>

<pre><code>        &lt;?php
        function methodName($name) {
        echo "Hello world - $name";
        }

        $server = new Zend_Rest_Server();
        $server-&gt;addFunction('methodName');
        $server-&gt;handle();
        ?&gt;
</code></pre>

<p>An example code will be useful.</p>
