How to inject Zend Service Manager in ZF3 Controllers

Zend Service Manager component is Zend Framework’s implementation of service locator pattern. This object is very usefull component for an application and is largely used in ZF applications.

Unfortunately in ZF3 default application, Service Manager component is no more available in controllers.

An official solution exsists for this, but in this little tutorial, I want to share an easy solution to inject Service Manager in all controllers.

Continua a leggere

How to setup a Translate Controller Plugin in Zend Framework 3

Sometimes in our Zend Framework 3 multi-language application, we could need to access to Zend Translator component directly from Controllers. For example, when we have to translate a string to return in a JsonModel.

So, let’s see how to write a very simple Controller Plugin that will help us to save a lot of code (and time).

Following explanation will assume we just have at least a Skeleton ZF3 Application with working Zend Translator component.

Continua a leggere

Print multiple files in Linux

The problem

Print many files in a single session is a common problem for people that works with big data set. Big documentation, Tax forms PDFs, lot’s of images or photos, are all data that are often stored in separated files. When you need to print them, you have to open each file with specific reader and click on print button.

Continua a leggere

Accedere ad una VPN Cisco da Ubuntu utilizzando un file PCF

La Virtual Private Network (VPN) è un ottimo modo per accedere alle risorse del tuo ufficio da casa o da qualsiasi altra rete in sicurezza e la VPN Cisco è una delle più efficienti e robuste.

Una VPN Cisco può essere configurata in due modi: utilizzando direttamente i dati di autenticazione oppure un file PCF.

In questo articolo, vedremo come configurare una VPN Cisco utilizzando un file PFC su di un sistema Ubuntu.

Prima di tutto, assicuriamoci che il client vpnc sia installato. Quindi apriamo un terminale e digitiamo:

$ sudo apt-get install vpnc
Continua a leggere

Connect to Cisco VPN from Ubuntu using PCF file

Virtual Private Network (VPN) is a great option to access to your office resources from home in secure way and Cisco VPN is one of more efficient and robust type of VPN.

Cisco VPN configuration can be setup in 2 ways: using authentication data or PCF file.

In this article, we will describe how to setup Cisco VPN using PCF on an Ubuntu system.

First of all, we need vpnc client, so let’s open a terminal and digit:

$ sudo apt-get install vpnc
Continua a leggere