]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Entity/Location.php
Add note about validating app
[airbundle] / Entity / Location.php
index e57f235f3f0ef753f85a2c5c4684d47fada90b33..fd619698cbf4ff8b455f70f728bfec446bca5737 100644 (file)
@@ -71,12 +71,18 @@ class Location {
         */
        private $snippets;
 
+       /**
+        * @var \Doctrine\Common\Collections\Collection
+        */
+       private $users;
+
        /**
         * Constructor
         */
        public function __construct() {
                $this->sessions = new \Doctrine\Common\Collections\ArrayCollection();
                $this->snippets = new \Doctrine\Common\Collections\ArrayCollection();
+               $this->users = new \Doctrine\Common\Collections\ArrayCollection();
        }
 
        /**
@@ -370,6 +376,37 @@ class Location {
                return $this->snippets;
        }
 
+       /**
+        * Add user
+        *
+        * @param \Rapsys\AirBundle\Entity\User $user
+        *
+        * @return Location
+        */
+       public function addUser(\Rapsys\AirBundle\Entity\User $user) {
+               $this->users[] = $user;
+
+               return $this;
+       }
+
+       /**
+        * Remove user
+        *
+        * @param \Rapsys\AirBundle\Entity\User $user
+        */
+       public function removeUser(\Rapsys\AirBundle\Entity\User $user) {
+               $this->users->removeElement($user);
+       }
+
+       /**
+        * Get users
+        *
+        * @return \Doctrine\Common\Collections\Collection
+        */
+       public function getUsers() {
+               return $this->users;
+       }
+
        /**
         * Returns a string representation of the location
         *