PHP code example of gepur-it / tiny_int_type
1. Go to this page and download the library: Download gepur-it/tiny_int_type 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/ */
gepur-it / tiny_int_type example snippets
namespace YourBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as JMS;
use Symfony\Component\Validator\Constraints as Assert;
/** Class EntityWithEmailField
* @package YourBundle\Entity
*
* @ORM\Table(
* name="your_table_name",
* options={"collate"="utf8mb4_unicode_ci", "charset"="utf8mb4"}
* )
* @ORM\Entity(repositoryClass="YourBundle\Repository\EntityWithTynyintFieldRepository")
* @ORM\HasLifecycleCallbacks()
* @codeCoverageIgnore
*/
class EntityWithTynyintField
{
/**
* @var integer
*
* @ORM\Column(name="direction", type="tinyint", nullable=false)
*/
protected $direction = 0;
/**
* @return int
*/
public function getDirection(): int
{
return $this->direction;
}
/**
* @param int $direction
*/
public function setDirection(int $direction): void
{
$this->direction = $direction;
}
}