Advertisement
Guest User

Untitled

a guest
Aug 6th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 10.36 KB | None | 0 0
  1. <?php
  2.  
  3. namespace UCPG\Entity\Proxy;
  4.  
  5. /**
  6.  * THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
  7.  */
  8. class UCPGEntityUserProxy extends \UCPG\Entity\User implements \Doctrine\ORM\Proxy\Proxy
  9. {
  10.     private $_entityPersister;
  11.     private $_identifier;
  12.     public $__isInitialized__ = false;
  13.     public function __construct($entityPersister, $identifier)
  14.     {
  15.         $this->_entityPersister = $entityPersister;
  16.         $this->_identifier = $identifier;
  17.     }
  18.     private function _load()
  19.     {
  20.         if (!$this->__isInitialized__ && $this->_entityPersister) {
  21.             $this->__isInitialized__ = true;
  22.             if ($this->_entityPersister->load($this->_identifier, $this) === null) {
  23.                 throw new \Doctrine\ORM\EntityNotFoundException();
  24.             }
  25.             unset($this->_entityPersister, $this->_identifier);
  26.         }
  27.     }
  28.  
  29.    
  30.     public function setId($id)
  31.     {
  32.         $this->_load();
  33.         return parent::setId($id);
  34.     }
  35.  
  36.     public function getId()
  37.     {
  38.         $this->_load();
  39.         return parent::getId();
  40.     }
  41.  
  42.     public function addAccount(\UCPG\Entity\Account $account)
  43.     {
  44.         $this->_load();
  45.         return parent::addAccount($account);
  46.     }
  47.  
  48.     public function getAccount()
  49.     {
  50.         $this->_load();
  51.         return parent::getAccount();
  52.     }
  53.  
  54.     public function addInstance(\UCPG\Entity\Instance $instance)
  55.     {
  56.         $this->_load();
  57.         return parent::addInstance($instance);
  58.     }
  59.  
  60.     public function getInstances()
  61.     {
  62.         $this->_load();
  63.         return parent::getInstances();
  64.     }
  65.  
  66.     public function setPraktijk(\UCPG\Entity\Praktijk $praktijk)
  67.     {
  68.         $this->_load();
  69.         return parent::setPraktijk($praktijk);
  70.     }
  71.  
  72.     public function getPraktijk()
  73.     {
  74.         $this->_load();
  75.         return parent::getPraktijk();
  76.     }
  77.  
  78.     public function setFirstname($firstname)
  79.     {
  80.         $this->_load();
  81.         return parent::setFirstname($firstname);
  82.     }
  83.  
  84.     public function getFirstname()
  85.     {
  86.         $this->_load();
  87.         return parent::getFirstname();
  88.     }
  89.  
  90.     public function setMiddlename($middlename)
  91.     {
  92.         $this->_load();
  93.         return parent::setMiddlename($middlename);
  94.     }
  95.  
  96.     public function getMiddlename()
  97.     {
  98.         $this->_load();
  99.         return parent::getMiddlename();
  100.     }
  101.  
  102.     public function setLastname($lastname)
  103.     {
  104.         $this->_load();
  105.         return parent::setLastname($lastname);
  106.     }
  107.  
  108.     public function getLastname()
  109.     {
  110.         $this->_load();
  111.         return parent::getLastname();
  112.     }
  113.  
  114.     public function setDob($dob)
  115.     {
  116.         $this->_load();
  117.         return parent::setDob($dob);
  118.     }
  119.  
  120.     public function getDob()
  121.     {
  122.         $this->_load();
  123.         return parent::getDob();
  124.     }
  125.  
  126.     public function setGender($gender)
  127.     {
  128.         $this->_load();
  129.         return parent::setGender($gender);
  130.     }
  131.  
  132.     public function getGender()
  133.     {
  134.         $this->_load();
  135.         return parent::getGender();
  136.     }
  137.  
  138.     public function setCreated($created)
  139.     {
  140.         $this->_load();
  141.         return parent::setCreated($created);
  142.     }
  143.  
  144.     public function getCreated()
  145.     {
  146.         $this->_load();
  147.         return parent::getCreated();
  148.     }
  149.  
  150.     public function setModified($modified)
  151.     {
  152.         $this->_load();
  153.         return parent::setModified($modified);
  154.     }
  155.  
  156.     public function getModified()
  157.     {
  158.         $this->_load();
  159.         return parent::getModified();
  160.     }
  161.  
  162.  
  163.     public function __sleep()
  164.     {
  165.         return array('__isInitialized__', 'id', 'account', 'instances', 'praktijk', 'firstname', 'middlename', 'lastname', 'dob', 'gender', 'created', 'modified');
  166.     }
  167.  
  168.     public function __clone()
  169.     {
  170.         if (!$this->__isInitialized__ && $this->_entityPersister) {
  171.             $this->__isInitialized__ = true;
  172.             $class = $this->_entityPersister->getClassMetadata();
  173.             $original = $this->_entityPersister->load($this->_identifier);
  174.             if ($original === null) {
  175.                 throw new \Doctrine\ORM\EntityNotFoundException();
  176.             }
  177.             foreach ($class->reflFields AS $field => $reflProperty) {
  178.                 $reflProperty->setValue($this, $reflProperty->getValue($original));
  179.             }
  180.             unset($this->_entityPersister, $this->_identifier);
  181.         }
  182.        
  183.     }
  184. }
  185.  
  186. // ---------------------------------------------------------------------------------------
  187.  
  188. <?php
  189.  
  190. namespace UCPG\Entity;
  191.  
  192. /**
  193.  * @Entity(repositoryClass="UCPG\Entity\Repository\AccountRepository")
  194.  * @Table(name="account",indexes={@index(name="username_UNIQUE",columns={"username"}),@index(name="fk_account_user",columns={"user_id"})})
  195.  */
  196. class Account
  197. {
  198.     /**
  199.      * @Id @Column(type="integer")
  200.      * @GeneratedValue(strategy="AUTO")
  201.      */
  202.     private $id;
  203.  
  204.     /**
  205.      * @OneToOne(targetEntity="User", inversedBy="Account")
  206.      * @JoinColumn(name="user_id", referencedColumnName="id")
  207.      */
  208.     private $user;
  209.  
  210.     /**
  211.      * @Column(type="string",length=10)
  212.      */
  213.     private $username;
  214.  
  215.     /**
  216.      * @Column(type="string",length=32)
  217.      */
  218.     private $password;
  219.  
  220.     /**
  221.      * @Column(type="string",length=10)
  222.      */
  223.     private $role;
  224.  
  225.  
  226.     public function __construct()
  227.     {
  228.  
  229.     }
  230.  
  231.  
  232.     public function setId($id)
  233.     {
  234.          $this->id = $id;
  235.          return $this; // fluent interface
  236.     }
  237.  
  238.     public function getId()
  239.     {
  240.          return $this->id;
  241.     }
  242.  
  243.     public function setUser(User $user)
  244.     {
  245.          $user->addAccount($this);
  246.          $this->user = $user;
  247.          return $this; // fluent interface
  248.     }
  249.  
  250.     public function getUser()
  251.     {
  252.          return $this->user;
  253.     }
  254.  
  255.     public function setUsername($username)
  256.     {
  257.          $this->username = $username;
  258.          return $this; // fluent interface
  259.     }
  260.  
  261.     public function getUsername()
  262.     {
  263.          return $this->username;
  264.     }
  265.  
  266.     public function setPassword($password)
  267.     {
  268.          $this->password = $password;
  269.          return $this; // fluent interface
  270.     }
  271.  
  272.     public function getPassword()
  273.     {
  274.          return $this->password;
  275.     }
  276.  
  277.     public function setRole($role)
  278.     {
  279.          $this->role = $role;
  280.          return $this; // fluent interface
  281.     }
  282.  
  283.     public function getRole()
  284.     {
  285.          return $this->role;
  286.     }
  287. }
  288.  
  289. // ----------------------------------------------------------------------------------------
  290.  
  291. <?php
  292.  
  293. namespace UCPG\Entity;
  294. use Doctrine\Common\Collections\ArrayCollection;
  295.  
  296. /**
  297.  * @Entity(repositoryClass="UCPG\Entity\Repository\UserRepository")
  298.  * @Table(name="user",indexes={@index(name="fk_user_praktijk1",columns={"praktijk_id"})})
  299.  */
  300. class User
  301. {
  302.     /**
  303.      * @Id @Column(type="integer")
  304.      * @GeneratedValue(strategy="AUTO")
  305.      */
  306.     private $id;
  307.  
  308.     /**
  309.      * @OneToOne(targetEntity="Account", mappedBy="User")
  310.      */
  311.     private $account;
  312.  
  313.     /**
  314.      * @OneToMany(targetEntity="Instance", mappedBy="User")
  315.      */
  316.     private $instances;
  317.  
  318.     /**
  319.      * @ManyToOne(targetEntity="Praktijk", inversedBy="User")
  320.      */
  321.     private $praktijk;
  322.  
  323.     /**
  324.      * @Column(type="string",length=60)
  325.      */
  326.     private $firstname;
  327.  
  328.     /**
  329.      * @Column(type="string",length=60,nullable=true)
  330.      */
  331.     private $middlename;
  332.  
  333.     /**
  334.      * @Column(type="string",length=60)
  335.      */
  336.     private $lastname;
  337.  
  338.     /**
  339.      * @Column(type="datetime",nullable=true)
  340.      */
  341.     private $dob;
  342.  
  343.     /**
  344.      * @Column(type="boolean")
  345.      */
  346.     private $gender;
  347.  
  348.     /**
  349.      * @Column(type="datetime",nullable=true)
  350.      */
  351.     private $created;
  352.  
  353.     /**
  354.      * @Column(type="datetime")
  355.      */
  356.     private $modified;
  357.  
  358.  
  359.     public function __construct()
  360.     {
  361.        
  362.     }
  363.  
  364.  
  365.     public function setId($id)
  366.     {
  367.          $this->id = $id;
  368.          return $this; // fluent interface
  369.     }
  370.  
  371.     public function getId()
  372.     {
  373.          return $this->id;
  374.     }
  375.  
  376.     public function addAccount(Account $account)
  377.     {
  378.          $this->account = $account;
  379.          return $this; // fluent interface
  380.     }
  381.  
  382.     public function getAccount()
  383.     {
  384.          return $this->account;
  385.     }
  386.  
  387.     public function addInstance(Instance $instance)
  388.     {
  389.          $this->instances[] = $instance;
  390.          return $this; // fluent interface
  391.     }
  392.  
  393.     public function getInstances()
  394.     {
  395.          return $this->instances;
  396.     }
  397.  
  398.     public function setPraktijk(Praktijk $praktijk)
  399.     {
  400.          $praktijk->addUser($this);
  401.          $this->praktijk = $praktijk;
  402.          return $this; // fluent interface
  403.     }
  404.  
  405.     public function getPraktijk()
  406.     {
  407.          return $this->praktijk;
  408.     }
  409.  
  410.     public function setFirstname($firstname)
  411.     {
  412.          $this->firstname = $firstname;
  413.          return $this; // fluent interface
  414.     }
  415.  
  416.     public function getFirstname()
  417.     {
  418.          return $this->firstname;
  419.     }
  420.  
  421.     public function setMiddlename($middlename)
  422.     {
  423.          $this->middlename = $middlename;
  424.          return $this; // fluent interface
  425.     }
  426.  
  427.     public function getMiddlename()
  428.     {
  429.          return $this->middlename;
  430.     }
  431.  
  432.     public function setLastname($lastname)
  433.     {
  434.          $this->lastname = $lastname;
  435.          return $this; // fluent interface
  436.     }
  437.  
  438.     public function getLastname()
  439.     {
  440.          return $this->lastname;
  441.     }
  442.  
  443.     public function setDob($dob)
  444.     {
  445.          $this->dob = $dob;
  446.          return $this; // fluent interface
  447.     }
  448.  
  449.     public function getDob()
  450.     {
  451.          return $this->dob;
  452.     }
  453.  
  454.     public function setGender($gender)
  455.     {
  456.          $this->gender = $gender;
  457.          return $this; // fluent interface
  458.     }
  459.  
  460.     public function getGender()
  461.     {
  462.          return $this->gender;
  463.     }
  464.  
  465.     public function setCreated($created)
  466.     {
  467.          $this->created = $created;
  468.          return $this; // fluent interface
  469.     }
  470.  
  471.     public function getCreated()
  472.     {
  473.          return $this->created;
  474.     }
  475.  
  476.     public function setModified($modified)
  477.     {
  478.          $this->modified = $modified;
  479.          return $this; // fluent interface
  480.     }
  481.  
  482.     public function getModified()
  483.     {
  484.          return $this->modified;
  485.     }
  486. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement