1. Go to this page and download the library: Download dmykos/ip-store-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/ */
dmykos / ip-store-bundle example snippets
// src/Entity/Stores.php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\StoresRepository")
*/
class Stores
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", unique=true, length=255)
*/
private $store_name;
/**
* @ORM\Column(type="text", length=65535, nullable=true)
*/
private $store_value;
public function getId(): ?int
{
return $this->id;
}
public function getStoreName(): ?string
{
return $this->store_name;
}
public function setStoreName(string $store_name): self
{
$this->store_name = $store_name;
return $this;
}
public function getStoreValue(): ?string
{
return $this->store_value;
}
public function setStoreValue(string $store_value): self
{
$this->store_value = $store_value;
return $this;
}
}
//src/Service/DummyStoreDriver.php
namespace App\Service;
use Dmykos\IpStoreBundle\Entity\IpModel;
use Dmykos\IpStoreBundle\StoreDriverInterface;
class DummyStoreDriver implements StoreDriverInterface
{
public function add( IpModel $ipModel ): int {
return 1000;
}
public function query( IpModel $ipModel ): int {
return 100;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.