Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace UCPG\Entity\Proxy;
- /**
- * THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
- */
- class UCPGEntityUserProxy extends \UCPG\Entity\User implements \Doctrine\ORM\Proxy\Proxy
- {
- private $_entityPersister;
- private $_identifier;
- public $__isInitialized__ = false;
- public function __construct($entityPersister, $identifier)
- {
- $this->_entityPersister = $entityPersister;
- $this->_identifier = $identifier;
- }
- private function _load()
- {
- if (!$this->__isInitialized__ && $this->_entityPersister) {
- $this->__isInitialized__ = true;
- if ($this->_entityPersister->load($this->_identifier, $this) === null) {
- throw new \Doctrine\ORM\EntityNotFoundException();
- }
- unset($this->_entityPersister, $this->_identifier);
- }
- }
- public function setId($id)
- {
- $this->_load();
- return parent::setId($id);
- }
- public function getId()
- {
- $this->_load();
- return parent::getId();
- }
- public function addAccount(\UCPG\Entity\Account $account)
- {
- $this->_load();
- return parent::addAccount($account);
- }
- public function getAccount()
- {
- $this->_load();
- return parent::getAccount();
- }
- public function addInstance(\UCPG\Entity\Instance $instance)
- {
- $this->_load();
- return parent::addInstance($instance);
- }
- public function getInstances()
- {
- $this->_load();
- return parent::getInstances();
- }
- public function setPraktijk(\UCPG\Entity\Praktijk $praktijk)
- {
- $this->_load();
- return parent::setPraktijk($praktijk);
- }
- public function getPraktijk()
- {
- $this->_load();
- return parent::getPraktijk();
- }
- public function setFirstname($firstname)
- {
- $this->_load();
- return parent::setFirstname($firstname);
- }
- public function getFirstname()
- {
- $this->_load();
- return parent::getFirstname();
- }
- public function setMiddlename($middlename)
- {
- $this->_load();
- return parent::setMiddlename($middlename);
- }
- public function getMiddlename()
- {
- $this->_load();
- return parent::getMiddlename();
- }
- public function setLastname($lastname)
- {
- $this->_load();
- return parent::setLastname($lastname);
- }
- public function getLastname()
- {
- $this->_load();
- return parent::getLastname();
- }
- public function setDob($dob)
- {
- $this->_load();
- return parent::setDob($dob);
- }
- public function getDob()
- {
- $this->_load();
- return parent::getDob();
- }
- public function setGender($gender)
- {
- $this->_load();
- return parent::setGender($gender);
- }
- public function getGender()
- {
- $this->_load();
- return parent::getGender();
- }
- public function setCreated($created)
- {
- $this->_load();
- return parent::setCreated($created);
- }
- public function getCreated()
- {
- $this->_load();
- return parent::getCreated();
- }
- public function setModified($modified)
- {
- $this->_load();
- return parent::setModified($modified);
- }
- public function getModified()
- {
- $this->_load();
- return parent::getModified();
- }
- public function __sleep()
- {
- return array('__isInitialized__', 'id', 'account', 'instances', 'praktijk', 'firstname', 'middlename', 'lastname', 'dob', 'gender', 'created', 'modified');
- }
- public function __clone()
- {
- if (!$this->__isInitialized__ && $this->_entityPersister) {
- $this->__isInitialized__ = true;
- $class = $this->_entityPersister->getClassMetadata();
- $original = $this->_entityPersister->load($this->_identifier);
- if ($original === null) {
- throw new \Doctrine\ORM\EntityNotFoundException();
- }
- foreach ($class->reflFields AS $field => $reflProperty) {
- $reflProperty->setValue($this, $reflProperty->getValue($original));
- }
- unset($this->_entityPersister, $this->_identifier);
- }
- }
- }
- // ---------------------------------------------------------------------------------------
- <?php
- namespace UCPG\Entity;
- /**
- * @Entity(repositoryClass="UCPG\Entity\Repository\AccountRepository")
- * @Table(name="account",indexes={@index(name="username_UNIQUE",columns={"username"}),@index(name="fk_account_user",columns={"user_id"})})
- */
- class Account
- {
- /**
- * @Id @Column(type="integer")
- * @GeneratedValue(strategy="AUTO")
- */
- private $id;
- /**
- * @OneToOne(targetEntity="User", inversedBy="Account")
- * @JoinColumn(name="user_id", referencedColumnName="id")
- */
- private $user;
- /**
- * @Column(type="string",length=10)
- */
- private $username;
- /**
- * @Column(type="string",length=32)
- */
- private $password;
- /**
- * @Column(type="string",length=10)
- */
- private $role;
- public function __construct()
- {
- }
- public function setId($id)
- {
- $this->id = $id;
- return $this; // fluent interface
- }
- public function getId()
- {
- return $this->id;
- }
- public function setUser(User $user)
- {
- $user->addAccount($this);
- $this->user = $user;
- return $this; // fluent interface
- }
- public function getUser()
- {
- return $this->user;
- }
- public function setUsername($username)
- {
- $this->username = $username;
- return $this; // fluent interface
- }
- public function getUsername()
- {
- return $this->username;
- }
- public function setPassword($password)
- {
- $this->password = $password;
- return $this; // fluent interface
- }
- public function getPassword()
- {
- return $this->password;
- }
- public function setRole($role)
- {
- $this->role = $role;
- return $this; // fluent interface
- }
- public function getRole()
- {
- return $this->role;
- }
- }
- // ----------------------------------------------------------------------------------------
- <?php
- namespace UCPG\Entity;
- use Doctrine\Common\Collections\ArrayCollection;
- /**
- * @Entity(repositoryClass="UCPG\Entity\Repository\UserRepository")
- * @Table(name="user",indexes={@index(name="fk_user_praktijk1",columns={"praktijk_id"})})
- */
- class User
- {
- /**
- * @Id @Column(type="integer")
- * @GeneratedValue(strategy="AUTO")
- */
- private $id;
- /**
- * @OneToOne(targetEntity="Account", mappedBy="User")
- */
- private $account;
- /**
- * @OneToMany(targetEntity="Instance", mappedBy="User")
- */
- private $instances;
- /**
- * @ManyToOne(targetEntity="Praktijk", inversedBy="User")
- */
- private $praktijk;
- /**
- * @Column(type="string",length=60)
- */
- private $firstname;
- /**
- * @Column(type="string",length=60,nullable=true)
- */
- private $middlename;
- /**
- * @Column(type="string",length=60)
- */
- private $lastname;
- /**
- * @Column(type="datetime",nullable=true)
- */
- private $dob;
- /**
- * @Column(type="boolean")
- */
- private $gender;
- /**
- * @Column(type="datetime",nullable=true)
- */
- private $created;
- /**
- * @Column(type="datetime")
- */
- private $modified;
- public function __construct()
- {
- }
- public function setId($id)
- {
- $this->id = $id;
- return $this; // fluent interface
- }
- public function getId()
- {
- return $this->id;
- }
- public function addAccount(Account $account)
- {
- $this->account = $account;
- return $this; // fluent interface
- }
- public function getAccount()
- {
- return $this->account;
- }
- public function addInstance(Instance $instance)
- {
- $this->instances[] = $instance;
- return $this; // fluent interface
- }
- public function getInstances()
- {
- return $this->instances;
- }
- public function setPraktijk(Praktijk $praktijk)
- {
- $praktijk->addUser($this);
- $this->praktijk = $praktijk;
- return $this; // fluent interface
- }
- public function getPraktijk()
- {
- return $this->praktijk;
- }
- public function setFirstname($firstname)
- {
- $this->firstname = $firstname;
- return $this; // fluent interface
- }
- public function getFirstname()
- {
- return $this->firstname;
- }
- public function setMiddlename($middlename)
- {
- $this->middlename = $middlename;
- return $this; // fluent interface
- }
- public function getMiddlename()
- {
- return $this->middlename;
- }
- public function setLastname($lastname)
- {
- $this->lastname = $lastname;
- return $this; // fluent interface
- }
- public function getLastname()
- {
- return $this->lastname;
- }
- public function setDob($dob)
- {
- $this->dob = $dob;
- return $this; // fluent interface
- }
- public function getDob()
- {
- return $this->dob;
- }
- public function setGender($gender)
- {
- $this->gender = $gender;
- return $this; // fluent interface
- }
- public function getGender()
- {
- return $this->gender;
- }
- public function setCreated($created)
- {
- $this->created = $created;
- return $this; // fluent interface
- }
- public function getCreated()
- {
- return $this->created;
- }
- public function setModified($modified)
- {
- $this->modified = $modified;
- return $this; // fluent interface
- }
- public function getModified()
- {
- return $this->modified;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement