TYPO3 API  SVNRelease
FrontendUser.php
Go to the documentation of this file.
00001 <?php
00002 /***************************************************************
00003  *  Copyright notice
00004  *
00005  *  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
00006  *  All rights reserved
00007  *
00008  *  This script is part of the TYPO3 project. The TYPO3 project is
00009  *  free software; you can redistribute it and/or modify
00010  *  it under the terms of the GNU General Public License as published by
00011  *  the Free Software Foundation; either version 2 of the License, or
00012  *  (at your option) any later version.
00013  *
00014  *  The GNU General Public License can be found at
00015  *  http://www.gnu.org/copyleft/gpl.html.
00016  *
00017  *  This script is distributed in the hope that it will be useful,
00018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *  GNU General Public License for more details.
00021  *
00022  *  This copyright notice MUST APPEAR in all copies of the script!
00023  ***************************************************************/
00024 
00025 /**
00026  * A Frontend User
00027  *
00028  * @package Extbase
00029  * @subpackage Domain\Model
00030  * @version $Id: FrontendUser.php 1949 2010-03-04 06:40:56Z jocrau $
00031  * @scope prototype
00032  * @entity
00033  * @api
00034  */
00035 class Tx_Extbase_Domain_Model_FrontendUser extends Tx_Extbase_DomainObject_AbstractEntity {
00036 
00037     /**
00038      * @var string
00039      */
00040     protected $username;
00041 
00042     /**
00043      * @var string
00044      */
00045     protected $password;
00046 
00047     /**
00048      * @var Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup>
00049      */
00050     protected $usergroup;
00051 
00052     /**
00053      * @var string
00054      */
00055     protected $name;
00056 
00057     /**
00058      * @var string
00059      */
00060     protected $firstName;
00061 
00062     /**
00063      * @var string
00064      */
00065     protected $middleName;
00066 
00067     /**
00068      * @var string
00069      */
00070     protected $lastName;
00071 
00072     /**
00073      * @var string
00074      */
00075     protected $address = '';
00076 
00077     /**
00078      * @var string
00079      */
00080     protected $telephone = '';
00081 
00082     /**
00083      * @var string
00084      */
00085     protected $fax = '';
00086 
00087     /**
00088      * @var string
00089      */
00090     protected $email = '';
00091 
00092     /**
00093      * @var string
00094      */
00095     protected $lockToDomain = '';
00096 
00097     /**
00098      * @var string
00099      */
00100     protected $title = '';
00101 
00102     /**
00103      * @var string
00104      */
00105     protected $zip = '';
00106 
00107     /**
00108      * @var string
00109      */
00110     protected $city = '';
00111 
00112     /**
00113      * @var string
00114      */
00115     protected $country = '';
00116 
00117     /**
00118      * @var string
00119      */
00120     protected $www = '';
00121 
00122     /**
00123      * @var string
00124      */
00125     protected $company = '';
00126 
00127     /**
00128      * @var string
00129      */
00130     protected $image = '';
00131 
00132     /**
00133      * @var DateTime
00134      */
00135     protected $lastlogin = '';
00136 
00137     /**
00138      * @var DateTime
00139      */
00140     protected $isOnline = '';
00141 
00142     /**
00143      * Constructs a new Front-End User
00144      *
00145      * @api
00146      */
00147     public function __construct($username = '', $password = '') {
00148         $this->username = $username;
00149         $this->password = $password;
00150         $this->usergroup = new Tx_Extbase_Persistence_ObjectStorage();
00151     }
00152 
00153     /**
00154      * Sets the username value
00155      *
00156      * @param string $username
00157      * @return void
00158      * @api
00159      */
00160     public function setUsername($username) {
00161         $this->username = $username;
00162     }
00163 
00164     /**
00165      * Returns the username value
00166      *
00167      * @return string
00168      * @api
00169      */
00170     public function getUsername() {
00171         return $this->username;
00172     }
00173 
00174     /**
00175      * Sets the password value
00176      *
00177      * @param string $password
00178      * @return void
00179      * @api
00180      */
00181     public function setPassword($password) {
00182         $this->password = $password;
00183     }
00184 
00185     /**
00186      * Returns the password value
00187      *
00188      * @return string
00189      * @api
00190      */
00191     public function getPassword() {
00192         return $this->password;
00193     }
00194 
00195     /**
00196      * Sets the usergroups. Keep in mind that the property is called "usergroup"
00197      * although it can hold several usergroups.
00198      *
00199      * @param Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup> $usergroup An object storage containing the usergroups to add
00200      * @return void
00201      * @api
00202      */
00203     public function setUsergroup(Tx_Extbase_Persistence_ObjectStorage $usergroup) {
00204         $this->usergroup = $usergroup;
00205     }
00206 
00207     /**
00208      * Adds a usergroup to the frontend user
00209      *
00210      * @param Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup
00211      * @return void
00212      * @api
00213      */
00214     public function addUsergroup(Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup) {
00215         $this->usergroup->attach($usergroup);
00216     }
00217 
00218     /**
00219      * Removes a usergroup from the frontend user
00220      *
00221      * @param Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup
00222      * @return void
00223      * @api
00224      */
00225     public function removeUsergroup(Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup) {
00226         $this->usergroup->detach($usergroup);
00227     }
00228 
00229     /**
00230      * Returns the usergroups. Keep in mind that the property is called "usergroup"
00231      * although it can hold several usergroups.
00232      *
00233      * @return Tx_Extbase_Persistence_ObjectStorage An object storage containing the usergroup
00234      * @api
00235      * @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0 - use Tx_Extbase_Domain_Model_FrontendUser::getUsergroup() instead
00236      */
00237     public function getUsergroups() {
00238         t3lib_div::logDeprecatedFunction();
00239         return $this->usergroup;
00240     }
00241 
00242     /**
00243      * Returns the usergroups. Keep in mind that the property is called "usergroup"
00244      * although it can hold several usergroups.
00245      *
00246      * @return Tx_Extbase_Persistence_ObjectStorage An object storage containing the usergroup
00247      * @api
00248      */
00249     public function getUsergroup() {
00250         return $this->usergroup;
00251     }
00252 
00253     /**
00254      * Sets the name value
00255      *
00256      * @param string $name
00257      * @return void
00258      * @api
00259      */
00260     public function setName($name) {
00261         $this->name = $name;
00262     }
00263 
00264     /**
00265      * Returns the name value
00266      *
00267      * @return string
00268      * @api
00269      */
00270     public function getName() {
00271         return $this->name;
00272     }
00273 
00274     /**
00275      * Sets the firstName value
00276      *
00277      * @param string $firstName
00278      * @return void
00279      * @api
00280      */
00281     public function setFirstName($firstName) {
00282         $this->firstName = $firstName;
00283     }
00284 
00285     /**
00286      * Returns the firstName value
00287      *
00288      * @return string
00289      * @api
00290      */
00291     public function getFirstName() {
00292         return $this->firstName;
00293     }
00294 
00295     /**
00296      * Sets the middleName value
00297      *
00298      * @param string $middleName
00299      * @return void
00300      * @api
00301      */
00302     public function setMiddleName($middleName) {
00303         $this->middleName = $middleName;
00304     }
00305 
00306     /**
00307      * Returns the middleName value
00308      *
00309      * @return string
00310      * @api
00311      */
00312     public function getMiddleName() {
00313         return $this->middleName;
00314     }
00315 
00316     /**
00317      * Sets the lastName value
00318      *
00319      * @param string $lastName
00320      * @return void
00321      * @api
00322      */
00323     public function setLastName($lastName) {
00324         $this->lastName = $lastName;
00325     }
00326 
00327     /**
00328      * Returns the lastName value
00329      *
00330      * @return string
00331      * @api
00332      */
00333     public function getLastName() {
00334         return $this->lastName;
00335     }
00336 
00337     /**
00338      * Sets the address value
00339      *
00340      * @param string $address
00341      * @return void
00342      * @api
00343      */
00344     public function setAddress($address) {
00345         $this->address = $address;
00346     }
00347 
00348     /**
00349      * Returns the address value
00350      *
00351      * @return string
00352      * @api
00353      */
00354     public function getAddress() {
00355         return $this->address;
00356     }
00357 
00358     /**
00359      * Sets the telephone value
00360      *
00361      * @param string $telephone
00362      * @return void
00363      * @api
00364      */
00365     public function setTelephone($telephone) {
00366         $this->telephone = $telephone;
00367     }
00368 
00369     /**
00370      * Returns the telephone value
00371      *
00372      * @return string
00373      * @api
00374      */
00375     public function getTelephone() {
00376         return $this->telephone;
00377     }
00378 
00379     /**
00380      * Sets the fax value
00381      *
00382      * @param string $fax
00383      * @return void
00384      * @api
00385      */
00386     public function setFax($fax) {
00387         $this->fax = $fax;
00388     }
00389 
00390     /**
00391      * Returns the fax value
00392      *
00393      * @return string
00394      * @api
00395      */
00396     public function getFax() {
00397         return $this->fax;
00398     }
00399 
00400     /**
00401      * Sets the email value
00402      *
00403      * @param string $email
00404      * @return void
00405      * @api
00406      */
00407     public function setEmail($email) {
00408         $this->email = $email;
00409     }
00410 
00411     /**
00412      * Returns the email value
00413      *
00414      * @return string
00415      * @api
00416      */
00417     public function getEmail() {
00418         return $this->email;
00419     }
00420 
00421     /**
00422      * Sets the lockToDomain value
00423      *
00424      * @param string $lockToDomain
00425      * @return void
00426      * @api
00427      */
00428     public function setLockToDomain($lockToDomain) {
00429         $this->lockToDomain = $lockToDomain;
00430     }
00431 
00432     /**
00433      * Returns the lockToDomain value
00434      *
00435      * @return string
00436      * @api
00437      */
00438     public function getLockToDomain() {
00439         return $this->lockToDomain;
00440     }
00441 
00442     /**
00443      * Sets the title value
00444      *
00445      * @param string $title
00446      * @return void
00447      * @api
00448      */
00449     public function setTitle($title) {
00450         $this->title = $title;
00451     }
00452 
00453     /**
00454      * Returns the title value
00455      *
00456      * @return string
00457      * @api
00458      */
00459     public function getTitle() {
00460         return $this->title;
00461     }
00462 
00463     /**
00464      * Sets the zip value
00465      *
00466      * @param string $zip
00467      * @return void
00468      * @api
00469      */
00470     public function setZip($zip) {
00471         $this->zip = $zip;
00472     }
00473 
00474     /**
00475      * Returns the zip value
00476      *
00477      * @return string
00478      * @api
00479      */
00480     public function getZip() {
00481         return $this->zip;
00482     }
00483 
00484     /**
00485      * Sets the city value
00486      *
00487      * @param string $city
00488      * @return void
00489      * @api
00490      */
00491     public function setCity($city) {
00492         $this->city = $city;
00493     }
00494 
00495     /**
00496      * Returns the city value
00497      *
00498      * @return string
00499      * @api
00500      */
00501     public function getCity() {
00502         return $this->city;
00503     }
00504 
00505     /**
00506      * Sets the country value
00507      *
00508      * @param string $country
00509      * @return void
00510      * @api
00511      */
00512     public function setCountry($country) {
00513         $this->country = $country;
00514     }
00515 
00516     /**
00517      * Returns the country value
00518      *
00519      * @return string
00520      * @api
00521      */
00522     public function getCountry() {
00523         return $this->country;
00524     }
00525 
00526     /**
00527      * Sets the www value
00528      *
00529      * @param string $www
00530      * @return void
00531      * @api
00532      */
00533     public function setWww($www) {
00534         $this->www = $www;
00535     }
00536 
00537     /**
00538      * Returns the www value
00539      *
00540      * @return string
00541      * @api
00542      */
00543     public function getWww() {
00544         return $this->www;
00545     }
00546 
00547     /**
00548      * Sets the company value
00549      *
00550      * @param string $company
00551      * @return void
00552      * @api
00553      */
00554     public function setCompany($company) {
00555         $this->company = $company;
00556     }
00557 
00558     /**
00559      * Returns the company value
00560      *
00561      * @return string
00562      * @api
00563      */
00564     public function getCompany() {
00565         return $this->company;
00566     }
00567 
00568     /**
00569      * Sets the image value
00570      *
00571      * @param string $image
00572      * @return void
00573      * @api
00574      */
00575     public function setImage($image) {
00576         $this->image = $image;
00577     }
00578 
00579     /**
00580      * Returns the image value
00581      *
00582      * @return string
00583      * @api
00584      */
00585     public function getImage() {
00586         return $this->image;
00587     }
00588 
00589     /**
00590      * Sets the lastlogin value
00591      *
00592      * @param DateTime $lastlogin
00593      * @return void
00594      * @api
00595      */
00596     public function setLastlogin(DateTime $lastlogin) {
00597         $this->lastlogin = $lastlogin;
00598     }
00599 
00600     /**
00601      * Returns the lastlogin value
00602      *
00603      * @return DateTime
00604      * @api
00605      */
00606     public function getLastlogin() {
00607         return $this->lastlogin;
00608     }
00609 
00610     /**
00611      * Sets the isOnline value
00612      *
00613      * @param DateTime $isOnline
00614      * @return void
00615      * @api
00616      */
00617     public function setIsOnline($isOnline) {
00618         $this->isOnline = $isOnline;
00619     }
00620 
00621     /**
00622      * Returns the isOnline value
00623      *
00624      * @return DateTime
00625      * @api
00626      */
00627     public function getIsOnline() {
00628         return $this->isOnline;
00629     }
00630 
00631 }
00632 ?>