PHP code example of radnan / rdn-factory

1. Go to this page and download the library: Download radnan/rdn-factory library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

radnan / rdn-factory example snippets



   return array(
       'modules' => array(
           'RdnFactory',
           // ...
       ),
   );
   ~~~

## How to use

The module provides an `RdnFactory\AbstractFactory` class that you should extend when creating your factory classes. Implement the protected `create()` method to create your service.

~~~php
namespace FooModule\Factory\Controller;

use FooModule\Controller;
use RdnFactory\AbstractFactory;

class Bar extends AbstractFactory
{
	protected function create()
	{
		// Create and return your service
		return new Controller\Bar;
	}