Welcome to Abdul Malik Ikhsan's Blog

Zend Framework 2 : Step by Step create RESTful Application

Posted in Teknologi, Tutorial PHP, Zend Framework 2 by samsonasik on October 31, 2012

Beside AbstractActionController, ZF2 has AbstractRestfulController that provide RESTful implementation that simply maps HTTP request methods to controller methods : GET maps to either get() or getList(), POST maps to create(), PUT maps to update(), and DELETE maps to delete().

Continue Reading

Advertisements

Zend Framework 2 : Create Simple Login Authentication using AuthenticationService with rememberMe

Posted in Tutorial PHP, Zend Framework 2 by samsonasik on October 23, 2012

Authentication is the process of verifying that “you are who you say you are”. Zend Framework 2 has an AuthenticationService component that usefull to handle this. It can use Adapters, like DbTable, Digest, Http, and Ldap with Session Storage that can be save until time we need by rememberMe() function from Session Manager.

Continue Reading

Zend Framework 2 : Grab web content using Zend\Http\Client and Zend\Dom\Query

Posted in Tutorial PHP, Zend Framework 2 by samsonasik on October 17, 2012

Sometime, we need to grab web content for our application, and then, get the content of selection element ( by tagname for example ). We need DOMElement nodeValue by atributeNode and its textContent. Zend Framework has components that utilize this needed. The components are Zend\Http and Zend\Dom.

Continue Reading

Zend Framework 2 : Translate Validator Messages

Posted in Tutorial PHP, Zend Framework 2 by samsonasik on October 15, 2012

Zend Framework 2 Validator classes provide a setTranslator() method with which you can specify an instance of Zend\I18n\Translator\Translator which will translate the messages in case of a validation failure. The getTranslator() method returns the set translator instance. This is very easy in Zend Framework 2.

Continue Reading

Zend Framework 2 : Using Zend\Form and Ajax

Posted in Tutorial PHP, Zend Framework 2 by samsonasik on October 11, 2012

Ajax can make our life easier. With Ajax, web applications can send data to, and retrieve data from, a server asynchronously (in the background) without interfering with the display and behavior of the existing page. It can create our web more interactive. In this post, i will show you how to use Zend\Form with ajax. I used jQuery javascript library.

Continue Reading

Zend Framework 2 : Setting Up Module Config using XML File

Posted in Tutorial PHP, Zend Framework 2 by samsonasik on October 6, 2012

You have bored with nested array configuration ? Zend Framework 2 give us not only one choice to setting up module config, not only array, we can use another way : XML, ini, Yaml. I will show you how to use xml file be a config of your module.

Continue Reading

Tagged with:

Zend Framework 2 : Step by Step build Form using Annotation Builder

Posted in Tutorial PHP, Zend Framework 2 by samsonasik on October 4, 2012

Zend Framework provide AnnotationBuilder that can createForm by entity which we defined. An entity can be one class that consists of Annotation Type, Filter, Validator, etc in each of the properties. This feature need doctrine Annotation. In this post, i will give you step by step how to use this annotation .

Continue Reading

Zend Framework 2 : Extending Zend\Form to add Select, Multicheckbox, Email,Date, Textarea, and Radio element

Posted in Tutorial PHP, Zend Framework 2 by samsonasik on October 1, 2012

By extending Zend\Form, we can add elements into form on the fly instead of manually instantiate the element(s).
For example, we want a form like this :

I will show you the way to do that. In Zend Framework 2, it’s very easy.

Continue Reading