PHP code example of 2lenet / import-bundle
1. Go to this page and download the library: Download 2lenet/import-bundle 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/ */
2lenet / import-bundle example snippets
$bundles = array(
...
new ClickAndMortar\ImportBundle\ClickAndMortarImportBundle(),
);
namespace YourOrganizationName\YourBundle\Reader\Readers;
use ClickAndMortar\ImportBundle\Reader\AbstractReader;
/**
* Class MyCustomXmlReader
*
* @package YourOrganizationName\YourBundle\Reader\Readers
*/
class MyCustomXmlReader extends AbstractReader
{
/**
* Read my custom XML file and return data array
*
* @param string $path
*
* @return array
*/
public function read($path)
{
$data = array();
...
return $data;
}
/**
* Support only xml type
*
* @param string $type
*
* @return bool
*/
public function support($type)
{
return $type == 'xml';
}
}