for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Oc\Entity;
use Oc\Repository\AbstractEntity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="Oc\Repository\CachesRepository")
*/
class CachesEntity extends AbstractEntity
{
/** @var int */
protected $cache_id;
/** @var datetime */
protected $date_Created;
protected $last_Modified;
protected $user_Id;
/** @var string */
protected $name;
/** @var float */
protected $longitude;
protected $latitude;
protected $status;
protected $country;
protected $difficulty;
protected $terrain;
protected $size;
protected $wp_gc;
protected $wp_oc;
public function isNew()
: bool
return $this->cache_id === null;
}
public function isActiveAndFindable()
if ($this->status == 1) {
return true;
} else {
return false;
public function getCacheId()
: int
return $this->cache_id;
public function setCacheId($arg)
$this->cache_id = $arg;
public function getName()
: string
return $this->name;
public function setName($arg)
$this->name = $arg;
public function getUserId()
return $this->user_Id;
public function setUserId($arg)
$this->user_Id = $arg;
public function getGCid()
return $this->wp_gc;
* Set wpGC
* @param string $arg
public function setGCid($arg)
$this->wp_gc = $arg;
public function getOCid()
return $this->wp_oc;
* Set wpOC
public function setOCid($arg)
$this->wp_oc = $arg;
public function getDifficulty()
return $this->difficulty;
public function getTerrain()
public function convertEntityToArray() : array
$entityOrigin = [];
$entityArray = [];
foreach ($this as $key => $value) {
$this
this<Oc\Entity\CachesEntity>
$entityOrigin = array_merge($entityOrigin, [$key => $value]);
$entityArray[0] = $entityOrigin;
return $entityArray;