1. Go to this page and download the library: Download ronte-ltd/common-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/ */
ronte-ltd / common-bundle example snippets
new RonteLtd\ElasticBundle\RonteLtdCommonBundle()
namespace AppBundle\Entity;
use RonteLtd\CommonBundle\Entity\AbstractBaseEntity;
use Doctrine\ORM\Mapping as ORM;
/**
* Entity
*
* @ORM\Entity(repositoryClass="AppBundle\Repository\DefaultRepository")
* @ORM\Table(name="some_entity")
*/
class Entity extends AbstractBaseEntity
{
}
namespace AppBundle\Repository;
use RonteLtd\CommonBundle\Repository\AbstractBaseRepository;
class DefaultRepository extends AbstractBaseRepository
{
}
namespace AppBundle\Service;
use RonteLtd\CommonBundle\Service\AbstractBaseService;
class EntityService extends AbstractBaseService
{
}
// We are recieving the service with repository
$service = $this->get('app.entity_service');
$entity = new Entity();
// validate
$result = $service->validate($entity)
// save|remove
$service->save($entity);
$service->remove($entity);
// paginate
$service->paginate($query)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.