Domanda

I want to convert string to string which are url friendly

In my none Zend Framework 2 project is just use urlencode($valueContainingString);

Now i'm building an application with Zend Framework 2, now I was wondering if there is any better way to do this.

I did some research and I looked at constrains for the route but it's not working for me.

È stato utile?

Soluzione

Have a look at the \Zend\Escaper classes - there you have plenty of escaping functions for most common use cases.

http://framework.zend.com/manual/2.2/en/modules/zend.escaper.introduction.html

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top