diff --git a/.gitignore b/.gitignore index 81e6038..10a1f20 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,29 @@ .buildpath .project +.gitmodules .settings/ +.gitmodules application/configs/application.ini -library/Doctrine/ -library/Smarty/ -library/ZFDebug/ -library/Zend/ +application/configs/application.ini.old +library/Twitter +library/Bootstrap-Zend-Framework.git +library/Bootstrap-Zend-Framework +library/Doctrine +library/OSS-Framework.git +library/Smarty +library/ZFDebug +library/Zend public/.htaccess var/log/[1-9]* +var/log/vimbadmin.log* var/templates_c/[a-zA-Z0-9%]* var/session/sess_* +var/tmp library/Minify/ - +*~ +composer.lock +vendor/[a-zA-Z0-9]* +vimbadmin.sublime-project +vimbadmin.sublime-workspace +vimbadmin3.sublime-project +vimbadmin3.sublime-workspace diff --git a/CHANGELOG b/CHANGELOG index c3be066..98d8e1e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,207 +1,4 @@ -Please see CHANGELOG.md for the change log from >= v3.0.0. -2.2.3 2014-02-11 - - upd: Add support for modern crypt() algorithms, with random salt. - Merge pull request #57 from andrewd-sterling/local-mod - - fix: Setting the quota for a mailbox will consider a set maxquota of the - domain; Merge pull request #38 from peterschen/master +# Version 3 - A Work in Progress -2.2.2 2012-10-10 - - upd: Better detection of HTTPS on Nginx (see issue #19, thanks @f8bar) - - fix: issue #24 Smarty tag issue with trailing spaces - - fix: issue #26 regarding character encoding - - fix: issue #27 which reports a syntax error - -2.2.1 2012-05-24 - - add: Full support for Dovecot passwords via Dovecot admin binary. - See: https://github.com/opensolutions/ViMbAdmin/wiki/Password-Schemes - - upd: JQuery, Bootstrap and Chosen - - fix: Data table bug - - fix: typo (from dustinfarris) - -2.2.0 2012-04-05 - - fix: access restrictions - previous implementation would have broken SMTP - auth if one was using it. Added access_restriction_type to - application.ini.dist. - See: https://github.com/opensolutions/ViMbAdmin/wiki/POP3-IMAP-Access-Restriction - - - IMPORTANT: this update requires a database migration - See: https://github.com/opensolutions/ViMbAdmin/wiki/Update-Instructions - -2.1.0 2012-04-03 - - IMPORTANT: this update requires a database migration - See: https://github.com/opensolutions/ViMbAdmin/wiki/Update-Instructions - - - add: Mailbox access restriction allowing for POP3 only / IMAP only / both - See: https://github.com/opensolutions/ViMbAdmin/wiki/POP3-IMAP-Access-Restriction - - add: "allow_access_restriction" to application.ini to enable access - restiction options - - add: "migration_version" to application.ini.dist - only used for new - installs - - add: Doctrine migration tables now that we have had out first migration - - upd: freshly pressed CSS/JS (version 12) - - fix: formatting in add/edit mailbox dialog - -2.0.8 2012-03-06 - - fix: Accidently commited testing code causing issue #10. Fixed. - - fix: Better Smarty 3.1 integration. - - fix: Options in bin/minify-options.php to work with updated version - - add: Popover to add alias to explain / highlight domain aliases - - fix: issue with Add Alias dialog with no domain selected - -2.0.7 2012-03-05 - - add: https://github.com/opensolutions/Minify used instead of local - version - - fix: Removed trunk Smarty 3 and replaced it with tagged 3.0.9 as 3.1 - has incompatibilities. You may need to execute the following: - - $ cd library/Smarty - $ svn switch http://smarty-php.googlecode.com/svn/tags/Smarty_3_0_9/distribution/libs - -2.0.6 - - add: Remove the horrible changed IP die() message and just present the - login screen - -2.0.5 2012-03-05 - - fix: Some issues in JS causing errors and also affeting dialogs. - -2.0.4 2012-03-01 - - add: Now using groups of icons for actions rather than buttons - - add: Tooltips added with small delay for all icon actions - - add: Tooltips moved to Bootstrap and now only on table elements which - have been shortened. - - fix: Improvements to model dialogs. - - add: Cookie is now used to remember the number of items to show in - DataTables. - -2.0.3 2012-02-29 - - fix: Page titles made consistent with menu text - - add: Selecting a domain from the domain list (by clicking logs, mailboxes - and aliases for example) makes the domain 'sticky' as you browse - through the application with the option to clear it by going back to - domains or a page title clear button. - - add: Minimum mailbox password length can be specified in application.ini - addressing issue #8 - - fix: Fix issue #9 by skipping IP check if action is logout. - -2.0.2 2012-02-27 - Major UI overhaul. Frontend is now using Bootstrap from Twitter providing an altogether - prettier, sleeker, consistent and more professional look and feel. A number of small new - features and bugs fixes. No database schema changes. - -0.3.5 2011-09-28 - - add: allow new installers to opt out of the 'new install' developer - pingback and display a message that it exists on the setup page - -0.3.4 2011-09-06 - - fix: https://github.com/opensolutions/ViMbAdmin/issues/3 - - add: Support new mailbox password hashes: crypt, sha1 and salted sha1 and md5 - (old issue 9 from Google Code: http://code.google.com/p/vimbadmin/issues/detail?id=9) - - fix: Changes in 0.3.2 prevented wildcard aliases - - add: MD5-CRYPT hashing used by, for example, Dovecot. This addresses: - http://code.google.com/p/vimbadmin/issues/detail?id=6 - -0.3.3 2011-09-02 - - fix: Critical regression introduced in 0.3.2 preventing the editing of - aliases - -0.3.2 2011-09-01 - - fix: https://github.com/opensolutions/ViMbAdmin/issues/1 - - add: optional parameter in application.ini (skipVersionCheck) to - tell ViMbAdmin to skip the version check on login - See: https://github.com/opensolutions/ViMbAdmin/issues/2 - - fix: we now check for duplicate mailboxes (and aliases) rather - than letting Doctrine throw exceptions for uniqueness - constraints. Thanks maysara for the bug report. - - fix: validate new aliases and mailboxes which was not being done - previously - -0.3.1 2011-08-23 - - Forgot to update changelog got 0.3 release. - -0.3 2011-08-23 - - Changes required for the migration to GitHub. No new features / bugfixes - or functionality. - -0.2.6 2011-08-08 - - fix: trim passwords at login and when entered by an admin - - fix: could not edit aliases - -0.2.5 2011-05-23 - - add: CSS code for demo system at http://www.opensolutions.ie/vimbadmin/ - - add: new favicon based on logo from Limeworks Australia - http://www.limeworks.com.au - - fix: issue #5 in vimbadmin: mktime throws a strict error (r61) - - fix: issue #8 in vimbadmin: Cannot add alias from Mailbox view (r66) - - fix: the autocomplete functionality (used on the Edit / Add Alias page) (r63) - - fix: the possible "Fatal error: spl_autoload() ... Class Doctrine_Event could not be loaded in Doctrine_Record ..." (r64) - - fix: the "inArray" JavaScript validator functionality was broken (r65) - - upd: jQuery 1.5.2 - - upd: jQuery Validation 1.8.0 - - fix: add StringToLower filter to domain, mailbox and alias forms - - -0.2.4 2011-04-07 - - add: new logo thanks to Limeworks Australia - http://www.limeworks.com.au - - upd: new login screen design with new logo - - -0.2.3 2011-03-30 - - fix: critical bug fix preventing email being sent during first use set up - (will only have affected those choosing a random password) - - -0.2.2 2011-03-29 - - add: version checking (once per day per super) and alerting - - add: version displayed in the footer - - fix: adding mailbox alias - - fix: edit alias - - fix: fatal error when listing aliases - - -0.2.1 2011-03-25 - - upd: it is possible now to add domains to admins through the - Administrators->Domains screen - - upd: checkbox to include/exclude mailbox aliases on the Maliboxes->Aliases - and Aliases pages - - fix: the DataTables search was searching in the columns of the buttons too, - providing fake results - - -0.2 2011-03-24 - - upd: IMPORTANT!!! IN THE APPLICATION.INI YOU HAVE TO RENAME THE OPTION - "likeForLikeAliases" TO "mailboxAliases"! - - add: display the link to mailbox password change on the login page - - add: "defaults.table.entries" in application.ini controls the default number - of rows displayed in tables - IMPORTANT!!! IN THE APPLICATION.INI YOU HAVE TO ADD THE NEW OPTION - "defaults.table.entries" and set it to one of 10, 25, 50, 100 - See application.ini.dist for an example. - - add: when adding a new mailbox, the domain is pre-selected - - add: when adding an email alias, it can pre-fill the "local part" and "domain" - fields, depending on which page the "Add Alias" button was clicked on - - add: a few extra checks added when adding a new email alias - - add: can add a new email alias in the "Aliases of [emailaddress]" popup window - - fix: DataTables was floating above the page header on page scroll - - fix: on the Domain List page the sorting by Mailboxes and Aliases did not use - the numeric values, fixed by using Allan Jardine's DataTables sorting plugin - - fix: some typos in texts - - fix: clicking the "Add xyz" buttons at the top of the tables caused a sorting - on that coulumn, which didn't make any sense at all - - upd: less text in the footer, so ViMbAdmin hopefully fits on an 1024x768 screen - - upd: jQuery UI 1.8.11 - - upd: ColorBox v1.3.16 - - upd: DataTables 1.7.6 - - -0.1.2 2011-03-22 - - fix: issue #3 https://code.google.com/p/vimbadmin/issues/detail?id=3 - - -0.1.1 2011-03-15 - - fix: issue with single quotes vs double quotes in application.ini - - add: allow for more informative display of errors - - -0.1 2011-03-10 - - initial release +Please see version 2 for now: https://github.com/opensolutions/ViMbAdmin diff --git a/README.md b/README.md index e2950d9..6032be9 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,50 @@ +# WORK IN PROGRESS + +Please Ignore for Now. + +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| + + ViMbAdmin :: Virtual Mailbox Administration ============================================ -The **ViMbAdmin** project (*vim-be-admin*) provides an web based virtual mailbox -administration system to allow mail administrators to easily manage domains, mailboxes -and aliases. +The **ViMbAdmin** project (*vim-be-admin*) provides a web based virtual mailbox administration system to allow mail administrators to easily manage domains, mailboxes and aliases. -**ViMbAdmin** was written in PHP using our own web application framework which includes -the Zend Framework, the Doctrine ORM and the Smarty templating system with JQuery and Bootstrap. +**ViMbAdmin** was written in PHP using our own web application framework which includes the Zend Framework, the Doctrine ORM and the Smarty templating system with JQuery and Bootstrap. -**ViMbAdmin** is hosted on its own GitHub project page where you can find documentation, -browse the source code and access our Git repository. We have also set up a Google Groups -discussion group or you can follow the [blog posts](http://www.barryodonovan.com/index.php/category/vimbadmin-2) on our MD's personal site. +**ViMbAdmin** is hosted on its own GitHub project page where you can find documentation, browse the source code and access our Git repository. We have also set up a Google Groups discussion group or you can follow the [blog posts](http://www.barryodonovan.com/index.php/category/vimbadmin-2) on our MD's personal site. * Lead Author: [Barry O'Donovan](http://www.barryodonovan.com) (founder and MD of Open Solutions) @@ -52,14 +85,14 @@ Please see the following links for more information: * [Open Solutions' ViMbAdmin page](http://www.opensolutions.ie/open-source/vimbadmin) (with screenshots); * [Live demo](http://www.opensolutions.ie/vimbadmin); -* [GitHub project page](https://github.com/opensolutions/ViMbAdmin); +* [GitHub project page](https://github.com/opensolutions/ViMbAdmin3); * Various [blog posts](http://www.barryodonovan.com/index.php/category/vimbadmin-2);, -* [GitHub wiki](https://github.com/opensolutions/ViMbAdmin/wiki) +* [GitHub wiki](https://github.com/opensolutions/ViMbAdmin3/wiki) Copyright, License and Redistribution -------------------------------------- -Copyright (c) 2011 - 2012 [Open Source Solutions Limited](http://www.opensolutions.ie/), Dublin, Ireland. +Copyright (c) 2011 - 2014 [Open Source Solutions Limited](http://www.opensolutions.ie/), Dublin, Ireland. **ViMbAdmin** is free software: you can redistribute it and/or modify it under the terms of the [GNU General Public License](http://www.gnu.org/licenses/gpl-3.0-standalone.html) as published by diff --git a/application/Bootstrap.php b/application/Bootstrap.php index 169b9da..fe3410a 100644 --- a/application/Bootstrap.php +++ b/application/Bootstrap.php @@ -53,4 +53,36 @@ protected function _initViMbAdminAutoLoader() $autoloader->registerNamespace( 'ViMbAdmin' ); } + + /** + * Register the OSS library autoloader + * + * This function ensures that classes from library/OSS are automatically + * loaded from the subdirectories where subdirectories are indicated by + * underscores in the same manner as Zend. + * + */ + protected function _initOSSAutoLoader() + { + $autoloader = Zend_Loader_Autoloader::getInstance(); + $autoloader->registerNamespace( 'OSS' ); + } + + /** + * Load the database resource before the session resource is loaded. + * + * We're currently using the Zend session handler for storing sessions + * in MySQL. For this, we need to ensure the DB is initialised before + * the session resource is loaded. + */ + protected function _initDbAutoForSessions() + { + // load the DB resource if it is required by the session + if( isset( $this->getOptions()['resources']['session']['saveHandler']['class'] ) + && $this->getOptions()['resources']['session']['saveHandler']['class'] == 'Zend_Session_SaveHandler_DbTable' ) + { + $this->bootstrap('db'); + } + } + } diff --git a/application/Entities/Admin.php b/application/Entities/Admin.php new file mode 100644 index 0000000..2fef62d --- /dev/null +++ b/application/Entities/Admin.php @@ -0,0 +1,501 @@ +Admin = new \Doctrine\Common\Collections\ArrayCollection(); + $this->Logs = new \Doctrine\Common\Collections\ArrayCollection(); + $this->Domains = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Set username + * + * @param string $username + * @return Admin + */ + public function setUsername($username) + { + $this->username = $username; + + return $this; + } + + /** + * Get username + * + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Utility function to get the user's email (which is the username) + * + * @return string + */ + public function getEmail() + { + return $this->getUsername(); + } + + /** + * Utility function to get the user's "formatted name" as required by some OSS functions + * + * @return string + */ + public function getFormattedName() + { + return $this->getUsername(); + } + + + + /** + * Set password + * + * @param string $password + * @return Admin + */ + public function setPassword($password) + { + $this->password = $password; + + return $this; + } + + /** + * Get password + * + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Set super + * + * @param boolean $super + * @return Admin + */ + public function setSuper($super) + { + $this->super = $super; + + return $this; + } + + /** + * Get super + * + * @return boolean + */ + public function getSuper() + { + return $this->super; + } + + /** + * Alias fot getSuper + * + * @return boolean + */ + public function isSuper() + { + return $this->getSuper(); + } + + /** + * Set active + * + * @param boolean $active + * @return Admin + */ + public function setActive($active) + { + $this->active = $active; + + return $this; + } + + /** + * Get active + * + * @return boolean + */ + public function getActive() + { + return $this->active; + } + + /** + * Set created + * + * @param \DateTime $created + * @return Admin + */ + public function setCreated($created) + { + $this->created = $created; + + return $this; + } + + /** + * Get created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->created; + } + + /** + * Set modified + * + * @param \DateTime $modified + * @return Admin + */ + public function setModified($modified) + { + $this->modified = $modified; + + return $this; + } + + /** + * Get modified + * + * @return \DateTime + */ + public function getModified() + { + return $this->modified; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Add Admin + * + * @param Entities\AdminPreference $admin + * @return Admin + */ + public function addAdmin(\Entities\AdminPreference $admin) + { + $this->Admin[] = $admin; + + return $this; + } + + /** + * Remove Admin + * + * @param Entities\AdminPreference $admin + */ + public function removeAdmin(\Entities\AdminPreference $admin) + { + $this->Admin->removeElement($admin); + } + + /** + * Get Admin + * + * @return Doctrine\Common\Collections\Collection + */ + public function getAdmin() + { + return $this->Admin; + } + + /** + * Add Logs + * + * @param Entities\Log $logs + * @return Admin + */ + public function addLog(\Entities\Log $logs) + { + $this->Logs[] = $logs; + + return $this; + } + + /** + * Remove Logs + * + * @param Entities\Log $logs + */ + public function removeLog(\Entities\Log $logs) + { + $this->Logs->removeElement($logs); + } + + /** + * Get Logs + * + * @return Doctrine\Common\Collections\Collection + */ + public function getLogs() + { + return $this->Logs; + } + + /** + * Add Domains + * + * @param Entities\Domain $domains + * @return Admin + */ + public function addDomain(\Entities\Domain $domains) + { + $this->Domains[] = $domains; + + return $this; + } + + /** + * Remove Domains + * + * @param Entities\Domain $domains + */ + public function removeDomain(\Entities\Domain $domains) + { + $this->Domains->removeElement($domains); + } + + /** + * Get Domains + * + * @return Doctrine\Common\Collections\Collection + */ + public function getDomains() + { + return $this->Domains; + } + /** + * @var \Doctrine\Common\Collections\ArrayCollection + */ + private $Preferences; + + + /** + * Add Preferences + * + * @param Entities\AdminPreference $preferences + * @return Admin + */ + public function addPreference(\Entities\AdminPreference $preferences) + { + $this->Preferences[] = $preferences; + + return $this; + } + + /** + * Remove Preferences + * + * @param Entities\AdminPreference $preferences + */ + public function removePreference(\Entities\AdminPreference $preferences) + { + $this->Preferences->removeElement($preferences); + } + + /** + * Get Preferences + * + * @return Doctrine\Common\Collections\Collection + */ + public function getPreferences() + { + return $this->Preferences; + } + + + /** + * Check to see if this user is linked to a given domain (does not check for super - see below) + * + * This function is slightly misnamed as it does not check if your are a super admin (`isSuper()`) + * but rather whether you are linked to a domain or not. So a use case in practice would be: + * + * if( $admin->isSuper() || $admin->canManageDomain( $domain ) ) ...; + * + * + * @param \Entities\Domain $domain The domain object + * @return boolean + */ + public function canManageDomain( $domain ) + { + foreach( $this->getDomains() as $d ) + if( $domain->getId() == $d->getId() ) + return true; + + return false; + } + + + /** + * Add Preferences + * + * @param Entities\AdminPreference $preferences + * @return Admin + */ + public function addAdminPreference(\Entities\AdminPreference $preferences) + { + $this->Preferences[] = $preferences; + return $this; + } + /** + * @var \Doctrine\Common\Collections\Collection + */ + private $RememberMes; + + + /** + * Add RememberMes + * + * @param \Entities\RememberMe $rememberMes + * @return Admin + */ + public function addRememberMe(\Entities\RememberMe $rememberMes) + { + $this->RememberMes[] = $rememberMes; + + return $this; + } + + /** + * Remove RememberMes + * + * @param \Entities\RememberMe $rememberMes + */ + public function removeRememberMe(\Entities\RememberMe $rememberMes) + { + $this->RememberMes->removeElement($rememberMes); + } + + /** + * Get RememberMes + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getRememberMes() + { + return $this->RememberMes; + } + /** + * @var \Doctrine\Common\Collections\Collection + */ + private $Archives; + + + /** + * Add Archives + * + * @param \Entities\Archive $archives + * @return Admin + */ + public function addArchive(\Entities\Archive $archives) + { + $this->Archives[] = $archives; + + return $this; + } + + /** + * Remove Archives + * + * @param \Entities\Archive $archives + */ + public function removeArchive(\Entities\Archive $archives) + { + $this->Archives->removeElement($archives); + } + + /** + * Get Archives + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getArchives() + { + return $this->Archives; + } +} diff --git a/application/Entities/AdminPreference.php b/application/Entities/AdminPreference.php new file mode 100644 index 0000000..7179a40 --- /dev/null +++ b/application/Entities/AdminPreference.php @@ -0,0 +1,223 @@ +attribute = $attribute; + + return $this; + } + + /** + * Get attribute + * + * @return string + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * Set ix + * + * @param integer $ix + * @return AdminPreference + */ + public function setIx($ix) + { + $this->ix = $ix; + + return $this; + } + + /** + * Get ix + * + * @return integer + */ + public function getIx() + { + return $this->ix; + } + + /** + * Set op + * + * @param string $op + * @return AdminPreference + */ + public function setOp($op) + { + $this->op = $op; + + return $this; + } + + /** + * Get op + * + * @return string + */ + public function getOp() + { + return $this->op; + } + + /** + * Set value + * + * @param string $value + * @return AdminPreference + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * Get value + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set expire + * + * @param integer $expire + * @return AdminPreference + */ + public function setExpire($expire) + { + $this->expire = $expire; + + return $this; + } + + /** + * Get expire + * + * @return integer + */ + public function getExpire() + { + return $this->expire; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set Preferences + * + * @param Entities\Admin $preferences + * @return AdminPreference + */ + public function setPreferences(\Entities\Admin $preferences = null) + { + $this->Preferences = $preferences; + + return $this; + } + + /** + * Get Preferences + * + * @return Entities\Admin + */ + public function getPreferences() + { + return $this->Preferences; + } + /** + * @var Entities\Admin + */ + private $Admin; + + + /** + * Set Admin + * + * @param Entities\Admin $admin + * @return AdminPreference + */ + public function setAdmin(\Entities\Admin $admin = null) + { + $this->Admin = $admin; + + return $this; + } + + /** + * Get Admin + * + * @return Entities\Admin + */ + public function getAdmin() + { + return $this->Admin; + } +} diff --git a/application/Entities/Alias.php b/application/Entities/Alias.php new file mode 100644 index 0000000..429a936 --- /dev/null +++ b/application/Entities/Alias.php @@ -0,0 +1,242 @@ +address = $address; + + return $this; + } + + /** + * Get address + * + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * Set goto + * + * @param string $goto + * @return Alias + */ + public function setGoto($goto) + { + $this->goto = $goto; + + return $this; + } + + /** + * Get goto + * + * @return string + */ + public function getGoto() + { + return $this->goto; + } + + /** + * Set active + * + * @param boolean $active + * @return Alias + */ + public function setActive($active) + { + $this->active = $active; + + return $this; + } + + /** + * Get active + * + * @return boolean + */ + public function getActive() + { + return $this->active; + } + + /** + * Set created + * + * @param \DateTime $created + * @return Alias + */ + public function setCreated($created) + { + $this->created = $created; + + return $this; + } + + /** + * Get created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->created; + } + + /** + * Set modified + * + * @param \DateTime $modified + * @return Alias + */ + public function setModified($modified) + { + $this->modified = $modified; + + return $this; + } + + /** + * Get modified + * + * @return \DateTime + */ + public function getModified() + { + return $this->modified; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set Domain + * + * @param Entities\Domain $domain + * @return Alias + */ + public function setDomain(\Entities\Domain $domain = null) + { + $this->Domain = $domain; + + return $this; + } + + /** + * Get Domain + * + * @return Entities\Domain + */ + public function getDomain() + { + return $this->Domain; + } + /** + * @var \Doctrine\Common\Collections\Collection + */ + private $Preferences; + + /** + * Constructor + */ + public function __construct() + { + $this->Preferences = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Add Preferences + * + * @param \Entities\AliasPreference $preferences + * @return Alias + */ + public function addPreference(\Entities\AliasPreference $preferences) + { + $this->Preferences[] = $preferences; + + return $this; + } + + /** + * Remove Preferences + * + * @param \Entities\AliasPreference $preferences + */ + public function removePreference(\Entities\AliasPreference $preferences) + { + $this->Preferences->removeElement($preferences); + } + + /** + * Get Preferences + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getPreferences() + { + return $this->Preferences; + } +} diff --git a/application/Entities/AliasPreference.php b/application/Entities/AliasPreference.php new file mode 100644 index 0000000..6735c50 --- /dev/null +++ b/application/Entities/AliasPreference.php @@ -0,0 +1,195 @@ +attribute = $attribute; + + return $this; + } + + /** + * Get attribute + * + * @return string + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * Set ix + * + * @param integer $ix + * @return AliasPreference + */ + public function setIx($ix) + { + $this->ix = $ix; + + return $this; + } + + /** + * Get ix + * + * @return integer + */ + public function getIx() + { + return $this->ix; + } + + /** + * Set op + * + * @param string $op + * @return AliasPreference + */ + public function setOp($op) + { + $this->op = $op; + + return $this; + } + + /** + * Get op + * + * @return string + */ + public function getOp() + { + return $this->op; + } + + /** + * Set value + * + * @param string $value + * @return AliasPreference + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * Get value + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set expire + * + * @param integer $expire + * @return AliasPreference + */ + public function setExpire($expire) + { + $this->expire = $expire; + + return $this; + } + + /** + * Get expire + * + * @return integer + */ + public function getExpire() + { + return $this->expire; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set Alias + * + * @param \Entities\Alias $alias + * @return AliasPreference + */ + public function setAlias(\Entities\Alias $alias = null) + { + $this->Alias = $alias; + + return $this; + } + + /** + * Get Alias + * + * @return \Entities\Alias + */ + public function getAlias() + { + return $this->Alias; + } +} diff --git a/application/Entities/Archive.php b/application/Entities/Archive.php new file mode 100644 index 0000000..3eae2f5 --- /dev/null +++ b/application/Entities/Archive.php @@ -0,0 +1,470 @@ + "Pending Archive", + self::STATUS_ARCHIVING => "Archiving", + self::STATUS_ARCHIVED => "Archived", + self::STATUS_PENDING_RESTORE => "Pending Restore", + self::STATUS_RESTORING => "Restoring", + self::STATUS_RESTORED => "Restored", + self::STATUS_PENDING_DELETE => "Pending Delete", + self::STATUS_DELETING => "Deleting", + self::STATUS_DELETED => "Deleted" + + ]; + + /** + * @var string + */ + private $username; + + /** + * @var string + */ + private $status; + + /** + * @var \DateTime + */ + private $archived_at; + + /** + * @var \DateTime + */ + private $status_changed_at; + + /** + * @var string + */ + private $homedir_server; + + /** + * @var string + */ + private $homedir_file; + + /** + * @var integer + */ + private $homedir_orig_size; + + /** + * @var integer + */ + private $homedir_size; + + /** + * @var string + */ + private $maildir_server; + + /** + * @var string + */ + private $maildir_file; + + /** + * @var integer + */ + private $maildir_orig_size; + + /** + * @var integer + */ + private $maildir_size; + + /** + * @var string + */ + private $data; + + /** + * @var integer + */ + private $id; + + /** + * @var \Entities\Domain + */ + private $Domain; + + /** + * @var \Entities\Admin + */ + private $ArchivedBy; + + + /** + * Set username + * + * @param string $username + * @return Archive + */ + public function setUsername($username) + { + $this->username = $username; + + return $this; + } + + /** + * Get username + * + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Set status + * + * @param string $status + * @return Archive + */ + public function setStatus($status) + { + $this->status = $status; + + return $this; + } + + /** + * Get status + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * Set archived_at + * + * @param \DateTime $archivedAt + * @return Archive + */ + public function setArchivedAt($archivedAt) + { + $this->archived_at = $archivedAt; + + return $this; + } + + /** + * Get archived_at + * + * @return \DateTime + */ + public function getArchivedAt() + { + return $this->archived_at; + } + + /** + * Set status_changed_at + * + * @param \DateTime $statusChangedAt + * @return Archive + */ + public function setStatusChangedAt($statusChangedAt) + { + $this->status_changed_at = $statusChangedAt; + + return $this; + } + + /** + * Get status_changed_at + * + * @return \DateTime + */ + public function getStatusChangedAt() + { + return $this->status_changed_at; + } + + /** + * Set homedir_server + * + * @param string $homedirServer + * @return Archive + */ + public function setHomedirServer($homedirServer) + { + $this->homedir_server = $homedirServer; + + return $this; + } + + /** + * Get homedir_server + * + * @return string + */ + public function getHomedirServer() + { + return $this->homedir_server; + } + + /** + * Set homedir_file + * + * @param string $homedirFile + * @return Archive + */ + public function setHomedirFile($homedirFile) + { + $this->homedir_file = $homedirFile; + + return $this; + } + + /** + * Get homedir_file + * + * @return string + */ + public function getHomedirFile() + { + return $this->homedir_file; + } + + /** + * Set homedir_orig_size + * + * @param integer $homedirOrigSize + * @return Archive + */ + public function setHomedirOrigSize($homedirOrigSize) + { + $this->homedir_orig_size = $homedirOrigSize; + + return $this; + } + + /** + * Get homedir_orig_size + * + * @return integer + */ + public function getHomedirOrigSize() + { + return $this->homedir_orig_size; + } + + /** + * Set homedir_size + * + * @param integer $homedirSize + * @return Archive + */ + public function setHomedirSize($homedirSize) + { + $this->homedir_size = $homedirSize; + + return $this; + } + + /** + * Get homedir_size + * + * @return integer + */ + public function getHomedirSize() + { + return $this->homedir_size; + } + + /** + * Set maildir_server + * + * @param string $maildirServer + * @return Archive + */ + public function setMaildirServer($maildirServer) + { + $this->maildir_server = $maildirServer; + + return $this; + } + + /** + * Get maildir_server + * + * @return string + */ + public function getMaildirServer() + { + return $this->maildir_server; + } + + /** + * Set maildir_file + * + * @param string $maildirFile + * @return Archive + */ + public function setMaildirFile($maildirFile) + { + $this->maildir_file = $maildirFile; + + return $this; + } + + /** + * Get maildir_file + * + * @return string + */ + public function getMaildirFile() + { + return $this->maildir_file; + } + + /** + * Set maildir_orig_size + * + * @param integer $maildirOrigSize + * @return Archive + */ + public function setMaildirOrigSize($maildirOrigSize) + { + $this->maildir_orig_size = $maildirOrigSize; + + return $this; + } + + /** + * Get maildir_orig_size + * + * @return integer + */ + public function getMaildirOrigSize() + { + return $this->maildir_orig_size; + } + + /** + * Set maildir_size + * + * @param integer $maildirSize + * @return Archive + */ + public function setMaildirSize($maildirSize) + { + $this->maildir_size = $maildirSize; + + return $this; + } + + /** + * Get maildir_size + * + * @return integer + */ + public function getMaildirSize() + { + return $this->maildir_size; + } + + /** + * Set data + * + * @param string $data + * @return Archive + */ + public function setData($data) + { + $this->data = $data; + + return $this; + } + + /** + * Get data + * + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set Domain + * + * @param \Entities\Domain $domain + * @return Archive + */ + public function setDomain(\Entities\Domain $domain = null) + { + $this->Domain = $domain; + + return $this; + } + + /** + * Get Domain + * + * @return \Entities\Domain + */ + public function getDomain() + { + return $this->Domain; + } + + /** + * Set ArchivedBy + * + * @param \Entities\Admin $archivedBy + * @return Archive + */ + public function setArchivedBy(\Entities\Admin $archivedBy = null) + { + $this->ArchivedBy = $archivedBy; + + return $this; + } + + /** + * Get ArchivedBy + * + * @return \Entities\Admin + */ + public function getArchivedBy() + { + return $this->ArchivedBy; + } +} diff --git a/application/Entities/DatabaseVersion.php b/application/Entities/DatabaseVersion.php new file mode 100644 index 0000000..570c93c --- /dev/null +++ b/application/Entities/DatabaseVersion.php @@ -0,0 +1,111 @@ +version = $version; + + return $this; + } + + /** + * Get version + * + * @return integer + */ + public function getVersion() + { + return $this->version; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + /** + * @var string + */ + private $name; + + /** + * @var \DateTime + */ + private $applied_on; + + + /** + * Set name + * + * @param string $name + * @return DatabaseVersion + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * Get name + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set applied_on + * + * @param \DateTime $appliedOn + * @return DatabaseVersion + */ + public function setAppliedOn($appliedOn) + { + $this->applied_on = $appliedOn; + + return $this; + } + + /** + * Get applied_on + * + * @return \DateTime + */ + public function getAppliedOn() + { + return $this->applied_on; + } +} diff --git a/application/Entities/DirectoryEntry.php b/application/Entities/DirectoryEntry.php new file mode 100644 index 0000000..d98cd5f --- /dev/null +++ b/application/Entities/DirectoryEntry.php @@ -0,0 +1,839 @@ +businessCategory = $businessCategory; + + return $this; + } + + /** + * Get businessCategory + * + * @return string + */ + public function getBusinessCategory() + { + return $this->businessCategory; + } + + /** + * Set carLicense + * + * @param string $carLicense + * @return DirectoryEntry + */ + public function setCarLicense($carLicense) + { + $this->carLicense = $carLicense; + + return $this; + } + + /** + * Get carLicense + * + * @return string + */ + public function getCarLicense() + { + return $this->carLicense; + } + + /** + * Set departmentNumber + * + * @param string $departmentNumber + * @return DirectoryEntry + */ + public function setDepartmentNumber($departmentNumber) + { + $this->departmentNumber = $departmentNumber; + + return $this; + } + + /** + * Get departmentNumber + * + * @return string + */ + public function getDepartmentNumber() + { + return $this->departmentNumber; + } + + /** + * Set displayName + * + * @param string $displayName + * @return DirectoryEntry + */ + public function setDisplayName($displayName) + { + $this->displayName = $displayName; + + return $this; + } + + /** + * Get displayName + * + * @return string + */ + public function getDisplayName() + { + return $this->displayName; + } + + /** + * Set employeeNumber + * + * @param string $employeeNumber + * @return DirectoryEntry + */ + public function setEmployeeNumber($employeeNumber) + { + $this->employeeNumber = $employeeNumber; + + return $this; + } + + /** + * Get employeeNumber + * + * @return string + */ + public function getEmployeeNumber() + { + return $this->employeeNumber; + } + + /** + * Set employeeType + * + * @param string $employeeType + * @return DirectoryEntry + */ + public function setEmployeeType($employeeType) + { + $this->employeeType = $employeeType; + + return $this; + } + + /** + * Get employeeType + * + * @return string + */ + public function getEmployeeType() + { + return $this->employeeType; + } + + /** + * Set homePhone + * + * @param string $homePhone + * @return DirectoryEntry + */ + public function setHomePhone($homePhone) + { + $this->homePhone = $homePhone; + + return $this; + } + + /** + * Get homePhone + * + * @return string + */ + public function getHomePhone() + { + return $this->homePhone; + } + + /** + * Set homePostalAddress + * + * @param string $homePostalAddress + * @return DirectoryEntry + */ + public function setHomePostalAddress($homePostalAddress) + { + $this->homePostalAddress = $homePostalAddress; + + return $this; + } + + /** + * Get homePostalAddress + * + * @return string + */ + public function getHomePostalAddress() + { + return $this->homePostalAddress; + } + + /** + * Set initials + * + * @param string $initials + * @return DirectoryEntry + */ + public function setInitials($initials) + { + $this->initials = $initials; + + return $this; + } + + /** + * Get initials + * + * @return string + */ + public function getInitials() + { + return $this->initials; + } + + /** + * Set jpegPhoto + * + * @param \stdClass $jpegPhoto + * @return DirectoryEntry + */ + public function setJpegPhoto($jpegPhoto) + { + $this->jpegPhoto = $jpegPhoto; + + return $this; + } + + /** + * Get jpegPhoto + * + * @return \stdClass + */ + public function getJpegPhoto() + { + return $this->jpegPhoto; + } + + /** + * Set labeledURI + * + * @param string $labeledURI + * @return DirectoryEntry + */ + public function setLabeledURI($labeledURI) + { + $this->labeledURI = $labeledURI; + + return $this; + } + + /** + * Get labeledURI + * + * @return string + */ + public function getLabeledURI() + { + return $this->labeledURI; + } + + /** + * Set mail + * + * @param string $mail + * @return DirectoryEntry + */ + public function setMail($mail) + { + $this->mail = $mail; + + return $this; + } + + /** + * Get mail + * + * @return string + */ + public function getMail() + { + return $this->mail; + } + + /** + * Set manager + * + * @param string $manager + * @return DirectoryEntry + */ + public function setManager($manager) + { + $this->manager = $manager; + + return $this; + } + + /** + * Get manager + * + * @return string + */ + public function getManager() + { + return $this->manager; + } + + /** + * Set mobile + * + * @param string $mobile + * @return DirectoryEntry + */ + public function setMobile($mobile) + { + $this->mobile = $mobile; + + return $this; + } + + /** + * Get mobile + * + * @return string + */ + public function getMobile() + { + return $this->mobile; + } + + /** + * Set o + * + * @param string $o + * @return DirectoryEntry + */ + public function setO($o) + { + $this->o = $o; + + return $this; + } + + /** + * Get o + * + * @return string + */ + public function getO() + { + return $this->o; + } + + /** + * Set pager + * + * @param string $pager + * @return DirectoryEntry + */ + public function setPager($pager) + { + $this->pager = $pager; + + return $this; + } + + /** + * Get pager + * + * @return string + */ + public function getPager() + { + return $this->pager; + } + + /** + * Set preferredLanguage + * + * @param string $preferredLanguage + * @return DirectoryEntry + */ + public function setPreferredLanguage($preferredLanguage) + { + $this->preferredLanguage = $preferredLanguage; + + return $this; + } + + /** + * Get preferredLanguage + * + * @return string + */ + public function getPreferredLanguage() + { + return $this->preferredLanguage; + } + + /** + * Set roomNumber + * + * @param string $roomNumber + * @return DirectoryEntry + */ + public function setRoomNumber($roomNumber) + { + $this->roomNumber = $roomNumber; + + return $this; + } + + /** + * Get roomNumber + * + * @return string + */ + public function getRoomNumber() + { + return $this->roomNumber; + } + + /** + * Set secretary + * + * @param string $secretary + * @return DirectoryEntry + */ + public function setSecretary($secretary) + { + $this->secretary = $secretary; + + return $this; + } + + /** + * Get secretary + * + * @return string + */ + public function getSecretary() + { + return $this->secretary; + } + + /** + * Set personalTitle + * + * @param string $personalTitle + * @return DirectoryEntry + */ + public function setPersonalTitle($personalTitle) + { + $this->personalTitle = $personalTitle; + + return $this; + } + + /** + * Get personalTitle + * + * @return string + */ + public function getPersonalTitle() + { + return $this->personalTitle; + } + + /** + * Set sn + * + * @param string $sn + * @return DirectoryEntry + */ + public function setSn($sn) + { + $this->sn = $sn; + + return $this; + } + + /** + * Get sn + * + * @return string + */ + public function getSn() + { + return $this->sn; + } + + /** + * Set ou + * + * @param string $ou + * @return DirectoryEntry + */ + public function setOu($ou) + { + $this->ou = $ou; + + return $this; + } + + /** + * Get ou + * + * @return string + */ + public function getOu() + { + return $this->ou; + } + + /** + * Set title + * + * @param string $title + * @return DirectoryEntry + */ + public function setTitle($title) + { + $this->title = $title; + + return $this; + } + + /** + * Get title + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set facsimileTelephoneNumber + * + * @param string $facsimileTelephoneNumber + * @return DirectoryEntry + */ + public function setFacsimileTelephoneNumber($facsimileTelephoneNumber) + { + $this->facsimileTelephoneNumber = $facsimileTelephoneNumber; + + return $this; + } + + /** + * Get facsimileTelephoneNumber + * + * @return string + */ + public function getFacsimileTelephoneNumber() + { + return $this->facsimileTelephoneNumber; + } + + /** + * Set givenName + * + * @param string $givenName + * @return DirectoryEntry + */ + public function setGivenName($givenName) + { + $this->givenName = $givenName; + + return $this; + } + + /** + * Get givenName + * + * @return string + */ + public function getGivenName() + { + return $this->givenName; + } + + /** + * Set telephoneNumber + * + * @param string $telephoneNumber + * @return DirectoryEntry + */ + public function setTelephoneNumber($telephoneNumber) + { + $this->telephoneNumber = $telephoneNumber; + + return $this; + } + + /** + * Get telephoneNumber + * + * @return string + */ + public function getTelephoneNumber() + { + return $this->telephoneNumber; + } + + /** + * Set vimb_created + * + * @param \DateTime $vimbCreated + * @return DirectoryEntry + */ + public function setVimbCreated($vimbCreated) + { + $this->vimb_created = $vimbCreated; + + return $this; + } + + /** + * Get vimb_created + * + * @return \DateTime + */ + public function getVimbCreated() + { + return $this->vimb_created; + } + + /** + * Set vimb_update + * + * @param \DateTime $vimbUpdate + * @return DirectoryEntry + */ + public function setVimbUpdate($vimbUpdate) + { + $this->vimb_update = $vimbUpdate; + + return $this; + } + + /** + * Get vimb_update + * + * @return \DateTime + */ + public function getVimbUpdate() + { + return $this->vimb_update; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set Mailbox + * + * @param \Entities\Mailbox $mailbox + * @return DirectoryEntry + */ + public function setMailbox(\Entities\Mailbox $mailbox) + { + $this->Mailbox = $mailbox; + + return $this; + } + + /** + * Get Mailbox + * + * @return \Entities\Mailbox + */ + public function getMailbox() + { + return $this->Mailbox; + } +} diff --git a/application/Entities/Domain.php b/application/Entities/Domain.php new file mode 100644 index 0000000..8ffe28b --- /dev/null +++ b/application/Entities/Domain.php @@ -0,0 +1,837 @@ +Mailboxes = new \Doctrine\Common\Collections\ArrayCollection(); + $this->Aliases = new \Doctrine\Common\Collections\ArrayCollection(); + $this->Logs = new \Doctrine\Common\Collections\ArrayCollection(); + $this->Admins = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Set domain + * + * @param string $domain + * @return Domain + */ + public function setDomain($domain) + { + $this->domain = $domain; + + return $this; + } + + /** + * Get domain + * + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Set description + * + * @param string $description + * @return Domain + */ + public function setDescription($description) + { + $this->description = $description; + + return $this; + } + + /** + * Get description + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Get aliases + * + * @return integer + */ + public function getAliases() + { + return $this->Aliases; + } + + /** + * Get mailboxes + * + * @return integer + */ + public function getMailboxes() + { + return $this->Mailboxes; + } + + /** + * Set quota + * + * @param integer $quota + * @return Domain + */ + public function setQuota($quota) + { + $this->quota = $quota; + + return $this; + } + + /** + * Get quota + * + * @return integer + */ + public function getQuota() + { + return $this->quota; + } + + /** + * Set transport + * + * @param string $transport + * @return Domain + */ + public function setTransport($transport) + { + $this->transport = $transport; + + return $this; + } + + /** + * Get transport + * + * @return string + */ + public function getTransport() + { + return $this->transport; + } + + /** + * Set backupmx + * + * @param boolean $backupmx + * @return Domain + */ + public function setBackupmx($backupmx) + { + $this->backupmx = $backupmx; + + return $this; + } + + /** + * Get backupmx + * + * @return boolean + */ + public function getBackupmx() + { + return $this->backupmx; + } + + /** + * Set active + * + * @param boolean $active + * @return Domain + */ + public function setActive($active) + { + $this->active = $active; + + return $this; + } + + /** + * Get active + * + * @return boolean + */ + public function getActive() + { + return $this->active; + } + + /** + * Set homedir + * + * @param string $homedir + * @return Domain + */ + public function setHomedir($homedir) + { + $this->homedir = $homedir; + + return $this; + } + + /** + * Get homedir + * + * @return string + */ + public function getHomedir() + { + return $this->homedir; + } + + /** + * Set maildir + * + * @param string $maildir + * @return Domain + */ + public function setMaildir($maildir) + { + $this->maildir = $maildir; + + return $this; + } + + /** + * Get maildir + * + * @return string + */ + public function getMaildir() + { + return $this->maildir; + } + + /** + * Set uid + * + * @param integer $uid + * @return Domain + */ + public function setUid($uid) + { + $this->uid = $uid; + + return $this; + } + + /** + * Get uid + * + * @return integer + */ + public function getUid() + { + return $this->uid; + } + + /** + * Set gid + * + * @param integer $gid + * @return Domain + */ + public function setGid($gid) + { + $this->gid = $gid; + + return $this; + } + + /** + * Get gid + * + * @return integer + */ + public function getGid() + { + return $this->gid; + } + + /** + * Set created + * + * @param \DateTime $created + * @return Domain + */ + public function setCreated($created) + { + $this->created = $created; + + return $this; + } + + /** + * Get created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->created; + } + + /** + * Set modified + * + * @param \DateTime $modified + * @return Domain + */ + public function setModified($modified) + { + $this->modified = $modified; + + return $this; + } + + /** + * Get modified + * + * @return \DateTime + */ + public function getModified() + { + return $this->modified; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Add Mailboxes + * + * @param Entities\Mailbox $mailboxes + * @return Domain + */ + public function addMailbox(\Entities\Mailbox $mailboxes) + { + $this->Mailboxes[] = $mailboxes; + + return $this; + } + + /** + * Remove Mailboxes + * + * @param Entities\Mailbox $mailboxes + */ + public function removeMailbox(\Entities\Mailbox $mailboxes) + { + $this->Mailboxes->removeElement($mailboxes); + } + + /** + * Add Aliases + * + * @param Entities\Alias $aliases + * @return Domain + */ + public function addAlias(\Entities\Alias $aliases) + { + $this->Aliases[] = $aliases; + + return $this; + } + + /** + * Remove Aliases + * + * @param Entities\Alias $aliases + */ + public function removeAlias(\Entities\Alias $aliases) + { + $this->Aliases->removeElement($aliases); + } + + /** + * Add Logs + * + * @param Entities\Log $logs + * @return Domain + */ + public function addLog(\Entities\Log $logs) + { + $this->Logs[] = $logs; + + return $this; + } + + /** + * Remove Logs + * + * @param Entities\Log $logs + */ + public function removeLog(\Entities\Log $logs) + { + $this->Logs->removeElement($logs); + } + + /** + * Get Logs + * + * @return Doctrine\Common\Collections\Collection + */ + public function getLogs() + { + return $this->Logs; + } + + /** + * Add Admins + * + * @param Entities\Admin $admins + * @return Domain + */ + public function addAdmin(\Entities\Admin $admins) + { + $this->Admins[] = $admins; + + return $this; + } + + /** + * Remove Admins + * + * @param Entities\Admin $admins + */ + public function removeAdmin(\Entities\Admin $admins) + { + $this->Admins->removeElement($admins); + } + + /** + * Get Admins + * + * @return Doctrine\Common\Collections\Collection + */ + public function getAdmins() + { + return $this->Admins; + } + + + + /** + * Set max_aliases + * + * @param integer $maxAliases + * @return Domain + */ + public function setMaxAliases($maxAliases) + { + $this->max_aliases = $maxAliases; + + return $this; + } + + /** + * Get max_aliases + * + * @return integer + */ + public function getMaxAliases() + { + return $this->max_aliases; + } + + /** + * Set max_mailboxes + * + * @param integer $maxMailboxes + * @return Domain + */ + public function setMaxMailboxes($maxMailboxes) + { + $this->max_mailboxes = $maxMailboxes; + + return $this; + } + + /** + * Get max_mailboxes + * + * @return integer + */ + public function getMaxMailboxes() + { + return $this->max_mailboxes; + } + + + + /** + * Set max_quota + * + * @param integer $maxQuota + * @return Domain + */ + public function setMaxQuota($maxQuota) + { + $this->max_quota = $maxQuota; + + return $this; + } + + /** + * Get max_quota + * + * @return integer + */ + public function getMaxQuota() + { + return $this->max_quota; + } + + + + /** + * Set alias_count + * + * @param bigint $aliasCount + * @return Domain + */ + public function setAliasCount($aliasCount) + { + $this->alias_count = $aliasCount; + return $this; + } + + /** + * Get alias_count + * + * @return bigint + */ + public function getAliasCount() + { + return $this->alias_count; + } + + /** + * Increase alias_count + * + * @return void + */ + public function increaseAliasCount() + { + $this->alias_count += 1; + } + + /** + * Decrease alias_count + * + * @return void + */ + public function decreaseAliasCount() + { + if( $this->alias_count > 0 ) + $this->alias_count -= 1; + } + + + + /** + * Set mailbox_count + * + * @param bigint $mailboxCount + * @return Domain + */ + public function setMailboxCount($mailboxCount) + { + $this->mailbox_count = $mailboxCount; + return $this; + } + + /** + * Get mailbox_count + * + * @return bigint + */ + public function getMailboxCount() + { + return $this->mailbox_count; + } + + /** + * Increase mailbox_count + * + * @return void + */ + public function increaseMailboxCount() + { + $this->mailbox_count += 1; + } + + /** + * Decrease mailbox_count + * + * @return void + */ + public function decreaseMailboxCount() + { + if( $this->mailbox_count > 0 ) + $this->mailbox_count -= 1; + } + + /** + * Add Mailboxes + * + * @param \Entities\Mailbox $mailboxes + * @return Domain + */ + public function addMailboxe(\Entities\Mailbox $mailboxes) + { + $this->Mailboxes[] = $mailboxes; + + return $this; + } + + /** + * Remove Mailboxes + * + * @param \Entities\Mailbox $mailboxes + */ + public function removeMailboxe(\Entities\Mailbox $mailboxes) + { + $this->Mailboxes->removeElement($mailboxes); + } + + /** + * Add Aliases + * + * @param \Entities\Alias $aliases + * @return Domain + */ + public function addAliase(\Entities\Alias $aliases) + { + $this->Aliases[] = $aliases; + + return $this; + } + + /** + * Remove Aliases + * + * @param \Entities\Alias $aliases + */ + public function removeAliase(\Entities\Alias $aliases) + { + $this->Aliases->removeElement($aliases); + } + /** + * @var \Doctrine\Common\Collections\Collection + */ + private $Preferences; + + + /** + * Add Preferences + * + * @param \Entities\DomainPreference $preferences + * @return Domain + */ + public function addPreference(\Entities\DomainPreference $preferences) + { + $this->Preferences[] = $preferences; + + return $this; + } + + /** + * Remove Preferences + * + * @param \Entities\DomainPreference $preferences + */ + public function removePreference(\Entities\DomainPreference $preferences) + { + $this->Preferences->removeElement($preferences); + } + + /** + * Get Preferences + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getPreferences() + { + return $this->Preferences; + } + /** + * @var \Doctrine\Common\Collections\Collection + */ + private $Archives; + + + /** + * Add Archives + * + * @param \Entities\Archive $archives + * @return Domain + */ + public function addArchive(\Entities\Archive $archives) + { + $this->Archives[] = $archives; + + return $this; + } + + /** + * Remove Archives + * + * @param \Entities\Archive $archives + */ + public function removeArchive(\Entities\Archive $archives) + { + $this->Archives->removeElement($archives); + } + + /** + * Get Archives + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getArchives() + { + return $this->Archives; + } +} diff --git a/application/Entities/DomainPreference.php b/application/Entities/DomainPreference.php new file mode 100644 index 0000000..a97006e --- /dev/null +++ b/application/Entities/DomainPreference.php @@ -0,0 +1,195 @@ +attribute = $attribute; + + return $this; + } + + /** + * Get attribute + * + * @return string + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * Set ix + * + * @param integer $ix + * @return DomainPreference + */ + public function setIx($ix) + { + $this->ix = $ix; + + return $this; + } + + /** + * Get ix + * + * @return integer + */ + public function getIx() + { + return $this->ix; + } + + /** + * Set op + * + * @param string $op + * @return DomainPreference + */ + public function setOp($op) + { + $this->op = $op; + + return $this; + } + + /** + * Get op + * + * @return string + */ + public function getOp() + { + return $this->op; + } + + /** + * Set value + * + * @param string $value + * @return DomainPreference + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * Get value + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set expire + * + * @param integer $expire + * @return DomainPreference + */ + public function setExpire($expire) + { + $this->expire = $expire; + + return $this; + } + + /** + * Get expire + * + * @return integer + */ + public function getExpire() + { + return $this->expire; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set Domain + * + * @param \Entities\Domain $domain + * @return DomainPreference + */ + public function setDomain(\Entities\Domain $domain = null) + { + $this->Domain = $domain; + + return $this; + } + + /** + * Get Domain + * + * @return \Entities\Domain + */ + public function getDomain() + { + return $this->Domain; + } +} diff --git a/application/Entities/Log.php b/application/Entities/Log.php new file mode 100644 index 0000000..faaaee3 --- /dev/null +++ b/application/Entities/Log.php @@ -0,0 +1,191 @@ +action = $action; + + return $this; + } + + /** + * Get action + * + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * Set data + * + * @param string $data + * @return Log + */ + public function setData($data) + { + $this->data = $data; + + return $this; + } + + /** + * Get data + * + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Set timestamp + * + * @param \DateTime $timestamp + * @return Log + */ + public function setTimestamp($timestamp) + { + $this->timestamp = $timestamp; + + return $this; + } + + /** + * Get timestamp + * + * @return \DateTime + */ + public function getTimestamp() + { + return $this->timestamp; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set Admin + * + * @param Entities\Admin $admin + * @return Log + */ + public function setAdmin(\Entities\Admin $admin = null) + { + $this->Admin = $admin; + + return $this; + } + + /** + * Get Admin + * + * @return Entities\Admin + */ + public function getAdmin() + { + return $this->Admin; + } + + /** + * Set Domain + * + * @param Entities\Domain $domain + * @return Log + */ + public function setDomain(\Entities\Domain $domain = null) + { + $this->Domain = $domain; + + return $this; + } + + /** + * Get Domain + * + * @return Entities\Domain + */ + public function getDomain() + { + return $this->Domain; + } +} diff --git a/application/Entities/Mailbox.php b/application/Entities/Mailbox.php new file mode 100644 index 0000000..dde9d06 --- /dev/null +++ b/application/Entities/Mailbox.php @@ -0,0 +1,744 @@ +Preferences = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Set username + * + * @param string $username + * @return Mailbox + */ + public function setUsername($username) + { + $this->username = $username; + + return $this; + } + + /** + * Get username + * + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Set password + * + * @param string $password + * @return Mailbox + */ + public function setPassword($password) + { + $this->password = $password; + + return $this; + } + + /** + * Get password + * + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Set name + * + * @param string $name + * @return Mailbox + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * Get name + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set alt_email + * + * @param string $altEmail + * @return Mailbox + */ + public function setAltEmail($altEmail) + { + $this->alt_email = $altEmail; + + return $this; + } + + /** + * Get alt_email + * + * @return string + */ + public function getAltEmail() + { + return $this->alt_email; + } + + /** + * Set quota + * + * @param integer $quota + * @return Mailbox + */ + public function setQuota($quota) + { + $this->quota = $quota; + + return $this; + } + + /** + * Get quota + * + * @return integer + */ + public function getQuota() + { + return $this->quota; + } + + /** + * Set local_part + * + * @param string $localPart + * @return Mailbox + */ + public function setLocalPart($localPart) + { + $this->local_part = $localPart; + + return $this; + } + + /** + * Get local_part + * + * @return string + */ + public function getLocalPart() + { + return $this->local_part; + } + + /** + * Set active + * + * @param boolean $active + * @return Mailbox + */ + public function setActive($active) + { + $this->active = $active; + + return $this; + } + + /** + * Get active + * + * @return boolean + */ + public function getActive() + { + return $this->active; + } + + /** + * Set access_restriction + * + * @param string $accessRestriction + * @return Mailbox + */ + public function setAccessRestriction($accessRestriction) + { + $this->access_restriction = $accessRestriction; + + return $this; + } + + /** + * Get access_restriction + * + * @return string + */ + public function getAccessRestriction() + { + return $this->access_restriction; + } + + /** + * Set homedir + * + * @param string $homedir + * @return Mailbox + */ + public function setHomedir($homedir) + { + $this->homedir = $homedir; + + return $this; + } + + /** + * Get homedir + * + * @return string + */ + public function getHomedir() + { + return $this->homedir; + } + + /** + * Set maildir + * + * @param string $maildir + * @return Mailbox + */ + public function setMaildir($maildir) + { + $this->maildir = $maildir; + + return $this; + } + + /** + * Get maildir + * + * @return string + */ + public function getMaildir() + { + return $this->maildir; + } + + /** + * Get maildir + * + * @return string + */ + public function getCleanedMaildir() + { + return self::cleanMaildir( $this->getMaildir() ); + } + + /** + * Set uid + * + * @param integer $uid + * @return Mailbox + */ + public function setUid($uid) + { + $this->uid = $uid; + + return $this; + } + + /** + * Get uid + * + * @return integer + */ + public function getUid() + { + return $this->uid; + } + + /** + * Set gid + * + * @param integer $gid + * @return Mailbox + */ + public function setGid($gid) + { + $this->gid = $gid; + + return $this; + } + + /** + * Get gid + * + * @return integer + */ + public function getGid() + { + return $this->gid; + } + + /** + * Set created + * + * @param \DateTime $created + * @return Mailbox + */ + public function setCreated($created) + { + $this->created = $created; + + return $this; + } + + /** + * Get created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->created; + } + + /** + * Set modified + * + * @param \DateTime $modified + * @return Mailbox + */ + public function setModified($modified) + { + $this->modified = $modified; + + return $this; + } + + /** + * Get modified + * + * @return \DateTime + */ + public function getModified() + { + return $this->modified; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Add Preferences + * + * @param Entities\MailboxPreference $preferences + * @return Mailbox + */ + public function addPreference(\Entities\MailboxPreference $preferences) + { + $this->Preferences[] = $preferences; + + return $this; + } + + /** + * Remove Preferences + * + * @param Entities\MailboxPreference $preferences + */ + public function removePreference(\Entities\MailboxPreference $preferences) + { + $this->Preferences->removeElement($preferences); + } + + /** + * Get Preferences + * + * @return Doctrine\Common\Collections\Collection + */ + public function getPreferences() + { + return $this->Preferences; + } + + /** + * @var Entities\Domain + */ + private $Domain; + + + /** + * Set Domain + * + * @param Entities\Domain $domain + * @return Mailbox + */ + public function setDomain(\Entities\Domain $domain = null) + { + $this->Domain = $domain; + + return $this; + } + + /** + * Get Domain + * + * @return Entities\Domain + */ + public function getDomain() + { + return $this->Domain; + } + + /** + * Add Preferences + * + * @param Entities\MailboxPreference $preferences + * @return Mailbox + */ + public function addMailboxPreference(\Entities\MailboxPreference $preferences) + { + $this->Preferences[] = $preferences; + return $this; + } + + /** + * Set the maildir + * + * Replaces the following characters in the $maildir parameter: + * + * %u - the local part of the username (email address) + * %d - the domain part of the username (email address) + * %m - the username (email address) + * + * FIXME refactor formatMaildir/Homedir() + * FIXME allow for multiple storage formats including uniform hashing + * + * @param string $maildir The maildir format + * @return string The newly created maildir (also set in the object) + */ + public function formatMaildir( $maildir = '' ) + { + $this->setMaildir( self::substitute( $this->getUsername(), $maildir ) ); + return $this->getMaildir(); + } + + /** + * Set the homedir + * + * Replaces the following characters in the $homedir parameter: + * + * %u - the local part of the username (email address) + * %d - the domain part of the username (email address) + * %m - the username (email address) + * + * FIXME refactor formatMaildir/Homedir() + * FIXME allow for multiple storage formats including uniform hashing + * + * @param string $homedir The homedir format + * @return string The newly created homedir (also set in the object) + */ + public function formatHomedir( $homedir = '' ) + { + $this->setHomedir( self::substitute( $this->getUsername(), $homedir ) ); + return $this->getHomedir(); + } + + /** + * Replaces the following characters in the $str parameter: + * + * %u - the local part of the username (email address) + * %d - the domain part of the username (email address) + * %m - the username (email address) + * + * @param string $email An email address used to extract the domain name + * @param string $str The format string + * @return string The newly created maildir (also set in the object) + */ + public static function substitute( $email, $str ) + { + list( $un, $dn ) = explode( '@', $email ); + + $str = str_replace ( '%u', $un, $str ); + $str = str_replace ( '%d', $dn, $str ); + $str = str_replace ( '%m', $email, $str ); + + return $str; + } + + /** + * Set homedir_size + * + * @param integer $homedirSize + * @return Mailbox + */ + public function setHomedirSize($homedirSize) + { + $this->homedir_size = $homedirSize; + + return $this; + } + + /** + * Get homedir_size + * + * @return integer + */ + public function getHomedirSize() + { + return $this->homedir_size; + } + + /** + * Set maildir_size + * + * @param integer $maildirSize + * @return Mailbox + */ + public function setMaildirSize($maildirSize) + { + $this->maildir_size = $maildirSize; + + return $this; + } + + /** + * Get maildir_size + * + * @return integer + */ + public function getMaildirSize() + { + return $this->maildir_size; + } + + /** + * Set size_at + * + * @param \DateTime $sizeAt + * @return Mailbox + */ + public function setSizeAt($sizeAt) + { + $this->size_at = $sizeAt; + + return $this; + } + + /** + * Get size_at + * + * @return \DateTime + */ + public function getSizeAt() + { + return $this->size_at; + } + + /** + * Clean a maildir string into a standard filesystem path + * + * For example, turns: ''maildir:/srv/vmail/example.com/jbloggs/mail:LAYOUT=fs'' + * into: /srv/vmail/example.com/jbloggs/mail + * + * @param string $maildir The maildir string + * @return string The path from $maildir + */ + public static function cleanMaildir( $maildir ) + { + // typical maildir that needs to be cleaned: + // maildir:/srv/vmail/example.com/jbloggs/mail:LAYOUT=fs + if( substr( $maildir, 0, 8 ) == 'maildir:' ) + $maildir = substr( $maildir, 8 ); + + if( substr( $maildir, strrpos( $maildir, ':' ) + 1, 6 ) == 'LAYOUT' ) + $maildir = substr( $maildir, 0, strrpos( $maildir, ':' ) ); + + return $maildir; + } + /** + * @var \Entities\DirectoryEntry + */ + private $DirectoryEntry; + + + /** + * Set DirectoryEntry + * + * @param \Entities\DirectoryEntry $directoryEntry + * @return Mailbox + */ + public function setDirectoryEntry(\Entities\DirectoryEntry $directoryEntry = null) + { + $this->DirectoryEntry = $directoryEntry; + + return $this; + } + + /** + * Get DirectoryEntry + * + * @return \Entities\DirectoryEntry + */ + public function getDirectoryEntry() + { + return $this->DirectoryEntry; + } + /** + * @var boolean + */ + private $delete_pending; + + + /** + * Set delete_pending + * + * @param boolean $deletePending + * + * @return Mailbox + */ + public function setDeletePending($deletePending) + { + $this->delete_pending = $deletePending; + + return $this; + } + + /** + * Get delete_pending + * + * @return boolean + */ + public function getDeletePending() + { + return $this->delete_pending; + } +} diff --git a/application/Entities/MailboxPreference.php b/application/Entities/MailboxPreference.php new file mode 100644 index 0000000..6e5ab3c --- /dev/null +++ b/application/Entities/MailboxPreference.php @@ -0,0 +1,195 @@ +attribute = $attribute; + + return $this; + } + + /** + * Get attribute + * + * @return string + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * Set ix + * + * @param integer $ix + * @return MailboxPreference + */ + public function setIx($ix) + { + $this->ix = $ix; + + return $this; + } + + /** + * Get ix + * + * @return integer + */ + public function getIx() + { + return $this->ix; + } + + /** + * Set op + * + * @param string $op + * @return MailboxPreference + */ + public function setOp($op) + { + $this->op = $op; + + return $this; + } + + /** + * Get op + * + * @return string + */ + public function getOp() + { + return $this->op; + } + + /** + * Set value + * + * @param string $value + * @return MailboxPreference + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * Get value + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set expire + * + * @param integer $expire + * @return MailboxPreference + */ + public function setExpire($expire) + { + $this->expire = $expire; + + return $this; + } + + /** + * Get expire + * + * @return integer + */ + public function getExpire() + { + return $this->expire; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set Mailbox + * + * @param Entities\Mailbox $mailbox + * @return MailboxPreference + */ + public function setMailbox(\Entities\Mailbox $mailbox = null) + { + $this->Mailbox = $mailbox; + + return $this; + } + + /** + * Get Mailbox + * + * @return Entities\Mailbox + */ + public function getMailbox() + { + return $this->Mailbox; + } +} diff --git a/application/Entities/RememberMe.php b/application/Entities/RememberMe.php new file mode 100644 index 0000000..4da3ca6 --- /dev/null +++ b/application/Entities/RememberMe.php @@ -0,0 +1,224 @@ +userhash = $userhash; + + return $this; + } + + /** + * Get userhash + * + * @return string + */ + public function getUserhash() + { + return $this->userhash; + } + + /** + * Set ckey + * + * @param string $ckey + * @return RememberMe + */ + public function setCkey($ckey) + { + $this->ckey = $ckey; + + return $this; + } + + /** + * Get ckey + * + * @return string + */ + public function getCkey() + { + return $this->ckey; + } + + /** + * Set original_ip + * + * @param string $originalIp + * @return RememberMe + */ + public function setOriginalIp($originalIp) + { + $this->original_ip = $originalIp; + + return $this; + } + + /** + * Get original_ip + * + * @return string + */ + public function getOriginalIp() + { + return $this->original_ip; + } + + /** + * Set expires + * + * @param \DateTime $expires + * @return RememberMe + */ + public function setExpires($expires) + { + $this->expires = $expires; + + return $this; + } + + /** + * Get expires + * + * @return \DateTime + */ + public function getExpires() + { + return $this->expires; + } + + /** + * Set created + * + * @param \DateTime $created + * @return RememberMe + */ + public function setCreated($created) + { + $this->created = $created; + + return $this; + } + + /** + * Get created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->created; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set User + * + * @param \Entities\Admin $user + * @return RememberMe + */ + public function setUser(\Entities\Admin $user = null) + { + $this->User = $user; + + return $this; + } + + /** + * Get User + * + * @return \Entities\Admin + */ + public function getUser() + { + return $this->User; + } + /** + * @var \DateTime + */ + private $last_used; + + + /** + * Set last_used + * + * @param \DateTime $lastUsed + * @return RememberMe + */ + public function setLastUsed($lastUsed) + { + $this->last_used = $lastUsed; + + return $this; + } + + /** + * Get last_used + * + * @return \DateTime + */ + public function getLastUsed() + { + return $this->last_used; + } + +} diff --git a/application/Proxies/__CG__EntitiesAdmin.php b/application/Proxies/__CG__EntitiesAdmin.php new file mode 100644 index 0000000..8825efb --- /dev/null +++ b/application/Proxies/__CG__EntitiesAdmin.php @@ -0,0 +1,708 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'username', 'password', 'super', 'active', 'created', 'modified', 'id', 'Admin', 'Logs', 'Domains', 'Preferences', 'RememberMes', 'Archives', '_className', '_preferenceClassName', '_cache', '_namespace'); + } + + return array('__isInitialized__', 'username', 'password', 'super', 'active', 'created', 'modified', 'id', 'Admin', 'Logs', 'Domains', 'Preferences', 'RememberMes', 'Archives', '_className', '_preferenceClassName', '_cache', '_namespace'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (Admin $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setUsername($username) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUsername', array($username)); + + return parent::setUsername($username); + } + + /** + * {@inheritDoc} + */ + public function getUsername() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getUsername', array()); + + return parent::getUsername(); + } + + /** + * {@inheritDoc} + */ + public function getEmail() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getEmail', array()); + + return parent::getEmail(); + } + + /** + * {@inheritDoc} + */ + public function getFormattedName() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFormattedName', array()); + + return parent::getFormattedName(); + } + + /** + * {@inheritDoc} + */ + public function setPassword($password) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPassword', array($password)); + + return parent::setPassword($password); + } + + /** + * {@inheritDoc} + */ + public function getPassword() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPassword', array()); + + return parent::getPassword(); + } + + /** + * {@inheritDoc} + */ + public function setSuper($super) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setSuper', array($super)); + + return parent::setSuper($super); + } + + /** + * {@inheritDoc} + */ + public function getSuper() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSuper', array()); + + return parent::getSuper(); + } + + /** + * {@inheritDoc} + */ + public function isSuper() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'isSuper', array()); + + return parent::isSuper(); + } + + /** + * {@inheritDoc} + */ + public function setActive($active) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setActive', array($active)); + + return parent::setActive($active); + } + + /** + * {@inheritDoc} + */ + public function getActive() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getActive', array()); + + return parent::getActive(); + } + + /** + * {@inheritDoc} + */ + public function setCreated($created) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreated', array($created)); + + return parent::setCreated($created); + } + + /** + * {@inheritDoc} + */ + public function getCreated() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreated', array()); + + return parent::getCreated(); + } + + /** + * {@inheritDoc} + */ + public function setModified($modified) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setModified', array($modified)); + + return parent::setModified($modified); + } + + /** + * {@inheritDoc} + */ + public function getModified() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getModified', array()); + + return parent::getModified(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function addAdmin(\Entities\AdminPreference $admin) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addAdmin', array($admin)); + + return parent::addAdmin($admin); + } + + /** + * {@inheritDoc} + */ + public function removeAdmin(\Entities\AdminPreference $admin) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeAdmin', array($admin)); + + return parent::removeAdmin($admin); + } + + /** + * {@inheritDoc} + */ + public function getAdmin() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAdmin', array()); + + return parent::getAdmin(); + } + + /** + * {@inheritDoc} + */ + public function addLog(\Entities\Log $logs) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addLog', array($logs)); + + return parent::addLog($logs); + } + + /** + * {@inheritDoc} + */ + public function removeLog(\Entities\Log $logs) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeLog', array($logs)); + + return parent::removeLog($logs); + } + + /** + * {@inheritDoc} + */ + public function getLogs() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getLogs', array()); + + return parent::getLogs(); + } + + /** + * {@inheritDoc} + */ + public function addDomain(\Entities\Domain $domains) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addDomain', array($domains)); + + return parent::addDomain($domains); + } + + /** + * {@inheritDoc} + */ + public function removeDomain(\Entities\Domain $domains) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeDomain', array($domains)); + + return parent::removeDomain($domains); + } + + /** + * {@inheritDoc} + */ + public function getDomains() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDomains', array()); + + return parent::getDomains(); + } + + /** + * {@inheritDoc} + */ + public function addPreference(\Entities\AdminPreference $preferences) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addPreference', array($preferences)); + + return parent::addPreference($preferences); + } + + /** + * {@inheritDoc} + */ + public function removePreference(\Entities\AdminPreference $preferences) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removePreference', array($preferences)); + + return parent::removePreference($preferences); + } + + /** + * {@inheritDoc} + */ + public function getPreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPreferences', array()); + + return parent::getPreferences(); + } + + /** + * {@inheritDoc} + */ + public function canManageDomain($domain) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'canManageDomain', array($domain)); + + return parent::canManageDomain($domain); + } + + /** + * {@inheritDoc} + */ + public function addAdminPreference(\Entities\AdminPreference $preferences) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addAdminPreference', array($preferences)); + + return parent::addAdminPreference($preferences); + } + + /** + * {@inheritDoc} + */ + public function addRememberMe(\Entities\RememberMe $rememberMes) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addRememberMe', array($rememberMes)); + + return parent::addRememberMe($rememberMes); + } + + /** + * {@inheritDoc} + */ + public function removeRememberMe(\Entities\RememberMe $rememberMes) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeRememberMe', array($rememberMes)); + + return parent::removeRememberMe($rememberMes); + } + + /** + * {@inheritDoc} + */ + public function getRememberMes() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getRememberMes', array()); + + return parent::getRememberMes(); + } + + /** + * {@inheritDoc} + */ + public function addArchive(\Entities\Archive $archives) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addArchive', array($archives)); + + return parent::addArchive($archives); + } + + /** + * {@inheritDoc} + */ + public function removeArchive(\Entities\Archive $archives) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeArchive', array($archives)); + + return parent::removeArchive($archives); + } + + /** + * {@inheritDoc} + */ + public function getArchives() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getArchives', array()); + + return parent::getArchives(); + } + + /** + * {@inheritDoc} + */ + public function loadPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'loadPreference', array($attribute, $index, $includeExpired)); + + return parent::loadPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function hasPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'hasPreference', array($attribute, $index, $includeExpired)); + + return parent::hasPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function getPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPreference', array($attribute, $index, $includeExpired)); + + return parent::getPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function setPreference($attribute, $value, $operator = '=', $expires = 0, $index = 0) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPreference', array($attribute, $value, $operator, $expires, $index)); + + return parent::setPreference($attribute, $value, $operator, $expires, $index); + } + + /** + * {@inheritDoc} + */ + public function addIndexedPreference($attribute, $value, $operator = '=', $expires = 0, $max = 0) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addIndexedPreference', array($attribute, $value, $operator, $expires, $max)); + + return parent::addIndexedPreference($attribute, $value, $operator, $expires, $max); + } + + /** + * {@inheritDoc} + */ + public function cleanExpiredPreferences($asOf = NULL, $attribute = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'cleanExpiredPreferences', array($asOf, $attribute)); + + return parent::cleanExpiredPreferences($asOf, $attribute); + } + + /** + * {@inheritDoc} + */ + public function deletePreference($attribute, $index = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'deletePreference', array($attribute, $index)); + + return parent::deletePreference($attribute, $index); + } + + /** + * {@inheritDoc} + */ + public function expungePreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'expungePreferences', array()); + + return parent::expungePreferences(); + } + + /** + * {@inheritDoc} + */ + public function getIndexedPreference($attribute, $withIndex = false, $ignoreExpired = true) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIndexedPreference', array($attribute, $withIndex, $ignoreExpired)); + + return parent::getIndexedPreference($attribute, $withIndex, $ignoreExpired); + } + + /** + * {@inheritDoc} + */ + public function getAssocPreference($attribute, $index = NULL, $ignoreExpired = true) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAssocPreference', array($attribute, $index, $ignoreExpired)); + + return parent::getAssocPreference($attribute, $index, $ignoreExpired); + } + + /** + * {@inheritDoc} + */ + public function deleteAssocPreference($attribute, $index = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'deleteAssocPreference', array($attribute, $index)); + + return parent::deleteAssocPreference($attribute, $index); + } + + /** + * {@inheritDoc} + */ + public function _getPreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, '_getPreferences', array()); + + return parent::_getPreferences(); + } + +} diff --git a/application/Proxies/__CG__EntitiesAdminPreference.php b/application/Proxies/__CG__EntitiesAdminPreference.php new file mode 100644 index 0000000..5f9b16c --- /dev/null +++ b/application/Proxies/__CG__EntitiesAdminPreference.php @@ -0,0 +1,345 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'attribute', 'ix', 'op', 'value', 'expire', 'id', 'Preferences', 'Admin'); + } + + return array('__isInitialized__', 'attribute', 'ix', 'op', 'value', 'expire', 'id', 'Preferences', 'Admin'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (AdminPreference $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setAttribute($attribute) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAttribute', array($attribute)); + + return parent::setAttribute($attribute); + } + + /** + * {@inheritDoc} + */ + public function getAttribute() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAttribute', array()); + + return parent::getAttribute(); + } + + /** + * {@inheritDoc} + */ + public function setIx($ix) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setIx', array($ix)); + + return parent::setIx($ix); + } + + /** + * {@inheritDoc} + */ + public function getIx() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIx', array()); + + return parent::getIx(); + } + + /** + * {@inheritDoc} + */ + public function setOp($op) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setOp', array($op)); + + return parent::setOp($op); + } + + /** + * {@inheritDoc} + */ + public function getOp() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getOp', array()); + + return parent::getOp(); + } + + /** + * {@inheritDoc} + */ + public function setValue($value) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setValue', array($value)); + + return parent::setValue($value); + } + + /** + * {@inheritDoc} + */ + public function getValue() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getValue', array()); + + return parent::getValue(); + } + + /** + * {@inheritDoc} + */ + public function setExpire($expire) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setExpire', array($expire)); + + return parent::setExpire($expire); + } + + /** + * {@inheritDoc} + */ + public function getExpire() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getExpire', array()); + + return parent::getExpire(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function setPreferences(\Entities\Admin $preferences = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPreferences', array($preferences)); + + return parent::setPreferences($preferences); + } + + /** + * {@inheritDoc} + */ + public function getPreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPreferences', array()); + + return parent::getPreferences(); + } + + /** + * {@inheritDoc} + */ + public function setAdmin(\Entities\Admin $admin = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAdmin', array($admin)); + + return parent::setAdmin($admin); + } + + /** + * {@inheritDoc} + */ + public function getAdmin() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAdmin', array()); + + return parent::getAdmin(); + } + +} diff --git a/application/Proxies/__CG__EntitiesAlias.php b/application/Proxies/__CG__EntitiesAlias.php new file mode 100644 index 0000000..20e20b2 --- /dev/null +++ b/application/Proxies/__CG__EntitiesAlias.php @@ -0,0 +1,488 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'address', 'goto', 'active', 'created', 'modified', 'id', 'Domain', 'Preferences', '_className', '_preferenceClassName', '_cache', '_namespace'); + } + + return array('__isInitialized__', 'address', 'goto', 'active', 'created', 'modified', 'id', 'Domain', 'Preferences', '_className', '_preferenceClassName', '_cache', '_namespace'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (Alias $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setAddress($address) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAddress', array($address)); + + return parent::setAddress($address); + } + + /** + * {@inheritDoc} + */ + public function getAddress() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAddress', array()); + + return parent::getAddress(); + } + + /** + * {@inheritDoc} + */ + public function setGoto($goto) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setGoto', array($goto)); + + return parent::setGoto($goto); + } + + /** + * {@inheritDoc} + */ + public function getGoto() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getGoto', array()); + + return parent::getGoto(); + } + + /** + * {@inheritDoc} + */ + public function setActive($active) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setActive', array($active)); + + return parent::setActive($active); + } + + /** + * {@inheritDoc} + */ + public function getActive() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getActive', array()); + + return parent::getActive(); + } + + /** + * {@inheritDoc} + */ + public function setCreated($created) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreated', array($created)); + + return parent::setCreated($created); + } + + /** + * {@inheritDoc} + */ + public function getCreated() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreated', array()); + + return parent::getCreated(); + } + + /** + * {@inheritDoc} + */ + public function setModified($modified) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setModified', array($modified)); + + return parent::setModified($modified); + } + + /** + * {@inheritDoc} + */ + public function getModified() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getModified', array()); + + return parent::getModified(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function setDomain(\Entities\Domain $domain = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDomain', array($domain)); + + return parent::setDomain($domain); + } + + /** + * {@inheritDoc} + */ + public function getDomain() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDomain', array()); + + return parent::getDomain(); + } + + /** + * {@inheritDoc} + */ + public function addPreference(\Entities\AliasPreference $preferences) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addPreference', array($preferences)); + + return parent::addPreference($preferences); + } + + /** + * {@inheritDoc} + */ + public function removePreference(\Entities\AliasPreference $preferences) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removePreference', array($preferences)); + + return parent::removePreference($preferences); + } + + /** + * {@inheritDoc} + */ + public function getPreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPreferences', array()); + + return parent::getPreferences(); + } + + /** + * {@inheritDoc} + */ + public function loadPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'loadPreference', array($attribute, $index, $includeExpired)); + + return parent::loadPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function hasPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'hasPreference', array($attribute, $index, $includeExpired)); + + return parent::hasPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function getPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPreference', array($attribute, $index, $includeExpired)); + + return parent::getPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function setPreference($attribute, $value, $operator = '=', $expires = 0, $index = 0) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPreference', array($attribute, $value, $operator, $expires, $index)); + + return parent::setPreference($attribute, $value, $operator, $expires, $index); + } + + /** + * {@inheritDoc} + */ + public function addIndexedPreference($attribute, $value, $operator = '=', $expires = 0, $max = 0) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addIndexedPreference', array($attribute, $value, $operator, $expires, $max)); + + return parent::addIndexedPreference($attribute, $value, $operator, $expires, $max); + } + + /** + * {@inheritDoc} + */ + public function cleanExpiredPreferences($asOf = NULL, $attribute = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'cleanExpiredPreferences', array($asOf, $attribute)); + + return parent::cleanExpiredPreferences($asOf, $attribute); + } + + /** + * {@inheritDoc} + */ + public function deletePreference($attribute, $index = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'deletePreference', array($attribute, $index)); + + return parent::deletePreference($attribute, $index); + } + + /** + * {@inheritDoc} + */ + public function expungePreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'expungePreferences', array()); + + return parent::expungePreferences(); + } + + /** + * {@inheritDoc} + */ + public function getIndexedPreference($attribute, $withIndex = false, $ignoreExpired = true) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIndexedPreference', array($attribute, $withIndex, $ignoreExpired)); + + return parent::getIndexedPreference($attribute, $withIndex, $ignoreExpired); + } + + /** + * {@inheritDoc} + */ + public function getAssocPreference($attribute, $index = NULL, $ignoreExpired = true) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAssocPreference', array($attribute, $index, $ignoreExpired)); + + return parent::getAssocPreference($attribute, $index, $ignoreExpired); + } + + /** + * {@inheritDoc} + */ + public function deleteAssocPreference($attribute, $index = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'deleteAssocPreference', array($attribute, $index)); + + return parent::deleteAssocPreference($attribute, $index); + } + + /** + * {@inheritDoc} + */ + public function _getPreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, '_getPreferences', array()); + + return parent::_getPreferences(); + } + +} diff --git a/application/Proxies/__CG__EntitiesAliasPreference.php b/application/Proxies/__CG__EntitiesAliasPreference.php new file mode 100644 index 0000000..9ce88f4 --- /dev/null +++ b/application/Proxies/__CG__EntitiesAliasPreference.php @@ -0,0 +1,323 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'attribute', 'ix', 'op', 'value', 'expire', 'id', 'Alias'); + } + + return array('__isInitialized__', 'attribute', 'ix', 'op', 'value', 'expire', 'id', 'Alias'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (AliasPreference $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setAttribute($attribute) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAttribute', array($attribute)); + + return parent::setAttribute($attribute); + } + + /** + * {@inheritDoc} + */ + public function getAttribute() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAttribute', array()); + + return parent::getAttribute(); + } + + /** + * {@inheritDoc} + */ + public function setIx($ix) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setIx', array($ix)); + + return parent::setIx($ix); + } + + /** + * {@inheritDoc} + */ + public function getIx() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIx', array()); + + return parent::getIx(); + } + + /** + * {@inheritDoc} + */ + public function setOp($op) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setOp', array($op)); + + return parent::setOp($op); + } + + /** + * {@inheritDoc} + */ + public function getOp() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getOp', array()); + + return parent::getOp(); + } + + /** + * {@inheritDoc} + */ + public function setValue($value) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setValue', array($value)); + + return parent::setValue($value); + } + + /** + * {@inheritDoc} + */ + public function getValue() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getValue', array()); + + return parent::getValue(); + } + + /** + * {@inheritDoc} + */ + public function setExpire($expire) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setExpire', array($expire)); + + return parent::setExpire($expire); + } + + /** + * {@inheritDoc} + */ + public function getExpire() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getExpire', array()); + + return parent::getExpire(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function setAlias(\Entities\Alias $alias = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAlias', array($alias)); + + return parent::setAlias($alias); + } + + /** + * {@inheritDoc} + */ + public function getAlias() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAlias', array()); + + return parent::getAlias(); + } + +} diff --git a/application/Proxies/__CG__EntitiesArchive.php b/application/Proxies/__CG__EntitiesArchive.php new file mode 100644 index 0000000..101a8cb --- /dev/null +++ b/application/Proxies/__CG__EntitiesArchive.php @@ -0,0 +1,521 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'ARCHIVE_STATUS', 'username', 'status', 'archived_at', 'status_changed_at', 'homedir_server', 'homedir_file', 'homedir_orig_size', 'homedir_size', 'maildir_server', 'maildir_file', 'maildir_orig_size', 'maildir_size', 'data', 'id', 'Domain', 'ArchivedBy'); + } + + return array('__isInitialized__', 'ARCHIVE_STATUS', 'username', 'status', 'archived_at', 'status_changed_at', 'homedir_server', 'homedir_file', 'homedir_orig_size', 'homedir_size', 'maildir_server', 'maildir_file', 'maildir_orig_size', 'maildir_size', 'data', 'id', 'Domain', 'ArchivedBy'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (Archive $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setUsername($username) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUsername', array($username)); + + return parent::setUsername($username); + } + + /** + * {@inheritDoc} + */ + public function getUsername() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getUsername', array()); + + return parent::getUsername(); + } + + /** + * {@inheritDoc} + */ + public function setStatus($status) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setStatus', array($status)); + + return parent::setStatus($status); + } + + /** + * {@inheritDoc} + */ + public function getStatus() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getStatus', array()); + + return parent::getStatus(); + } + + /** + * {@inheritDoc} + */ + public function setArchivedAt($archivedAt) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setArchivedAt', array($archivedAt)); + + return parent::setArchivedAt($archivedAt); + } + + /** + * {@inheritDoc} + */ + public function getArchivedAt() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getArchivedAt', array()); + + return parent::getArchivedAt(); + } + + /** + * {@inheritDoc} + */ + public function setStatusChangedAt($statusChangedAt) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setStatusChangedAt', array($statusChangedAt)); + + return parent::setStatusChangedAt($statusChangedAt); + } + + /** + * {@inheritDoc} + */ + public function getStatusChangedAt() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getStatusChangedAt', array()); + + return parent::getStatusChangedAt(); + } + + /** + * {@inheritDoc} + */ + public function setHomedirServer($homedirServer) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setHomedirServer', array($homedirServer)); + + return parent::setHomedirServer($homedirServer); + } + + /** + * {@inheritDoc} + */ + public function getHomedirServer() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getHomedirServer', array()); + + return parent::getHomedirServer(); + } + + /** + * {@inheritDoc} + */ + public function setHomedirFile($homedirFile) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setHomedirFile', array($homedirFile)); + + return parent::setHomedirFile($homedirFile); + } + + /** + * {@inheritDoc} + */ + public function getHomedirFile() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getHomedirFile', array()); + + return parent::getHomedirFile(); + } + + /** + * {@inheritDoc} + */ + public function setHomedirOrigSize($homedirOrigSize) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setHomedirOrigSize', array($homedirOrigSize)); + + return parent::setHomedirOrigSize($homedirOrigSize); + } + + /** + * {@inheritDoc} + */ + public function getHomedirOrigSize() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getHomedirOrigSize', array()); + + return parent::getHomedirOrigSize(); + } + + /** + * {@inheritDoc} + */ + public function setHomedirSize($homedirSize) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setHomedirSize', array($homedirSize)); + + return parent::setHomedirSize($homedirSize); + } + + /** + * {@inheritDoc} + */ + public function getHomedirSize() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getHomedirSize', array()); + + return parent::getHomedirSize(); + } + + /** + * {@inheritDoc} + */ + public function setMaildirServer($maildirServer) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMaildirServer', array($maildirServer)); + + return parent::setMaildirServer($maildirServer); + } + + /** + * {@inheritDoc} + */ + public function getMaildirServer() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMaildirServer', array()); + + return parent::getMaildirServer(); + } + + /** + * {@inheritDoc} + */ + public function setMaildirFile($maildirFile) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMaildirFile', array($maildirFile)); + + return parent::setMaildirFile($maildirFile); + } + + /** + * {@inheritDoc} + */ + public function getMaildirFile() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMaildirFile', array()); + + return parent::getMaildirFile(); + } + + /** + * {@inheritDoc} + */ + public function setMaildirOrigSize($maildirOrigSize) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMaildirOrigSize', array($maildirOrigSize)); + + return parent::setMaildirOrigSize($maildirOrigSize); + } + + /** + * {@inheritDoc} + */ + public function getMaildirOrigSize() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMaildirOrigSize', array()); + + return parent::getMaildirOrigSize(); + } + + /** + * {@inheritDoc} + */ + public function setMaildirSize($maildirSize) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMaildirSize', array($maildirSize)); + + return parent::setMaildirSize($maildirSize); + } + + /** + * {@inheritDoc} + */ + public function getMaildirSize() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMaildirSize', array()); + + return parent::getMaildirSize(); + } + + /** + * {@inheritDoc} + */ + public function setData($data) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setData', array($data)); + + return parent::setData($data); + } + + /** + * {@inheritDoc} + */ + public function getData() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getData', array()); + + return parent::getData(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function setDomain(\Entities\Domain $domain = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDomain', array($domain)); + + return parent::setDomain($domain); + } + + /** + * {@inheritDoc} + */ + public function getDomain() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDomain', array()); + + return parent::getDomain(); + } + + /** + * {@inheritDoc} + */ + public function setArchivedBy(\Entities\Admin $archivedBy = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setArchivedBy', array($archivedBy)); + + return parent::setArchivedBy($archivedBy); + } + + /** + * {@inheritDoc} + */ + public function getArchivedBy() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getArchivedBy', array()); + + return parent::getArchivedBy(); + } + +} diff --git a/application/Proxies/__CG__EntitiesDatabaseVersion.php b/application/Proxies/__CG__EntitiesDatabaseVersion.php new file mode 100644 index 0000000..808bb9b --- /dev/null +++ b/application/Proxies/__CG__EntitiesDatabaseVersion.php @@ -0,0 +1,257 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'version', 'id', 'name', 'applied_on'); + } + + return array('__isInitialized__', 'version', 'id', 'name', 'applied_on'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (DatabaseVersion $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setVersion($version) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setVersion', array($version)); + + return parent::setVersion($version); + } + + /** + * {@inheritDoc} + */ + public function getVersion() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getVersion', array()); + + return parent::getVersion(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return (int) parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function setName($name) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setName', array($name)); + + return parent::setName($name); + } + + /** + * {@inheritDoc} + */ + public function getName() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getName', array()); + + return parent::getName(); + } + + /** + * {@inheritDoc} + */ + public function setAppliedOn($appliedOn) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAppliedOn', array($appliedOn)); + + return parent::setAppliedOn($appliedOn); + } + + /** + * {@inheritDoc} + */ + public function getAppliedOn() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAppliedOn', array()); + + return parent::getAppliedOn(); + } + +} diff --git a/application/Proxies/__CG__EntitiesDirectoryEntry.php b/application/Proxies/__CG__EntitiesDirectoryEntry.php new file mode 100644 index 0000000..5f9303c --- /dev/null +++ b/application/Proxies/__CG__EntitiesDirectoryEntry.php @@ -0,0 +1,829 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'businessCategory', 'carLicense', 'departmentNumber', 'displayName', 'employeeNumber', 'employeeType', 'homePhone', 'homePostalAddress', 'initials', 'jpegPhoto', 'labeledURI', 'mail', 'manager', 'mobile', 'o', 'pager', 'preferredLanguage', 'roomNumber', 'secretary', 'personalTitle', 'sn', 'ou', 'title', 'facsimileTelephoneNumber', 'givenName', 'telephoneNumber', 'vimb_created', 'vimb_update', 'id', 'Mailbox'); + } + + return array('__isInitialized__', 'businessCategory', 'carLicense', 'departmentNumber', 'displayName', 'employeeNumber', 'employeeType', 'homePhone', 'homePostalAddress', 'initials', 'jpegPhoto', 'labeledURI', 'mail', 'manager', 'mobile', 'o', 'pager', 'preferredLanguage', 'roomNumber', 'secretary', 'personalTitle', 'sn', 'ou', 'title', 'facsimileTelephoneNumber', 'givenName', 'telephoneNumber', 'vimb_created', 'vimb_update', 'id', 'Mailbox'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (DirectoryEntry $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setBusinessCategory($businessCategory) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setBusinessCategory', array($businessCategory)); + + return parent::setBusinessCategory($businessCategory); + } + + /** + * {@inheritDoc} + */ + public function getBusinessCategory() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getBusinessCategory', array()); + + return parent::getBusinessCategory(); + } + + /** + * {@inheritDoc} + */ + public function setCarLicense($carLicense) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCarLicense', array($carLicense)); + + return parent::setCarLicense($carLicense); + } + + /** + * {@inheritDoc} + */ + public function getCarLicense() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCarLicense', array()); + + return parent::getCarLicense(); + } + + /** + * {@inheritDoc} + */ + public function setDepartmentNumber($departmentNumber) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDepartmentNumber', array($departmentNumber)); + + return parent::setDepartmentNumber($departmentNumber); + } + + /** + * {@inheritDoc} + */ + public function getDepartmentNumber() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDepartmentNumber', array()); + + return parent::getDepartmentNumber(); + } + + /** + * {@inheritDoc} + */ + public function setDisplayName($displayName) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDisplayName', array($displayName)); + + return parent::setDisplayName($displayName); + } + + /** + * {@inheritDoc} + */ + public function getDisplayName() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDisplayName', array()); + + return parent::getDisplayName(); + } + + /** + * {@inheritDoc} + */ + public function setEmployeeNumber($employeeNumber) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setEmployeeNumber', array($employeeNumber)); + + return parent::setEmployeeNumber($employeeNumber); + } + + /** + * {@inheritDoc} + */ + public function getEmployeeNumber() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getEmployeeNumber', array()); + + return parent::getEmployeeNumber(); + } + + /** + * {@inheritDoc} + */ + public function setEmployeeType($employeeType) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setEmployeeType', array($employeeType)); + + return parent::setEmployeeType($employeeType); + } + + /** + * {@inheritDoc} + */ + public function getEmployeeType() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getEmployeeType', array()); + + return parent::getEmployeeType(); + } + + /** + * {@inheritDoc} + */ + public function setHomePhone($homePhone) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setHomePhone', array($homePhone)); + + return parent::setHomePhone($homePhone); + } + + /** + * {@inheritDoc} + */ + public function getHomePhone() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getHomePhone', array()); + + return parent::getHomePhone(); + } + + /** + * {@inheritDoc} + */ + public function setHomePostalAddress($homePostalAddress) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setHomePostalAddress', array($homePostalAddress)); + + return parent::setHomePostalAddress($homePostalAddress); + } + + /** + * {@inheritDoc} + */ + public function getHomePostalAddress() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getHomePostalAddress', array()); + + return parent::getHomePostalAddress(); + } + + /** + * {@inheritDoc} + */ + public function setInitials($initials) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setInitials', array($initials)); + + return parent::setInitials($initials); + } + + /** + * {@inheritDoc} + */ + public function getInitials() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getInitials', array()); + + return parent::getInitials(); + } + + /** + * {@inheritDoc} + */ + public function setJpegPhoto($jpegPhoto) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setJpegPhoto', array($jpegPhoto)); + + return parent::setJpegPhoto($jpegPhoto); + } + + /** + * {@inheritDoc} + */ + public function getJpegPhoto() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getJpegPhoto', array()); + + return parent::getJpegPhoto(); + } + + /** + * {@inheritDoc} + */ + public function setLabeledURI($labeledURI) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setLabeledURI', array($labeledURI)); + + return parent::setLabeledURI($labeledURI); + } + + /** + * {@inheritDoc} + */ + public function getLabeledURI() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getLabeledURI', array()); + + return parent::getLabeledURI(); + } + + /** + * {@inheritDoc} + */ + public function setMail($mail) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMail', array($mail)); + + return parent::setMail($mail); + } + + /** + * {@inheritDoc} + */ + public function getMail() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMail', array()); + + return parent::getMail(); + } + + /** + * {@inheritDoc} + */ + public function setManager($manager) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setManager', array($manager)); + + return parent::setManager($manager); + } + + /** + * {@inheritDoc} + */ + public function getManager() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getManager', array()); + + return parent::getManager(); + } + + /** + * {@inheritDoc} + */ + public function setMobile($mobile) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMobile', array($mobile)); + + return parent::setMobile($mobile); + } + + /** + * {@inheritDoc} + */ + public function getMobile() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMobile', array()); + + return parent::getMobile(); + } + + /** + * {@inheritDoc} + */ + public function setO($o) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setO', array($o)); + + return parent::setO($o); + } + + /** + * {@inheritDoc} + */ + public function getO() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getO', array()); + + return parent::getO(); + } + + /** + * {@inheritDoc} + */ + public function setPager($pager) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPager', array($pager)); + + return parent::setPager($pager); + } + + /** + * {@inheritDoc} + */ + public function getPager() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPager', array()); + + return parent::getPager(); + } + + /** + * {@inheritDoc} + */ + public function setPreferredLanguage($preferredLanguage) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPreferredLanguage', array($preferredLanguage)); + + return parent::setPreferredLanguage($preferredLanguage); + } + + /** + * {@inheritDoc} + */ + public function getPreferredLanguage() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPreferredLanguage', array()); + + return parent::getPreferredLanguage(); + } + + /** + * {@inheritDoc} + */ + public function setRoomNumber($roomNumber) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setRoomNumber', array($roomNumber)); + + return parent::setRoomNumber($roomNumber); + } + + /** + * {@inheritDoc} + */ + public function getRoomNumber() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getRoomNumber', array()); + + return parent::getRoomNumber(); + } + + /** + * {@inheritDoc} + */ + public function setSecretary($secretary) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setSecretary', array($secretary)); + + return parent::setSecretary($secretary); + } + + /** + * {@inheritDoc} + */ + public function getSecretary() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSecretary', array()); + + return parent::getSecretary(); + } + + /** + * {@inheritDoc} + */ + public function setPersonalTitle($personalTitle) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPersonalTitle', array($personalTitle)); + + return parent::setPersonalTitle($personalTitle); + } + + /** + * {@inheritDoc} + */ + public function getPersonalTitle() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPersonalTitle', array()); + + return parent::getPersonalTitle(); + } + + /** + * {@inheritDoc} + */ + public function setSn($sn) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setSn', array($sn)); + + return parent::setSn($sn); + } + + /** + * {@inheritDoc} + */ + public function getSn() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSn', array()); + + return parent::getSn(); + } + + /** + * {@inheritDoc} + */ + public function setOu($ou) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setOu', array($ou)); + + return parent::setOu($ou); + } + + /** + * {@inheritDoc} + */ + public function getOu() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getOu', array()); + + return parent::getOu(); + } + + /** + * {@inheritDoc} + */ + public function setTitle($title) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setTitle', array($title)); + + return parent::setTitle($title); + } + + /** + * {@inheritDoc} + */ + public function getTitle() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getTitle', array()); + + return parent::getTitle(); + } + + /** + * {@inheritDoc} + */ + public function setFacsimileTelephoneNumber($facsimileTelephoneNumber) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setFacsimileTelephoneNumber', array($facsimileTelephoneNumber)); + + return parent::setFacsimileTelephoneNumber($facsimileTelephoneNumber); + } + + /** + * {@inheritDoc} + */ + public function getFacsimileTelephoneNumber() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFacsimileTelephoneNumber', array()); + + return parent::getFacsimileTelephoneNumber(); + } + + /** + * {@inheritDoc} + */ + public function setGivenName($givenName) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setGivenName', array($givenName)); + + return parent::setGivenName($givenName); + } + + /** + * {@inheritDoc} + */ + public function getGivenName() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getGivenName', array()); + + return parent::getGivenName(); + } + + /** + * {@inheritDoc} + */ + public function setTelephoneNumber($telephoneNumber) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setTelephoneNumber', array($telephoneNumber)); + + return parent::setTelephoneNumber($telephoneNumber); + } + + /** + * {@inheritDoc} + */ + public function getTelephoneNumber() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getTelephoneNumber', array()); + + return parent::getTelephoneNumber(); + } + + /** + * {@inheritDoc} + */ + public function setVimbCreated($vimbCreated) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setVimbCreated', array($vimbCreated)); + + return parent::setVimbCreated($vimbCreated); + } + + /** + * {@inheritDoc} + */ + public function getVimbCreated() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getVimbCreated', array()); + + return parent::getVimbCreated(); + } + + /** + * {@inheritDoc} + */ + public function setVimbUpdate($vimbUpdate) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setVimbUpdate', array($vimbUpdate)); + + return parent::setVimbUpdate($vimbUpdate); + } + + /** + * {@inheritDoc} + */ + public function getVimbUpdate() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getVimbUpdate', array()); + + return parent::getVimbUpdate(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function setMailbox(\Entities\Mailbox $mailbox) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMailbox', array($mailbox)); + + return parent::setMailbox($mailbox); + } + + /** + * {@inheritDoc} + */ + public function getMailbox() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMailbox', array()); + + return parent::getMailbox(); + } + +} diff --git a/application/Proxies/__CG__EntitiesDomain.php b/application/Proxies/__CG__EntitiesDomain.php new file mode 100644 index 0000000..2f7dbb3 --- /dev/null +++ b/application/Proxies/__CG__EntitiesDomain.php @@ -0,0 +1,983 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'domain', 'description', 'quota', 'transport', 'backupmx', 'active', 'homedir', 'maildir', 'uid', 'gid', 'created', 'modified', 'id', 'max_quota', 'max_aliases', 'max_mailboxes', 'alias_count', 'mailbox_count', 'Mailboxes', 'Aliases', 'Logs', 'Admins', 'Preferences', 'Archives', '_className', '_preferenceClassName', '_cache', '_namespace'); + } + + return array('__isInitialized__', 'domain', 'description', 'quota', 'transport', 'backupmx', 'active', 'homedir', 'maildir', 'uid', 'gid', 'created', 'modified', 'id', 'max_quota', 'max_aliases', 'max_mailboxes', 'alias_count', 'mailbox_count', 'Mailboxes', 'Aliases', 'Logs', 'Admins', 'Preferences', 'Archives', '_className', '_preferenceClassName', '_cache', '_namespace'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (Domain $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setDomain($domain) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDomain', array($domain)); + + return parent::setDomain($domain); + } + + /** + * {@inheritDoc} + */ + public function getDomain() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDomain', array()); + + return parent::getDomain(); + } + + /** + * {@inheritDoc} + */ + public function setDescription($description) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDescription', array($description)); + + return parent::setDescription($description); + } + + /** + * {@inheritDoc} + */ + public function getDescription() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDescription', array()); + + return parent::getDescription(); + } + + /** + * {@inheritDoc} + */ + public function getAliases() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAliases', array()); + + return parent::getAliases(); + } + + /** + * {@inheritDoc} + */ + public function getMailboxes() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMailboxes', array()); + + return parent::getMailboxes(); + } + + /** + * {@inheritDoc} + */ + public function setQuota($quota) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setQuota', array($quota)); + + return parent::setQuota($quota); + } + + /** + * {@inheritDoc} + */ + public function getQuota() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getQuota', array()); + + return parent::getQuota(); + } + + /** + * {@inheritDoc} + */ + public function setTransport($transport) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setTransport', array($transport)); + + return parent::setTransport($transport); + } + + /** + * {@inheritDoc} + */ + public function getTransport() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getTransport', array()); + + return parent::getTransport(); + } + + /** + * {@inheritDoc} + */ + public function setBackupmx($backupmx) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setBackupmx', array($backupmx)); + + return parent::setBackupmx($backupmx); + } + + /** + * {@inheritDoc} + */ + public function getBackupmx() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getBackupmx', array()); + + return parent::getBackupmx(); + } + + /** + * {@inheritDoc} + */ + public function setActive($active) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setActive', array($active)); + + return parent::setActive($active); + } + + /** + * {@inheritDoc} + */ + public function getActive() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getActive', array()); + + return parent::getActive(); + } + + /** + * {@inheritDoc} + */ + public function setHomedir($homedir) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setHomedir', array($homedir)); + + return parent::setHomedir($homedir); + } + + /** + * {@inheritDoc} + */ + public function getHomedir() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getHomedir', array()); + + return parent::getHomedir(); + } + + /** + * {@inheritDoc} + */ + public function setMaildir($maildir) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMaildir', array($maildir)); + + return parent::setMaildir($maildir); + } + + /** + * {@inheritDoc} + */ + public function getMaildir() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMaildir', array()); + + return parent::getMaildir(); + } + + /** + * {@inheritDoc} + */ + public function setUid($uid) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUid', array($uid)); + + return parent::setUid($uid); + } + + /** + * {@inheritDoc} + */ + public function getUid() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getUid', array()); + + return parent::getUid(); + } + + /** + * {@inheritDoc} + */ + public function setGid($gid) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setGid', array($gid)); + + return parent::setGid($gid); + } + + /** + * {@inheritDoc} + */ + public function getGid() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getGid', array()); + + return parent::getGid(); + } + + /** + * {@inheritDoc} + */ + public function setCreated($created) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreated', array($created)); + + return parent::setCreated($created); + } + + /** + * {@inheritDoc} + */ + public function getCreated() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreated', array()); + + return parent::getCreated(); + } + + /** + * {@inheritDoc} + */ + public function setModified($modified) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setModified', array($modified)); + + return parent::setModified($modified); + } + + /** + * {@inheritDoc} + */ + public function getModified() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getModified', array()); + + return parent::getModified(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function addMailbox(\Entities\Mailbox $mailboxes) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addMailbox', array($mailboxes)); + + return parent::addMailbox($mailboxes); + } + + /** + * {@inheritDoc} + */ + public function removeMailbox(\Entities\Mailbox $mailboxes) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeMailbox', array($mailboxes)); + + return parent::removeMailbox($mailboxes); + } + + /** + * {@inheritDoc} + */ + public function addAlias(\Entities\Alias $aliases) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addAlias', array($aliases)); + + return parent::addAlias($aliases); + } + + /** + * {@inheritDoc} + */ + public function removeAlias(\Entities\Alias $aliases) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeAlias', array($aliases)); + + return parent::removeAlias($aliases); + } + + /** + * {@inheritDoc} + */ + public function addLog(\Entities\Log $logs) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addLog', array($logs)); + + return parent::addLog($logs); + } + + /** + * {@inheritDoc} + */ + public function removeLog(\Entities\Log $logs) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeLog', array($logs)); + + return parent::removeLog($logs); + } + + /** + * {@inheritDoc} + */ + public function getLogs() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getLogs', array()); + + return parent::getLogs(); + } + + /** + * {@inheritDoc} + */ + public function addAdmin(\Entities\Admin $admins) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addAdmin', array($admins)); + + return parent::addAdmin($admins); + } + + /** + * {@inheritDoc} + */ + public function removeAdmin(\Entities\Admin $admins) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeAdmin', array($admins)); + + return parent::removeAdmin($admins); + } + + /** + * {@inheritDoc} + */ + public function getAdmins() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAdmins', array()); + + return parent::getAdmins(); + } + + /** + * {@inheritDoc} + */ + public function setMaxAliases($maxAliases) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMaxAliases', array($maxAliases)); + + return parent::setMaxAliases($maxAliases); + } + + /** + * {@inheritDoc} + */ + public function getMaxAliases() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMaxAliases', array()); + + return parent::getMaxAliases(); + } + + /** + * {@inheritDoc} + */ + public function setMaxMailboxes($maxMailboxes) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMaxMailboxes', array($maxMailboxes)); + + return parent::setMaxMailboxes($maxMailboxes); + } + + /** + * {@inheritDoc} + */ + public function getMaxMailboxes() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMaxMailboxes', array()); + + return parent::getMaxMailboxes(); + } + + /** + * {@inheritDoc} + */ + public function setMaxQuota($maxQuota) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMaxQuota', array($maxQuota)); + + return parent::setMaxQuota($maxQuota); + } + + /** + * {@inheritDoc} + */ + public function getMaxQuota() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMaxQuota', array()); + + return parent::getMaxQuota(); + } + + /** + * {@inheritDoc} + */ + public function setAliasCount($aliasCount) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAliasCount', array($aliasCount)); + + return parent::setAliasCount($aliasCount); + } + + /** + * {@inheritDoc} + */ + public function getAliasCount() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAliasCount', array()); + + return parent::getAliasCount(); + } + + /** + * {@inheritDoc} + */ + public function increaseAliasCount() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'increaseAliasCount', array()); + + return parent::increaseAliasCount(); + } + + /** + * {@inheritDoc} + */ + public function decreaseAliasCount() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'decreaseAliasCount', array()); + + return parent::decreaseAliasCount(); + } + + /** + * {@inheritDoc} + */ + public function setMailboxCount($mailboxCount) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMailboxCount', array($mailboxCount)); + + return parent::setMailboxCount($mailboxCount); + } + + /** + * {@inheritDoc} + */ + public function getMailboxCount() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMailboxCount', array()); + + return parent::getMailboxCount(); + } + + /** + * {@inheritDoc} + */ + public function increaseMailboxCount() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'increaseMailboxCount', array()); + + return parent::increaseMailboxCount(); + } + + /** + * {@inheritDoc} + */ + public function decreaseMailboxCount() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'decreaseMailboxCount', array()); + + return parent::decreaseMailboxCount(); + } + + /** + * {@inheritDoc} + */ + public function addMailboxe(\Entities\Mailbox $mailboxes) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addMailboxe', array($mailboxes)); + + return parent::addMailboxe($mailboxes); + } + + /** + * {@inheritDoc} + */ + public function removeMailboxe(\Entities\Mailbox $mailboxes) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeMailboxe', array($mailboxes)); + + return parent::removeMailboxe($mailboxes); + } + + /** + * {@inheritDoc} + */ + public function addAliase(\Entities\Alias $aliases) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addAliase', array($aliases)); + + return parent::addAliase($aliases); + } + + /** + * {@inheritDoc} + */ + public function removeAliase(\Entities\Alias $aliases) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeAliase', array($aliases)); + + return parent::removeAliase($aliases); + } + + /** + * {@inheritDoc} + */ + public function addPreference(\Entities\DomainPreference $preferences) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addPreference', array($preferences)); + + return parent::addPreference($preferences); + } + + /** + * {@inheritDoc} + */ + public function removePreference(\Entities\DomainPreference $preferences) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removePreference', array($preferences)); + + return parent::removePreference($preferences); + } + + /** + * {@inheritDoc} + */ + public function getPreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPreferences', array()); + + return parent::getPreferences(); + } + + /** + * {@inheritDoc} + */ + public function addArchive(\Entities\Archive $archives) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addArchive', array($archives)); + + return parent::addArchive($archives); + } + + /** + * {@inheritDoc} + */ + public function removeArchive(\Entities\Archive $archives) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeArchive', array($archives)); + + return parent::removeArchive($archives); + } + + /** + * {@inheritDoc} + */ + public function getArchives() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getArchives', array()); + + return parent::getArchives(); + } + + /** + * {@inheritDoc} + */ + public function loadPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'loadPreference', array($attribute, $index, $includeExpired)); + + return parent::loadPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function hasPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'hasPreference', array($attribute, $index, $includeExpired)); + + return parent::hasPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function getPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPreference', array($attribute, $index, $includeExpired)); + + return parent::getPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function setPreference($attribute, $value, $operator = '=', $expires = 0, $index = 0) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPreference', array($attribute, $value, $operator, $expires, $index)); + + return parent::setPreference($attribute, $value, $operator, $expires, $index); + } + + /** + * {@inheritDoc} + */ + public function addIndexedPreference($attribute, $value, $operator = '=', $expires = 0, $max = 0) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addIndexedPreference', array($attribute, $value, $operator, $expires, $max)); + + return parent::addIndexedPreference($attribute, $value, $operator, $expires, $max); + } + + /** + * {@inheritDoc} + */ + public function cleanExpiredPreferences($asOf = NULL, $attribute = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'cleanExpiredPreferences', array($asOf, $attribute)); + + return parent::cleanExpiredPreferences($asOf, $attribute); + } + + /** + * {@inheritDoc} + */ + public function deletePreference($attribute, $index = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'deletePreference', array($attribute, $index)); + + return parent::deletePreference($attribute, $index); + } + + /** + * {@inheritDoc} + */ + public function expungePreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'expungePreferences', array()); + + return parent::expungePreferences(); + } + + /** + * {@inheritDoc} + */ + public function getIndexedPreference($attribute, $withIndex = false, $ignoreExpired = true) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIndexedPreference', array($attribute, $withIndex, $ignoreExpired)); + + return parent::getIndexedPreference($attribute, $withIndex, $ignoreExpired); + } + + /** + * {@inheritDoc} + */ + public function getAssocPreference($attribute, $index = NULL, $ignoreExpired = true) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAssocPreference', array($attribute, $index, $ignoreExpired)); + + return parent::getAssocPreference($attribute, $index, $ignoreExpired); + } + + /** + * {@inheritDoc} + */ + public function deleteAssocPreference($attribute, $index = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'deleteAssocPreference', array($attribute, $index)); + + return parent::deleteAssocPreference($attribute, $index); + } + + /** + * {@inheritDoc} + */ + public function _getPreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, '_getPreferences', array()); + + return parent::_getPreferences(); + } + +} diff --git a/application/Proxies/__CG__EntitiesDomainPreference.php b/application/Proxies/__CG__EntitiesDomainPreference.php new file mode 100644 index 0000000..3c51f3f --- /dev/null +++ b/application/Proxies/__CG__EntitiesDomainPreference.php @@ -0,0 +1,323 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'attribute', 'ix', 'op', 'value', 'expire', 'id', 'Domain'); + } + + return array('__isInitialized__', 'attribute', 'ix', 'op', 'value', 'expire', 'id', 'Domain'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (DomainPreference $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setAttribute($attribute) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAttribute', array($attribute)); + + return parent::setAttribute($attribute); + } + + /** + * {@inheritDoc} + */ + public function getAttribute() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAttribute', array()); + + return parent::getAttribute(); + } + + /** + * {@inheritDoc} + */ + public function setIx($ix) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setIx', array($ix)); + + return parent::setIx($ix); + } + + /** + * {@inheritDoc} + */ + public function getIx() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIx', array()); + + return parent::getIx(); + } + + /** + * {@inheritDoc} + */ + public function setOp($op) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setOp', array($op)); + + return parent::setOp($op); + } + + /** + * {@inheritDoc} + */ + public function getOp() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getOp', array()); + + return parent::getOp(); + } + + /** + * {@inheritDoc} + */ + public function setValue($value) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setValue', array($value)); + + return parent::setValue($value); + } + + /** + * {@inheritDoc} + */ + public function getValue() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getValue', array()); + + return parent::getValue(); + } + + /** + * {@inheritDoc} + */ + public function setExpire($expire) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setExpire', array($expire)); + + return parent::setExpire($expire); + } + + /** + * {@inheritDoc} + */ + public function getExpire() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getExpire', array()); + + return parent::getExpire(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function setDomain(\Entities\Domain $domain = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDomain', array($domain)); + + return parent::setDomain($domain); + } + + /** + * {@inheritDoc} + */ + public function getDomain() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDomain', array()); + + return parent::getDomain(); + } + +} diff --git a/application/Proxies/__CG__EntitiesLog.php b/application/Proxies/__CG__EntitiesLog.php new file mode 100644 index 0000000..0307617 --- /dev/null +++ b/application/Proxies/__CG__EntitiesLog.php @@ -0,0 +1,301 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'action', 'data', 'timestamp', 'id', 'Admin', 'Domain'); + } + + return array('__isInitialized__', 'action', 'data', 'timestamp', 'id', 'Admin', 'Domain'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (Log $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setAction($action) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAction', array($action)); + + return parent::setAction($action); + } + + /** + * {@inheritDoc} + */ + public function getAction() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAction', array()); + + return parent::getAction(); + } + + /** + * {@inheritDoc} + */ + public function setData($data) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setData', array($data)); + + return parent::setData($data); + } + + /** + * {@inheritDoc} + */ + public function getData() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getData', array()); + + return parent::getData(); + } + + /** + * {@inheritDoc} + */ + public function setTimestamp($timestamp) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setTimestamp', array($timestamp)); + + return parent::setTimestamp($timestamp); + } + + /** + * {@inheritDoc} + */ + public function getTimestamp() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getTimestamp', array()); + + return parent::getTimestamp(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function setAdmin(\Entities\Admin $admin = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAdmin', array($admin)); + + return parent::setAdmin($admin); + } + + /** + * {@inheritDoc} + */ + public function getAdmin() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAdmin', array()); + + return parent::getAdmin(); + } + + /** + * {@inheritDoc} + */ + public function setDomain(\Entities\Domain $domain = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDomain', array($domain)); + + return parent::setDomain($domain); + } + + /** + * {@inheritDoc} + */ + public function getDomain() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDomain', array()); + + return parent::getDomain(); + } + +} diff --git a/application/Proxies/__CG__EntitiesMailbox.php b/application/Proxies/__CG__EntitiesMailbox.php new file mode 100644 index 0000000..65579a0 --- /dev/null +++ b/application/Proxies/__CG__EntitiesMailbox.php @@ -0,0 +1,840 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'username', 'password', 'name', 'alt_email', 'quota', 'local_part', 'active', 'access_restriction', 'homedir', 'maildir', 'uid', 'gid', 'created', 'modified', 'id', 'Preferences', 'homedir_size', 'maildir_size', 'size_at', 'Domain', 'DirectoryEntry', 'delete_pending', '_className', '_preferenceClassName', '_cache', '_namespace'); + } + + return array('__isInitialized__', 'username', 'password', 'name', 'alt_email', 'quota', 'local_part', 'active', 'access_restriction', 'homedir', 'maildir', 'uid', 'gid', 'created', 'modified', 'id', 'Preferences', 'homedir_size', 'maildir_size', 'size_at', 'Domain', 'DirectoryEntry', 'delete_pending', '_className', '_preferenceClassName', '_cache', '_namespace'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (Mailbox $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setUsername($username) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUsername', array($username)); + + return parent::setUsername($username); + } + + /** + * {@inheritDoc} + */ + public function getUsername() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getUsername', array()); + + return parent::getUsername(); + } + + /** + * {@inheritDoc} + */ + public function setPassword($password) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPassword', array($password)); + + return parent::setPassword($password); + } + + /** + * {@inheritDoc} + */ + public function getPassword() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPassword', array()); + + return parent::getPassword(); + } + + /** + * {@inheritDoc} + */ + public function setName($name) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setName', array($name)); + + return parent::setName($name); + } + + /** + * {@inheritDoc} + */ + public function getName() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getName', array()); + + return parent::getName(); + } + + /** + * {@inheritDoc} + */ + public function setAltEmail($altEmail) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAltEmail', array($altEmail)); + + return parent::setAltEmail($altEmail); + } + + /** + * {@inheritDoc} + */ + public function getAltEmail() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAltEmail', array()); + + return parent::getAltEmail(); + } + + /** + * {@inheritDoc} + */ + public function setQuota($quota) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setQuota', array($quota)); + + return parent::setQuota($quota); + } + + /** + * {@inheritDoc} + */ + public function getQuota() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getQuota', array()); + + return parent::getQuota(); + } + + /** + * {@inheritDoc} + */ + public function setLocalPart($localPart) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setLocalPart', array($localPart)); + + return parent::setLocalPart($localPart); + } + + /** + * {@inheritDoc} + */ + public function getLocalPart() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getLocalPart', array()); + + return parent::getLocalPart(); + } + + /** + * {@inheritDoc} + */ + public function setActive($active) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setActive', array($active)); + + return parent::setActive($active); + } + + /** + * {@inheritDoc} + */ + public function getActive() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getActive', array()); + + return parent::getActive(); + } + + /** + * {@inheritDoc} + */ + public function setAccessRestriction($accessRestriction) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAccessRestriction', array($accessRestriction)); + + return parent::setAccessRestriction($accessRestriction); + } + + /** + * {@inheritDoc} + */ + public function getAccessRestriction() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAccessRestriction', array()); + + return parent::getAccessRestriction(); + } + + /** + * {@inheritDoc} + */ + public function setHomedir($homedir) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setHomedir', array($homedir)); + + return parent::setHomedir($homedir); + } + + /** + * {@inheritDoc} + */ + public function getHomedir() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getHomedir', array()); + + return parent::getHomedir(); + } + + /** + * {@inheritDoc} + */ + public function setMaildir($maildir) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMaildir', array($maildir)); + + return parent::setMaildir($maildir); + } + + /** + * {@inheritDoc} + */ + public function getMaildir() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMaildir', array()); + + return parent::getMaildir(); + } + + /** + * {@inheritDoc} + */ + public function getCleanedMaildir() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCleanedMaildir', array()); + + return parent::getCleanedMaildir(); + } + + /** + * {@inheritDoc} + */ + public function setUid($uid) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUid', array($uid)); + + return parent::setUid($uid); + } + + /** + * {@inheritDoc} + */ + public function getUid() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getUid', array()); + + return parent::getUid(); + } + + /** + * {@inheritDoc} + */ + public function setGid($gid) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setGid', array($gid)); + + return parent::setGid($gid); + } + + /** + * {@inheritDoc} + */ + public function getGid() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getGid', array()); + + return parent::getGid(); + } + + /** + * {@inheritDoc} + */ + public function setCreated($created) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreated', array($created)); + + return parent::setCreated($created); + } + + /** + * {@inheritDoc} + */ + public function getCreated() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreated', array()); + + return parent::getCreated(); + } + + /** + * {@inheritDoc} + */ + public function setModified($modified) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setModified', array($modified)); + + return parent::setModified($modified); + } + + /** + * {@inheritDoc} + */ + public function getModified() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getModified', array()); + + return parent::getModified(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function addPreference(\Entities\MailboxPreference $preferences) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addPreference', array($preferences)); + + return parent::addPreference($preferences); + } + + /** + * {@inheritDoc} + */ + public function removePreference(\Entities\MailboxPreference $preferences) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'removePreference', array($preferences)); + + return parent::removePreference($preferences); + } + + /** + * {@inheritDoc} + */ + public function getPreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPreferences', array()); + + return parent::getPreferences(); + } + + /** + * {@inheritDoc} + */ + public function setDomain(\Entities\Domain $domain = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDomain', array($domain)); + + return parent::setDomain($domain); + } + + /** + * {@inheritDoc} + */ + public function getDomain() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDomain', array()); + + return parent::getDomain(); + } + + /** + * {@inheritDoc} + */ + public function addMailboxPreference(\Entities\MailboxPreference $preferences) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addMailboxPreference', array($preferences)); + + return parent::addMailboxPreference($preferences); + } + + /** + * {@inheritDoc} + */ + public function formatMaildir($maildir = '') + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'formatMaildir', array($maildir)); + + return parent::formatMaildir($maildir); + } + + /** + * {@inheritDoc} + */ + public function formatHomedir($homedir = '') + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'formatHomedir', array($homedir)); + + return parent::formatHomedir($homedir); + } + + /** + * {@inheritDoc} + */ + public function setHomedirSize($homedirSize) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setHomedirSize', array($homedirSize)); + + return parent::setHomedirSize($homedirSize); + } + + /** + * {@inheritDoc} + */ + public function getHomedirSize() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getHomedirSize', array()); + + return parent::getHomedirSize(); + } + + /** + * {@inheritDoc} + */ + public function setMaildirSize($maildirSize) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMaildirSize', array($maildirSize)); + + return parent::setMaildirSize($maildirSize); + } + + /** + * {@inheritDoc} + */ + public function getMaildirSize() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMaildirSize', array()); + + return parent::getMaildirSize(); + } + + /** + * {@inheritDoc} + */ + public function setSizeAt($sizeAt) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setSizeAt', array($sizeAt)); + + return parent::setSizeAt($sizeAt); + } + + /** + * {@inheritDoc} + */ + public function getSizeAt() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSizeAt', array()); + + return parent::getSizeAt(); + } + + /** + * {@inheritDoc} + */ + public function setDirectoryEntry(\Entities\DirectoryEntry $directoryEntry = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDirectoryEntry', array($directoryEntry)); + + return parent::setDirectoryEntry($directoryEntry); + } + + /** + * {@inheritDoc} + */ + public function getDirectoryEntry() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDirectoryEntry', array()); + + return parent::getDirectoryEntry(); + } + + /** + * {@inheritDoc} + */ + public function setDeletePending($deletePending) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDeletePending', array($deletePending)); + + return parent::setDeletePending($deletePending); + } + + /** + * {@inheritDoc} + */ + public function getDeletePending() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDeletePending', array()); + + return parent::getDeletePending(); + } + + /** + * {@inheritDoc} + */ + public function loadPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'loadPreference', array($attribute, $index, $includeExpired)); + + return parent::loadPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function hasPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'hasPreference', array($attribute, $index, $includeExpired)); + + return parent::hasPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function getPreference($attribute, $index = 0, $includeExpired = false) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPreference', array($attribute, $index, $includeExpired)); + + return parent::getPreference($attribute, $index, $includeExpired); + } + + /** + * {@inheritDoc} + */ + public function setPreference($attribute, $value, $operator = '=', $expires = 0, $index = 0) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPreference', array($attribute, $value, $operator, $expires, $index)); + + return parent::setPreference($attribute, $value, $operator, $expires, $index); + } + + /** + * {@inheritDoc} + */ + public function addIndexedPreference($attribute, $value, $operator = '=', $expires = 0, $max = 0) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'addIndexedPreference', array($attribute, $value, $operator, $expires, $max)); + + return parent::addIndexedPreference($attribute, $value, $operator, $expires, $max); + } + + /** + * {@inheritDoc} + */ + public function cleanExpiredPreferences($asOf = NULL, $attribute = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'cleanExpiredPreferences', array($asOf, $attribute)); + + return parent::cleanExpiredPreferences($asOf, $attribute); + } + + /** + * {@inheritDoc} + */ + public function deletePreference($attribute, $index = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'deletePreference', array($attribute, $index)); + + return parent::deletePreference($attribute, $index); + } + + /** + * {@inheritDoc} + */ + public function expungePreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'expungePreferences', array()); + + return parent::expungePreferences(); + } + + /** + * {@inheritDoc} + */ + public function getIndexedPreference($attribute, $withIndex = false, $ignoreExpired = true) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIndexedPreference', array($attribute, $withIndex, $ignoreExpired)); + + return parent::getIndexedPreference($attribute, $withIndex, $ignoreExpired); + } + + /** + * {@inheritDoc} + */ + public function getAssocPreference($attribute, $index = NULL, $ignoreExpired = true) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAssocPreference', array($attribute, $index, $ignoreExpired)); + + return parent::getAssocPreference($attribute, $index, $ignoreExpired); + } + + /** + * {@inheritDoc} + */ + public function deleteAssocPreference($attribute, $index = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'deleteAssocPreference', array($attribute, $index)); + + return parent::deleteAssocPreference($attribute, $index); + } + + /** + * {@inheritDoc} + */ + public function _getPreferences() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, '_getPreferences', array()); + + return parent::_getPreferences(); + } + +} diff --git a/application/Proxies/__CG__EntitiesMailboxPreference.php b/application/Proxies/__CG__EntitiesMailboxPreference.php new file mode 100644 index 0000000..a4b698b --- /dev/null +++ b/application/Proxies/__CG__EntitiesMailboxPreference.php @@ -0,0 +1,323 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'attribute', 'ix', 'op', 'value', 'expire', 'id', 'Mailbox'); + } + + return array('__isInitialized__', 'attribute', 'ix', 'op', 'value', 'expire', 'id', 'Mailbox'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (MailboxPreference $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setAttribute($attribute) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAttribute', array($attribute)); + + return parent::setAttribute($attribute); + } + + /** + * {@inheritDoc} + */ + public function getAttribute() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAttribute', array()); + + return parent::getAttribute(); + } + + /** + * {@inheritDoc} + */ + public function setIx($ix) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setIx', array($ix)); + + return parent::setIx($ix); + } + + /** + * {@inheritDoc} + */ + public function getIx() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIx', array()); + + return parent::getIx(); + } + + /** + * {@inheritDoc} + */ + public function setOp($op) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setOp', array($op)); + + return parent::setOp($op); + } + + /** + * {@inheritDoc} + */ + public function getOp() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getOp', array()); + + return parent::getOp(); + } + + /** + * {@inheritDoc} + */ + public function setValue($value) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setValue', array($value)); + + return parent::setValue($value); + } + + /** + * {@inheritDoc} + */ + public function getValue() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getValue', array()); + + return parent::getValue(); + } + + /** + * {@inheritDoc} + */ + public function setExpire($expire) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setExpire', array($expire)); + + return parent::setExpire($expire); + } + + /** + * {@inheritDoc} + */ + public function getExpire() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getExpire', array()); + + return parent::getExpire(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function setMailbox(\Entities\Mailbox $mailbox = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setMailbox', array($mailbox)); + + return parent::setMailbox($mailbox); + } + + /** + * {@inheritDoc} + */ + public function getMailbox() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMailbox', array()); + + return parent::getMailbox(); + } + +} diff --git a/application/Proxies/__CG__EntitiesRememberMe.php b/application/Proxies/__CG__EntitiesRememberMe.php new file mode 100644 index 0000000..ee42b4d --- /dev/null +++ b/application/Proxies/__CG__EntitiesRememberMe.php @@ -0,0 +1,345 @@ +__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } + + + + + + + + /** + * + * @return array + */ + public function __sleep() + { + if ($this->__isInitialized__) { + return array('__isInitialized__', 'userhash', 'ckey', 'original_ip', 'expires', 'created', 'id', 'User', 'last_used'); + } + + return array('__isInitialized__', 'userhash', 'ckey', 'original_ip', 'expires', 'created', 'id', 'User', 'last_used'); + } + + /** + * + */ + public function __wakeup() + { + if ( ! $this->__isInitialized__) { + $this->__initializer__ = function (RememberMe $proxy) { + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + $existingProperties = get_object_vars($proxy); + + foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { + if ( ! array_key_exists($property, $existingProperties)) { + $proxy->$property = $defaultValue; + } + } + }; + + } + } + + /** + * + */ + public function __clone() + { + $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); + } + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + + /** + * {@inheritDoc} + */ + public function setUserhash($userhash) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUserhash', array($userhash)); + + return parent::setUserhash($userhash); + } + + /** + * {@inheritDoc} + */ + public function getUserhash() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getUserhash', array()); + + return parent::getUserhash(); + } + + /** + * {@inheritDoc} + */ + public function setCkey($ckey) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCkey', array($ckey)); + + return parent::setCkey($ckey); + } + + /** + * {@inheritDoc} + */ + public function getCkey() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCkey', array()); + + return parent::getCkey(); + } + + /** + * {@inheritDoc} + */ + public function setOriginalIp($originalIp) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setOriginalIp', array($originalIp)); + + return parent::setOriginalIp($originalIp); + } + + /** + * {@inheritDoc} + */ + public function getOriginalIp() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getOriginalIp', array()); + + return parent::getOriginalIp(); + } + + /** + * {@inheritDoc} + */ + public function setExpires($expires) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setExpires', array($expires)); + + return parent::setExpires($expires); + } + + /** + * {@inheritDoc} + */ + public function getExpires() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getExpires', array()); + + return parent::getExpires(); + } + + /** + * {@inheritDoc} + */ + public function setCreated($created) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreated', array($created)); + + return parent::setCreated($created); + } + + /** + * {@inheritDoc} + */ + public function getCreated() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreated', array()); + + return parent::getCreated(); + } + + /** + * {@inheritDoc} + */ + public function getId() + { + if ($this->__isInitialized__ === false) { + return parent::getId(); + } + + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); + + return parent::getId(); + } + + /** + * {@inheritDoc} + */ + public function setUser(\Entities\Admin $user = NULL) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUser', array($user)); + + return parent::setUser($user); + } + + /** + * {@inheritDoc} + */ + public function getUser() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getUser', array()); + + return parent::getUser(); + } + + /** + * {@inheritDoc} + */ + public function setLastUsed($lastUsed) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setLastUsed', array($lastUsed)); + + return parent::setLastUsed($lastUsed); + } + + /** + * {@inheritDoc} + */ + public function getLastUsed() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getLastUsed', array()); + + return parent::getLastUsed(); + } + +} diff --git a/application/Repositories/Admin.php b/application/Repositories/Admin.php new file mode 100644 index 0000000..8262199 --- /dev/null +++ b/application/Repositories/Admin.php @@ -0,0 +1,52 @@ +getEntityManager()->createQuery( + "SELECT COUNT( a.id ) FROM \\Entities\\Admin a" + ) + ->getSingleScalarResult(); + } + + /** + * Finds all admins who are not assigned with domain. + * + * Finds all admins and iterate through then making an array of 'id' => 'username' + * If admin inactive username will be append by '(inactive)' then we iterate + * through domain admins and removing all array elements which id is already in domain admins list. + * + * @param \Entities\Domain $domain Domain to look for admins + * @retun array + */ + public function getNotAssignedForDomain( $domain ) + { + $adminNames = []; + foreach( $this->findBy( [ "super" => false ] ) as $admin ) + $adminNames[ $admin->getId() ] = $admin->getActive() ? $admin->getUsername() : $admin->getUsername() . " (inactive)"; + + foreach( $domain->getAdmins() as $admin ) + if( isset( $adminNames[ $admin->getId() ] ) ) + unset( $adminNames[ $admin->getId() ] ); + + return $adminNames; + } +} diff --git a/application/Repositories/AdminPreference.php b/application/Repositories/AdminPreference.php new file mode 100644 index 0000000..4402f1c --- /dev/null +++ b/application/Repositories/AdminPreference.php @@ -0,0 +1,15 @@ +getEntityManager()->createQueryBuilder() + ->select( 'a' ) + ->from( '\\Entities\\Alias', 'a' ) + ->where( 'a.goto = ?1' ) + ->setParameter( 1, $mailbox->getUsername() ); + + if( !$ima ) + $qb->andWhere( 'a.address != a.goto' ); + + if( !$admin->isSuper() ) + { + $qb->leftJoin( 'a.Domain', 'd' ) + ->leftJoin( 'd.DomainAdmin', 'da' ) + ->andWhere( 'da.Admin = ?2' ) + ->leftJoin( 'd.Admins', 'd2a' ) + ->andWhere( 'd2a = ?2' ) + ->setParameter( 2, $admin ); + } + + return $qb->getQuery()->getResult(); + } + + /** + * Loads aliases with mailbox. + * + * Selects aliases where address not equal to goto, and goto not equals to + * mailbox username, but goto has mailbox username. If admin is not super + * then it checks if admin have have linked with domain. + * + * @param \Entities\Mailbox $mailbox Mailbox for alias filtering. + * @param \Entities\Admin $admin Admin for checking privileges. + * @return \Entities\Alias[] + */ + public function loadWithMailbox( $mailbox, $admin ) + { + $qb = $this->getEntityManager()->createQueryBuilder() + ->select( 'a' ) + ->from( '\\Entities\\Alias', 'a' ) + ->where( 'a.address != a.goto' ) + ->andWhere( 'a.goto != ?1' ) + ->andWhere( 'a.goto like ?2' ) + ->setParameter( 1, $mailbox->getUsername() ) + ->setParameter( 2, '%' . $mailbox->getUsername() . '%'); + + if( !$admin->isSuper() ) + { + $qb->leftJoin( 'a.Domain', 'd' ) + ->leftJoin( 'd.DomainAdmin', 'da' ) + ->andWhere( 'da.username = ?3' ) + ->setParameter( 3, $admin->getUsername() ); + } + + return $qb->getQuery()->getResult(); + } + + /** + * Load aliases for alias list . + * + * Loads aliases for alias list, if admin is not super, it will select aliases + * only from domains which are linked with admin. If domain is set it will select + * aliases only for given domain, and if ima set to false then it will select all + * aliases where goto not equal to address that mean non mailbox aliases. + * + * @param \Entities\Admin $admin Admin for filtering mailboxes. + * @param \Entities\Domain $domain Domain for filtering mailboxes. + * @param bool $ima Include mailbox aliases flag. + * @return array + */ + public function loadForAliasList( $admin, $domain = null, $ima = false ) + { + $qb = $this->getEntityManager()->createQueryBuilder() + ->select( 'a.id as id , a.address as address, a.goto as goto, a.active as active, d.domain as domain' ) + ->from( '\\Entities\\Alias', 'a' ) + ->join( 'a.Domain', 'd' ); + + if( !$admin->isSuper() ) + $qb->join( 'd.Admins', 'd2a' ) + ->where( 'd2a = ?1' ) + ->setParameter( 1, $admin ); + + if( $domain ) + $qb->andWhere( 'a.Domain = ?2' ) + ->setParameter( 2, $domain ); + + if( !$ima ) + $qb->andWhere( "a.address != a.goto" ); + return $qb->getQuery()->getArrayResult(); + } + + /** + * Return filtered alias data array + * + * Use filter to filter aliases by address or goto or domain. If filter + * starts with * it will be replaced with % to meet sql requirements. At + * the end % will be added to all strings. So filter 'man' will bicome + * 'man%' and will look for man, manual and iffilter '*man' it wil bicome + * '%man%' and will look for records like human, humanity, man, manual. + * + * @param string $filter Flter for mailboxes + * @param \Entities\Admin $admin Admin for filtering mailboxes. + * @param \Entities\Domain $domain Domain for filtering mailboxes. + * @param bool $ima Include mailbox aliases flag. + * @return array + */ + public function filterForAliasList( $filter, $admin, $domain = null, $ima = false ) + { + $filter = str_replace ( "'" , "" , $filter ); + + if( strpos( $filter, "*" ) === 0 ) + $filter = '%' . substr( $filter, 1 ); + + $qb = $this->getEntityManager()->createQueryBuilder() + ->select( 'a.id as id , a.address as address, a.goto as goto, a.active as active, d.domain as domain' ) + ->from( '\\Entities\\Alias', 'a' ) + ->join( 'a.Domain', 'd' ) + ->where( "( a.goto LIKE '{$filter}%' OR a.address LIKE '{$filter}%' OR d.domain LIKE '{$filter}%')" ); + + if( !$admin->isSuper() ) + $qb->join( 'd.Admins', 'd2a' ) + ->andWhere( 'd2a = ?1' ) + ->setParameter( 1, $admin ); + + if( $domain ) + $qb->andWhere( 'm.Domain = ?2' ) + ->setParameter( 2, $domain ); + + if( !$ima ) + $qb->andWhere( "a.address != a.goto" ); + + return $qb->getQuery()->getArrayResult(); + } +} diff --git a/application/Repositories/AliasPreference.php b/application/Repositories/AliasPreference.php new file mode 100644 index 0000000..0dfb407 --- /dev/null +++ b/application/Repositories/AliasPreference.php @@ -0,0 +1,15 @@ +getEntityManager()->createQueryBuilder() + ->select( 'a.id as id , a.username as username, a.status as status, d.domain as domain' ) + ->from( '\\Entities\\Archive', 'a' ) + ->join( 'a.Domain', 'd' ); + + if( !$admin->isSuper() ) + $qb->join( 'd.Admins', 'd2a' ) + ->where( 'd2a.Admin = ?1' ) + ->setParameter( 1, $admin ); + + if( $domain ) + $qb->andWhere( 'a.Domain = ?2' ) + ->setParameter( 2, $domain ); + + return $qb->getQuery()->getArrayResult(); + } +} diff --git a/application/Repositories/DatabaseVersion.php b/application/Repositories/DatabaseVersion.php new file mode 100644 index 0000000..cbb2fbf --- /dev/null +++ b/application/Repositories/DatabaseVersion.php @@ -0,0 +1,15 @@ +isSuper() ) + $dql .= " LEFT JOIN d.Admins d2a WHERE d2a = ?1"; + + $dql .= " ORDER BY d.domain ASC"; + + $q = $this->getEntityManager()->createQuery( $dql ); + + if( !$admin->isSuper() ) + $q->setParameter( 1, $admin ); + + return $q->execute(); + } + + /** + * Load as array for admin + * + * Its used to get domains names in mailbox add-edit drop down list. + * It also can be used as loadForDomainList function. + * It calls loadForDomain iterates thought domains and it can return + * two types of arrays: id => name, or id => [ domain data ] + * + * @param \Entities\Admin $admin + * @para bool $onlyNames Type of array if set to true only names will be returned, else all data. + * @return array + */ + public function loadForAdminAsArray( $admin, $onlyNames = false ) + { + $array = []; + + if( $onlyNames ) + { + foreach( $this->loadForAdmin( $admin ) as $domain ) + $array[ $domain->getId() ] = $domain->getDomain(); + + } + else + { + foreach( $this->loadForAdmin( $admin ) as $domain ) + { + $array[ $domain->getId() ] = [ + 'domain' => $domain->getDomain(), + 'description' => $domain->getDescription(), + 'max_aliaseses' => $domain->getMaxAliases(), + 'alias_count' => $domain->getAliasesCount(), + 'max_mailboxes' => $domain->getMaxMailboxes(), + 'alias_mailbox' => $domain->getMailboxCount(), + 'max_quota' => $domain->getMaxQuota(), + 'quota' => $domain->getQuota(), + 'transport' => $domain->getTransport(), + 'active' => $domain->getActive(), + 'homedir' => $domain->getHomedir(), + 'maildir' => $domain->getMaildir(), + 'uid' => $domain->getUid(), + 'gid' => $domain->getGid() + + ]; + } + } + return $array; + } + + /** + * Load data for domains list + * + * Loads information for domains list. + * + * @param \Entities\Admin $admin + * @return array + */ + public function loadForDomainList( $admin ) + { + $dql = "SELECT d.id AS id, d.domain AS name, d.alias_count AS aliases, d.mailbox_count AS mailboxes, + d.max_aliases AS maxaliases, d.max_mailboxes AS maxmailboxes, SUM( m.maildir_size ) AS mailboxes_size, + d.max_quota AS maxquota, d.quota AS quota, d.transport AS transport, d.backupmx AS backupmx, + d.active AS active, d.created AS created, m.delete_pending AS delete_pending + FROM \\Entities\\Domain d LEFT JOIN d.Mailboxes m"; + + // FIXME a.address != a.goto + + if( !$admin->isSuper() ) + $dql .= " LEFT JOIN d.Admins d2a WHERE d2a = ?1"; + + $dql .= " GROUP BY d.id ORDER BY d.domain ASC"; + + $q = $this->getEntityManager()->createQuery( $dql ); + + if( !$admin->isSuper() ) + $q->setParameter( 1, $admin ); + + return $q->getArrayResult(); + } + + /** + * Load data for domains list + * + * Loads information for domains list. + * + * @param string $filter + * @param \Entities\Admin $admin + * @return array + */ + public function filterForDomainList( $filter, $admin ) + { + $filter = str_replace ( "'" , "" , $filter ); + + if( strpos( $filter, "*" ) === 0 ) + $filter = '%' . substr( $filter, 1 ); + + $dql = "SELECT d.id AS id, d.domain AS name, d.alias_count AS aliases, d.mailbox_count AS mailboxes, + d.max_aliases AS maxaliases, d.max_mailboxes AS maxmailboxes, SUM( m.maildir_size ) AS mailboxes_size, + d.max_quota AS maxquota, d.quota AS quota, d.transport AS transport, d.backupmx AS backupmx, + d.active AS active, d.created AS created + FROM \\Entities\\Domain d LEFT JOIN d.Mailboxes m + WHERE ( d.domain LIKE '{$filter}%' OR d.transport LIKE '{$filter}%' OR d.created LIKE '{$filter}%' )"; + + if( !$admin->isSuper() ) + $dql .= " LEFT JOIN d.Admins d2a WHERE d2a = ?1"; + + $dql .= " GROUP BY d.id ORDER BY d.domain ASC"; + + $q = $this->getEntityManager()->createQuery( $dql ); + + if( !$admin->isSuper() ) + $q->setParameter( 1, $admin ); + + return $q->getArrayResult(); + } + + + /** + * Convenience function to purge all associations of a domain and the domain + * + * @param \Entities\Domain $domain The domain object + */ + public function purge( $domain ) + { + $this->purgeMailboxes( $domain ); + $this->purgeAliases( $domain ); + $this->purgeLogs( $domain ); + $this->purgeDomainAdmins( $domain ); + + $this->getEntityManager()->remove( $domain ); + $this->getEntityManager()->flush(); + } + + /** + * Purge all mailboxes of a domain + * + * @param $domain \Entities\Domain The domain to purge the mailboxes of + * @return int The number of records deleted + */ + public function purgeMailboxes( $domain ) + { + return $this->getEntityManager()->createQuery( + "DELETE FROM \\Entities\\Mailbox m WHERE m.Domain = ?1" + ) + ->setParameter( 1, $domain ) + ->execute(); + } + + /** + * Purge all alaises of a domain + * + * @param $domain \Entities\Domain The domain to purge the aliases of + * @return int The number of records deleted + */ + public function purgeAliases( $domain ) + { + return $this->getEntityManager()->createQuery( + "DELETE FROM \\Entities\\Alias m WHERE m.Domain = ?1" + ) + ->setParameter( 1, $domain ) + ->execute(); + } + + /** + * Purge all logs of a domain + * + * @param $domain \Entities\Domain The domain to purge the logs of + * @return int The number of logs deleted + */ + public function purgeLogs( $domain ) + { + return $this->getEntityManager()->createQuery( + "DELETE FROM \\Entities\\Log m WHERE m.Domain = ?1" + ) + ->setParameter( 1, $domain ) + ->execute(); + } + + /** + * Purge all links to admins for a domain + * + * Requires a flush() + * + * @param $domain \Entities\Domain The domain to purge the admin links of + * @return int The number of links deleted + */ + public function purgeDomainAdmins( $domain ) + { + foreach( $domain->getAdmins() as $a ) + $domain->removeAdmin( $a ); + } + + /** + * Finds all domains which are not assigned with admin. + * + * Finds all domains and iterate through then making an array of 'id' => 'domain' + * If domain inactive domain name will be append by '(inactive)' then we iterate + * through admin domains and removing all array elements which id is already in admin domains list. + * + * @param \Entities\Admin $admin Admin to look for not assign domains + * @retun array + */ + public function getNotAssignedForAdmin( $admin ) + { + $domainNames = []; + foreach( $this->findAll() as $domain ) + $domainNames[ $domain->getId() ] = $domain->getActive() ? $domain->getDomain() : $domain->getDomain() . " (inactive)"; + + foreach( $admin->getDomains() as $domain ) + if( isset( $domainNames[ $domain->getId() ] ) ) + unset( $domainNames[ $domain->getId() ] ); + + return $domainNames; + } + +} diff --git a/application/Repositories/DomainPreference.php b/application/Repositories/DomainPreference.php new file mode 100644 index 0000000..b48d5ba --- /dev/null +++ b/application/Repositories/DomainPreference.php @@ -0,0 +1,15 @@ +getEntityManager()->createQueryBuilder() + ->select( 'l.id as id , l.action as action, l.data as data, l.timestamp as timestamp, a.username as admin, d.domain as domain' ) + ->from( '\\Entities\\Log', 'l' ) + ->leftJoin( 'l.Domain', 'd' ) + ->join( 'l.Admin', 'a' ); + + if( $admin ) + $qb->join( 'd.Admins', 'd2a' ) + ->where( 'd2a = ?1' ) + ->setParameter( 1, $admin ); + + if( $domain ) + $qb->andWhere( 'l.Domain = ?2' ) + ->setParameter( 2, $domain ); + + return $qb->getQuery()->getArrayResult(); + } +} diff --git a/application/Repositories/Mailbox.php b/application/Repositories/Mailbox.php new file mode 100644 index 0000000..336b0a8 --- /dev/null +++ b/application/Repositories/Mailbox.php @@ -0,0 +1,258 @@ +getEntityManager()->createQueryBuilder() + ->select( 'm' ) + ->from( '\\Entities\\Mailbox', 'm' ); + + if( !$admin->isSuper() ) + $qb->join( 'm.Domain', 'd' ) + ->join( 'd.Admins', 'd2a' ) + ->where( 'd2a.Admin = ?1' ) + ->setParameter( 1, $admin ); + + return $qb->getQuery()->getResult(); + } + + /** + * Load mailboxes for mailbox list . + * + * If admin is super he gets all mailboxes. + * + * @param \Entities\Admin $admin Admin for filtering mailboxes. + * @param \Entities\Domain $domain Domain for filtering mailboxes. + * @return array + */ + public function loadForMailboxList( $admin, $domain = null ) + { + $qb = $this->getEntityManager()->createQueryBuilder() + ->select( 'm.id as id, m.username as username, m.name as name, m.active as active, m.maildir_size as maildir_size, + m.homedir_size as homedir_size, m.size_at as size_at, m.quota as quota, d.domain as domain, m.delete_pending' ) + ->from( '\\Entities\\Mailbox', 'm' ) + ->where( 'm.delete_pending = 0' ) + ->join( 'm.Domain', 'd' ); + + if( !$admin->isSuper() ) + $qb->join( 'd.Admins', 'd2a' ) + ->andWhere( 'd2a.Admin = ?1' ) + ->setParameter( 1, $admin ); + + if( $domain ) + $qb->andWhere( 'm.Domain = ?2' ) + ->setParameter( 2, $domain ); + + return $qb->getQuery()->getArrayResult(); + } + + /** + * Return filtered mailboxes data array + * + * Use filter to filter mailboxes by username or name or domain. If filter + * starts with * it will be replaced with % to meet sql requirements. At + * the end % will be added to all strings. So filter 'man' will bicome + * 'man%' and will look for man, manual and iffilter '*man' it wil bicome + * '%man%' and will look for records like human, humanity, man, manual. + * + * @param string $filter Flter for mailboxes + * @param \Entities\Admin $admin Admin for filtering mailboxes. + * @param \Entities\Domain $domain Domain for filtering mailboxes. + * @return array + */ + public function filterForMailboxList( $filter, $admin, $domain = null ) + { + $filter = str_replace ( "'" , "" , $filter ); + + if( strpos( $filter, "*" ) === 0 ) + $filter = '%' . substr( $filter, 1 ); + + $qb = $this->getEntityManager()->createQueryBuilder() + ->select( 'm.id as id, m.username as username, m.name as name, m.active as active, m.maildir_size as maildir_size, + m.homedir_size as homedir_size, m.size_at as size_at, m.quota as quota, d.domain as domain, m.delete_pending' ) + ->from( '\\Entities\\Mailbox', 'm' ) + ->join( 'm.Domain', 'd' ) + ->where( "m.delete_pending = 0 AND ( m.username LIKE '{$filter}%' OR m.name LIKE '{$filter}%' OR d.domain LIKE '{$filter}%' )" ); + + if( !$admin->isSuper() ) + $qb->join( 'd.Admins', 'd2a' ) + ->andWhere( 'd2a = ?1' ) + ->setParameter( 1, $admin ); + + if( $domain ) + $qb->andWhere( 'm.Domain = ?2' ) + ->setParameter( 2, $domain ); + + return $qb->getQuery()->getArrayResult(); + } + + /** + * Load mailboxes usernmae list. + * + * If admin is super he gets all mailboxes. + * + * @param \Entities\Admin $admin Admin for filtering mailboxes. + * @param \Entities\Domain $domain Domain for filtering mailboxes. + * @return array + */ + public function loadUsernameList( $admin, $domain = null ) + { + $qb = $this->getEntityManager()->createQueryBuilder() + ->select( 'm.id as id , m.username as username' ) + ->from( '\\Entities\\Mailbox', 'm' ) + ->join( 'm.Domain', 'd' ); + + if( !$admin->isSuper() ) + $qb->join( 'd.Admins', 'd2a' ) + ->where( 'd2a.Admin = ?1' ) + ->setParameter( 1, $admin ); + + if( $domain ) + $qb->andWhere( 'm.Domain = ?2' ) + ->setParameter( 2, $domain ); + + $data = $qb->getQuery()->getArrayResult(); + $result = []; + foreach( $data as $row ) + $result[ $row['id'] ] = $row['username']; + return $result; + } + + + /** + * Check if mailbox is unique. + * + * Splits given email to local part and domain ant count all mailboxes + * with these parameters. If count is 0 then function returns true else false. + * + * @param string $email Email to check + * @return bool + */ + public function isUnique( $email ) + { + list( $lpart, $domain ) = explode( '@', $email ); + + $qb = $this->getEntityManager()->createQueryBuilder() + ->select( 'count( m.id )' ) + ->from( '\\Entities\\Mailbox', 'm' ) + ->join( 'm.Domain', 'd' ) + ->where( 'm.local_part = ?1' ) + ->andWhere( 'd.domain = ?2' ) + ->setParameter( 1, $lpart ) + ->setParameter( 2, $domain ); + + return $qb->getQuery()->getSingleScalarResult() > 0 ? false : true; + } + + /** + * Purges mailbox + * + * Remove all mailbox preferences. + * Remove all mailbox aliases with their preferences and decrease alias count in domain. + * Remove mailbox entry for multi alias with multi addresses. + * Remove actual mailbox and decrease mailbox count i domain. + * Returns false if privileges not allowed and true if removed. + * + * @param \Entities\Mailbox $mailbox Mailbox to purge + * @param \Entities\Admin $admin Admin which purging mailbox for privilege validation. + * @param bool $removeMailbox If true, also remove the Mailbox entity. If false, purge everything but this entity. + * @return bool + */ + public function purgeMailbox( $mailbox, $admin, $removeMailbox = true ) + { + if( !$admin->isSuper() && !$mailbox->getDomain()->getAdmins()->contains( $admin ) ) + return false; + + $aliases = $this->getEntityManager()->getRepository( "\\Entities\\Alias" )->loadForMailbox( $mailbox, $admin, true ); + $inAliases = $this->getEntityManager()->getRepository( "\\Entities\\Alias" )->loadWithMailbox( $mailbox, $admin ); + + foreach( $mailbox->getPreferences() as $pref ) + $this->getEntityManager()->remove( $pref ); + + //this won't delete the alias entry where address == goto + foreach( $aliases as $alias ) + { + $this->_removeAlias( $alias ); + } + + foreach( $inAliases as $alias ) + { + $gotos = explode( ',', $alias->getGoto() ); + + foreach( $gotos as $key => $goto ) + { + $gotos[ $key ] = $goto = trim( $goto ); + + if( ( $goto == $mailbox->getUsername() ) || ( $goto == '' ) ) + unset( $gotos[ $key ] ); + } + + if( sizeof( $gotos ) == 0 ) + $this->_removeAlias( $alias ); + else + $alias->setGoto( implode( ',', $gotos ) ); + } + + if( $removeMailbox ) + $this->getEntityManager()->remove( $mailbox ); + + $mailbox->getDomain()->decreaseMailboxCount(); + + return true; + } + + /** + * Removes alias + * + * Removes alias and its preferences also decrease domains alias count + * if alias goto field is not equal to alias address field. + * + * @param /Entities/Alias $alias Alias to remove. + * @return bool + */ + private function _removeAlias( $alias ) + { + foreach( $alias->getPreferences() as $pref ) + $this->getEntityManager()->remove( $pref ); + + $this->getEntityManager()->remove( $alias ); + + if( $alias->getGoto() != $alias->getAddress() ) + $alias->getDomain()->decreaseAliasCount(); + } + + /** + * Find all mailboxes pending deletion. + * + * @return \Entities\Mailbox[] + */ + public function pendingDelete() + { + return $this->getEntityManager()->createQueryBuilder() + ->select( 'm' ) + ->from( '\\Entities\\Mailbox', 'm' ) + ->where( 'm.delete_pending = 1' ) + ->getQuery() + ->getResult(); + } + +} diff --git a/application/Repositories/MailboxPreference.php b/application/Repositories/MailboxPreference.php new file mode 100644 index 0000000..d051cf4 --- /dev/null +++ b/application/Repositories/MailboxPreference.php @@ -0,0 +1,58 @@ +getEntityManager()->createQueryBuilder() + ->select( 'mp.value' ) + ->from( '\\Entities\\MailboxPreference', 'mp' ) + ->where( 'mp.attribute = ?1' ) + ->setParameter( 1, $attribute ); + + if( !$admin->isSuper() ) + $qb->join( 'mp.Mailbox', 'm' ) + ->join( 'm.Domain', 'd' ) + ->join( 'd.DomainToAdmin', 'd2a' ) + ->where( 'd2a.Admin = ?1' ) + ->setParameter( 1, $admin ); + + $data = $qb->getQuery() + ->useResultCache( true, 3600, self::VALUES_CACHE_KEY . '_' . $admin->getId() . '_' . $attribute ) + ->getScalarResult(); + + $values = []; + foreach( $data as $value ) + if( !in_array( $value['value'], $values ) ) + $values[] = $value['value']; + + return $values; + } + +} diff --git a/application/Repositories/RememberMe.php b/application/Repositories/RememberMe.php new file mode 100644 index 0000000..d85eeb4 --- /dev/null +++ b/application/Repositories/RememberMe.php @@ -0,0 +1,45 @@ +getEntityManager() + ->createQuery( 'SELECT r, u FROM \\Entities\\RememberMe r JOIN r.User u WHERE r.userhash = ?1 AND r.ckey = ?2' ) + ->setParameter( 1, $userhash ) + ->setParameter( 2, $key ) + ->getOneOrNullResult(); + } + + + + /** + * Delete all RememberMe entries for a given user + * + * @param \Entities\User $user The user to delete all RememberMe entries for + * @return int The number of entries removed + */ + public function deleteForUser( $user ) + { + return $this->getEntityManager()->createQuery( "DELETE \\Entities\\RememberMe me WHERE me.User = ?1" ) + ->setParameter( 1, $user ) + ->execute(); + } +} diff --git a/application/configs/addressbook.ini.dist b/application/configs/addressbook.ini.dist new file mode 100644 index 0000000..db83a24 --- /dev/null +++ b/application/configs/addressbook.ini.dist @@ -0,0 +1,71 @@ +;; +;; Address Book plugin configuration +;; + +[production] + +;;ldap connection parameters +ldap_uri = "ldap://10.20.30.40" +ldap_rdn = "cn=admin,dc=example,dc=com" +ldap_pass = "xxx" +ldap_dir = "ou=people,dc=example,dc=com" + +;;organisation name +organisation = "Example Organisation Name" + +;;objectClass name +;; also it can be an arrays if needed +;; +objectClass = "inetOrgPerson" + +;; +;;Fields witch be included in dn formating for user ldap entry +dn.items.0 = "mail" + +;; +;;it will appended in user dn +;; +;;So it will create dn such as: +;; cn=Joe Bloggs,ou=Development,dc=example,dc=com +default.dn.end = "ou=people,dc=example,dc=com" + +;; Parameters mapping +;; +mapping.department = "ou" +mapping.department_id = "departmentNumber" +mapping.ext_no = "telephoneNumber" +mapping.d_dial = "telephoneNumber" +mapping.mobile = "mobile" +mapping.grade = "title" +mapping.section = "title" +mapping.grade_id = "employeeType" +mapping.id = "uid" + +;; +;; if separator isset then paramter will be string seprated by seprator +;; but not an array +separator.title = "," + +;; +;; Configurations for making LDAP settings details. +;; +settings.hostname = "abook.example.com" +settings.name = "Example Corporate Directory" +settings.use_ssl = true +settings.advanced.maxHit = 10000 +settings.advanced.scope = "Subtree" +settings.advanced.filter = "(objectclass=*)" +settings.advanced.login = "Simple" + +;;;;;;;;;; +;; Configurations for DavMail syncronization script +;; +maildav.server.url = "http://davmail.example.com" +maildav.server.port = 1080 +maildav.tmp.path = "~/tmp" +maildav.domain.src = "example.com" +maildav.domain.dst = "example.net" +maildav.davical.server = "cal.example.com" +maildav.default.addressbook_name = "address-book" + +[development : production] diff --git a/application/configs/application.ini.dist b/application/configs/application.ini.dist index 54ba4a0..ff3baf8 100644 --- a/application/configs/application.ini.dist +++ b/application/configs/application.ini.dist @@ -7,49 +7,115 @@ ;; ;; IMPORTANT: Review and change all options in [user] ;; +;; ** This is for ViMbAdmin V3 and later ** +;; +;; See: https://github.com/opensolutions/ViMbAdmin3/wiki/Configuration [user] - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Enter a random string here to add salt to admin accounts -securitysalt = "" +; Installation Keys and Salts +; +; During installation, you will be prompted to enter strings here. This +; is to verify that you are in fact the person authorised to complete the +; installation as well as provide security for cookies and passwords. + +securitysalt = "" +resources.auth.oss.rememberme.salt = "" +defaults.mailbox.password_salt = "" + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; When installing for the first time, it may be useful to set the following ; to 1 BUT ensure you set it to zero again in a production system -resources.frontController.params.displayExceptions = 0 + +phpSettings.display_startup_errors = 1 +phpSettings.display_errors = 1 +resources.frontController.params.displayExceptions = 1 + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Default values used when created domains -; 0 means unlimited (i.e. a user can create unlimited aliases, or a user has no quota limit) +;; +;; You database and caching connection. +;; + +resources.doctrine2.connection.options.driver = 'pdo_mysql' +resources.doctrine2.connection.options.dbname = 'vimbadmin' +resources.doctrine2.connection.options.user = 'vimbadmin' +resources.doctrine2.connection.options.password = 'xxx' +resources.doctrine2.connection.options.host = 'localhost' + +;; Doctrine2 requires Memcache for maximum efficency. Without Memcache +;; it can be highly inefficient and will slow page requests down. +;; +;; You are strongly advised to install memcache and comment ArrayCache +;; here and uncomment MemcacheCache. +;; + +resources.doctrine2cache.type = 'ArrayCache' +;resources.doctrine2cache.type = 'MemcacheCache' +;resources.doctrine2cache.memcache.servers.0.host = '127.0.0.1' +resources.doctrine2cache.namespace = 'ViMbAdmin3' + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Default values used when creating domains +; +; See: https://github.com/opensolutions/ViMbAdmin3/wiki/Configuration +; See: https://github.com/opensolutions/ViMbAdmin3/wiki/Quotas + defaults.domain.quota = 0 defaults.domain.maxquota = 0 defaults.domain.transport = "virtual" defaults.domain.aliases = 0 defaults.domain.mailboxes = 0 +defaults.quota.multiplier = 'MB' + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Use server side filtering to reduce pagination time on client side +;; Defaults to off / false +defaults.server_side.pagination.enable = false +defaults.server_side.pagination.min_search_str = 3 +defaults.server_side.pagination.max_result_cnt = 500 + +;; Separate configuration for domain list +defaults.server_side.pagination.domain.enable = false +defaults.server_side.pagination.domain.min_search_str = 3 +defaults.server_side.pagination.domain.max_result_cnt = 500 + +; The number of rows displayed in the tables +;Â must be one of these: 10, 25, 50, 100 +defaults.table.entries = 50 + + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Options for the display of domain and mailbox sizes +;; +;; See: https://github.com/opensolutions/ViMbAdmin3/wiki/Mailbox-Sizes +;; +;; Enable or disable display of sizes. Default: disabled + +defaults.list_size.disabled = true + +;; Maildir size units. By default: KB. One of B, KB, MB or GB. +defaults.list_size.multiplier = 'GB' + + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Default values for creating mailboxes -; This sets the uid and gid columns in the mailbox table to the below valies +; This sets the uid and gid columns in the mailbox table to the below values defaults.mailbox.uid = 2000 defaults.mailbox.gid = 2000 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Allow admins to dictate whether a user can use BOTH, IMAP ONLY, POP3 ONLY when creating mailboxes -; -; Must be supported by your POP3/IMAP server. -; -; See https://github.com/opensolutions/ViMbAdmin/wiki/POP3-IMAP-Access-Restriction for documentation -; -allow_access_restriction = false - -; specify the options which should be allowed for access restrictions -access_restriction_type.smtp = "SMTP" -access_restriction_type.imap = "IMAP" -access_restriction_type.pop3 = "POP3" ; Set the homedir and maildir values in the mailbox table where the ; following substitutions apply: @@ -58,33 +124,28 @@ access_restriction_type.pop3 = "POP3" ; %u -> user part of email address ; $m -> full email address ; -defaults.mailbox.maildir = "%d/%u/" -defaults.mailbox.homedir = "/home/vmail/" +; +; http://wiki2.dovecot.org/VirtualUsers/Home + +defaults.mailbox.maildir = "maildir:/srv/vmail/%d/%u/mail:LAYOUT=fs" +defaults.mailbox.homedir = "/srv/vmail/%d/%u" ;minimum mailbox password length defaults.mailbox.min_password_length = 8 ; The password hashing function to use. Set to one of: ; -; "plain" - password stored as clear text -; "md5" - password hashed using MD5 without salt (PHP md5()) -; "md5.salted" - password hashed using MD5 with salt (see below) -; "crypt" - standard DES hash (compatible with MySQL ENCRYPT and courier - be sure to -; set a two character hash below -; "crypt:md5" - standard MD5 hash with random seed -; "crypt:blowfish" - Blowfish hash with random seed (not in mainline glibc; added in some Linux distributions) -; "crypt:sha256" - standard sha-256 hash (requires glibc 2.7 or newer). Equivalent to dovecot:SHA256-CRYPT -; "crypt:sha512" - standard sha-512 hash (requires glibc 2.7 or newer). Equivalent to dovecot:SHA256-CRYPT -; "md5.crypt" - MD5 based salted password hash nowadays commonly used in /etc/shadow. -; (compatible with Dovecot) Requires min 8 character hash below. -; "sha1" - password hashed using sha1 without salt -; "sha1.salted" - password hashed using sha1 with salt defined below -; "dovecot:XXX" - call the Dovecot password generator (see next option below) and use the +; "plain" - password stored as clear text +; "md5" - password hashed using MD5 without salt (PHP md5()) +; "md5.salted" - password hashed using MD5 with salt (see below) +; "sha1" - password hashed using sha1 without salt +; "sha1.salted" - password hashed using sha1 with salt defined below +; "crypt:XXX" - call the PHP crypt function (with random salt) where XXX is one of: md5, blowfish, sha256, sha512 +; "dovecot:XXX" - call the Dovecot password generator (see next option below) and use the ; scheme specified by XXX. To see available schemes, use 'dovecotpw -l' ; or 'doveadm pw -l' -defaults.mailbox.password_scheme = "md5" - +defaults.mailbox.password_scheme = "crypt:md5" ; The path to (and initial option(s) if necessary) the Dovecot password generator. Typical ; values may be something like: @@ -94,42 +155,79 @@ defaults.mailbox.password_scheme = "md5" defaults.mailbox.dovecot_pw_binary = "/usr/bin/doveadm pw" -; A hash to use when storing passwords. Typically used with "crypt" -; which only uses the first two characters and includes this in the -; final hash. For other schemes such as md5.salted then your mail system -; will also need to know and use this hash (or use Dovecot for authentication) -defaults.mailbox.password_hash = "ChangeMePlease" + +;; A "mailbox alias" will, for example add the following entry to +;; the alias table for a mailbox: name@example.com +;; +;; name@example.com -> name@example.com +;; +;; This is required for aliasing an entire domain. If in doubt, leave it enabled. +mailboxAliases = 1 + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; See: https://github.com/opensolutions/ViMbAdmin3/wiki/Archiving-Mailboxes + +server_id = 1 + +;;Archive options +binary.path.chown_R = "/bin/chown -R" +binary.path.tar_cf = "/bin/tar -cf" +binary.path.tar_xf = "/bin/tar -xf" +binary.path.bzip2_q = "/bin/bzip2 -q" +binary.path.bunzip2_q = "/bin/bunzip2 -q" +binary.path.rm_rf = "/bin/rm -rf" + +archive.path = "/srv/archives" + + + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Export Mailbox Settings +; +; See: ; See: https://github.com/opensolutions/ViMbAdmin3/wiki/Export-Settings +; +defaults.export_settings.disabled = true + +;; Export settings alowed subnets +defaults.export_settings.allowed_subnet[] = "10." +defaults.export_settings.allowed_subnet[] = "192.168." -; The number of rows displayed in the tables -;Â must be one of these: 10, 25, 50, 100 -defaults.table.entries = 25 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Settings email default values. ;; -;; Smae substituions apply as for maildir above. See (and edit) the -;; following file to see how the below are used: +;; Substituions are as follows: +;; +;; %d -> domain part of email address +;; %u -> user part of email address +;; $m -> full email address +;; +;; See (and skin) the following file to see how the below are used: ;; ;; views/mailbox/email/settings.phtml ;; server.smtp.enabled = 1 -server.smtp.host = "smtp.%d" +server.smtp.host = "mail.%d" server.smtp.user = "%m" -server.smtp.port = "25" +server.smtp.port = "465" server.smtp.crypt = "SSL" server.pop3.enabled = 1 -server.pop3.host = "pop3.%d" +server.pop3.host = "gpo.%d" server.pop3.user = "%m" server.pop3.port = "995" server.pop3.crypt = "SSL" server.imap.enabled = 1 -server.imap.host = "imap.%d" +server.imap.host = "gpo.%d" server.imap.user = "%m" server.imap.port = "993" server.imap.crypt = "SSL" @@ -139,22 +237,40 @@ server.webmail.host = "https://webmail.%d" server.webmail.user = "%m" + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Identity + +identity.orgname = "Example Limited" +identity.name = "Example Support Team" +identity.email = "support@example.com" +identity.autobot.name = "ViMbAdmin Autobot" +identity.autobot.email = "autobot@example.com" +identity.mailer.name = "ViMbAdmin Autobot" +identity.mailer.email = "do-not-reply@example.com" + +identity.sitename = "ViMbAdmin" +identity.siteurl = "https://www.example.com/vimbadmin/" + + ;; ;; All mails and correspondance will come from the following;; server.email.name = "ViMbAdmin Administrator" -server.email.address = "vimbadmin@example.com" +server.email.address = "support@example.com" + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; -;; A "mailbox alias" will, for example add the following entry to -;; the alias table for a mailbox: name@example.com +;; Skinning ;; -;; name@example.com -> name@example.com +;; You can skin ViMbAdmin pages if you wish. ;; -;; This is required for aliasing an entire domain. If in doubt, leave it enabled. -mailboxAliases = 1 +;; See: https://github.com/opensolutions/ViMbAdmin3/wiki/Skinning + +; resources.smarty.skin = "myskin" + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -164,40 +280,14 @@ mailboxAliases = 1 ;; Ensure you have a working mail server configuration so the system can ;; send emails: ;; -resources.mailer.smtphost = "smtp.example.com" +resources.mailer.smtphost = "localhost" ;resources.mailer.username = "" -;resources.mailer.password = "96" +;resources.mailer.password = "" ;resources.mailer.auth = "" ;resources.mailer.ssl = "" ;resources.mailer.port = "25" -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; You database connection. -;; -;; See: http://www.doctrine-project.org/projects/orm/1.2/docs/manual/introduction-to-connections/en -;; -;; phptype(dbsyntax)://username:password@protocol+hostspec/database?option=value -;; -;; Most variations are allowed: -;; -;; phptype://username:password@protocol+hostspec:110//usr/db_file.db -;; phptype://username:password@hostspec/database -;; phptype://username:password@hostspec -;; phptype://username@hostspec -;; phptype://hostspec/database -;; phptype://hostspec -;; phptype:///database -;; phptype:///database?option=value&anotheroption=anothervalue -;; phptype(dbsyntax) -;; phptype -;; -;; phptype is typically one of: mysqli, mysql, pgsql, sqlite, mssql -;; - -; resources.doctrine.connection_string = "phptype://username:password@host/database" - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; @@ -208,14 +298,14 @@ resources.mailer.smtphost = "smtp.example.com" ;; It is useful to use the email logger to be alerted of serious errors. ;; -resources.logger.enabled = 0 +ondemand_resources.logger.enabled = 1 -;resources.logger.writers.email.from = vimbadmin@example.com -;resources.logger.writers.email.to = sysadmins@example.com -;resources.logger.writers.email.prefix = "ViMbAdmin_Error" -;resources.logger.writers.email.level = 3 +;ondemand_resources.logger.writers.email.from = "admin@example.com" +;ondemand_resources.logger.writers.email.to = "admin@example.com" +;ondemand_resources.logger.writers.email.prefix = "ViMbAdmin_Error" +;ondemand_resources.logger.writers.email.level = 3 -;resources.logger.writers.stream.level = 7 +ondemand_resources.logger.writers.stream.level = 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -248,29 +338,225 @@ skipVersionCheck = 0 skipInstallPingback = 0 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + + + + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Allow admins to dictate whether a user can use BOTH, IMAP ONLY, +; POP3 ONLY when creating mailboxes. +; +; Must be supported by your POP3/IMAP server. +; +; See https://github.com/opensolutions/ViMbAdmin/wiki/POP3-IMAP-Access-Permissions +; for documentation. +; +; This is handled via a plugin +; + +vimbadmin_plugins.AccessPermissions.disabled = false + +; specify the options which should be allowed for access restrictions +vimbadmin_plugins.AccessPermissions.type.SMTP = "SMTP" +vimbadmin_plugins.AccessPermissions.type.IMAP = "IMAP" +vimbadmin_plugins.AccessPermissions.type.POP3 = "POP3" +vimbadmin_plugins.AccessPermissions.type.SIEVE = "SIEVE" + + + + + + + + + + + + + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Proceed onwards with caution. ;; ;; The above [user] params are the may ones of consequence. ;; -[production : user] -phpSettings.display_startup_errors = 0 -phpSettings.display_errors = 0 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Allows to add additional information. +; +; This is handled via a plugin +; + +vimbadmin_plugins.AccessPermissions.disabled = false +vimbadmin_plugins.Jabber.disabled = true +vimbadmin_plugins.DirectoryEntry.disabled = true +vimbadmin_plugins.SharedMailbox.disabled = true +vimbadmin_plugins.SOGo.disabled = true + + +vimbadmin_plugins.AdditionalInfo.disabled = true +vimbadmin_plugins.Addressbook.disabled = true +vimbadmin_plugins.Calendar.disabled = true +vimbadmin_plugins.RoundCube.disabled = true + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; Disabling directory entry subform element +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +vimbadmin_plugins.DirectoryEntry.disabled_elements.JpegPhoto = true +vimbadmin_plugins.DirectoryEntry.disabled_elements.Mail = true +vimbadmin_plugins.DirectoryEntry.disabled_elements.PreferredLanguage = true +vimbadmin_plugins.DirectoryEntry.disabled_elements.Secretary = true + +vimbadmin_plugins.DirectoryEntry.disabled_elements.PersonalTitle = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.GivenName = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.Sn = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.DisplayName = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.Initials = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.BusinesCategory = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.EmployeeType = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.Title = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.DepartmentNumber = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.Ou = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.RoomNumber = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.O = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.CarLicense = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.EmployeeNumber = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.HomePhone = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.TelephoneNumber = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.Mobile = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.Pager = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.FacsimileTelephoneNumber = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.HomePostalAddress = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.LabeledUri = false +vimbadmin_plugins.DirectoryEntry.disabled_elements.Manager = false + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Mailbox AdditionalInfo plugin elements +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +;;Additional text messages for plugin. +AdditionalInfo.mailbox.formPreBlurb = "
NB: Do not edit the following. It is sync'd on a nightly basis ..."
+
+; First Name
+vimbadmin_plugins.AdditionalInfo.elements.id.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.elements.id.options.required = false
+vimbadmin_plugins.AdditionalInfo.elements.id.options.label = "LDAP Id"
+
+; First Name
+vimbadmin_plugins.AdditionalInfo.elements.first_name.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.elements.first_name.options.required = false
+vimbadmin_plugins.AdditionalInfo.elements.first_name.options.label = "First Name"
+
+; Last Name
+vimbadmin_plugins.AdditionalInfo.elements.second_name.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.elements.second_name.options.required = false
+vimbadmin_plugins.AdditionalInfo.elements.second_name.options.label = "Last Name"
+
+; Grade
+vimbadmin_plugins.AdditionalInfo.elements.grade.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.elements.grade.options.required = false
+vimbadmin_plugins.AdditionalInfo.elements.grade.options.label = "Grade"
+
+; Grade Id
+vimbadmin_plugins.AdditionalInfo.elements.grade_id.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.elements.grade_id.options.required = false
+vimbadmin_plugins.AdditionalInfo.elements.grade_id.options.label = "Grade Id"
+vimbadmin_plugins.AdditionalInfo.elements.grade_id.options.validators.digits[] = 'Digits'
+vimbadmin_plugins.AdditionalInfo.elements.grade_id.options.validators.digits[] = true
+
+; Department
+vimbadmin_plugins.AdditionalInfo.elements.department.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.elements.department.options.required = false
+vimbadmin_plugins.AdditionalInfo.elements.department.options.label = "Department"
+
+; Department Id
+vimbadmin_plugins.AdditionalInfo.elements.department_id.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.elements.department_id.options.required = false
+vimbadmin_plugins.AdditionalInfo.elements.department_id.options.label = "Department Id"
+vimbadmin_plugins.AdditionalInfo.elements.department_id.options.validators.digits[] = 'Digits'
+vimbadmin_plugins.AdditionalInfo.elements.department_id.options.validators.digits[] = true
+
+; Section
+vimbadmin_plugins.AdditionalInfo.elements.section.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.elements.section.options.required = false
+vimbadmin_plugins.AdditionalInfo.elements.section.options.label = "Section"
+
+; Extension Number
+vimbadmin_plugins.AdditionalInfo.elements.ext_no.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.elements.ext_no.options.required = false
+vimbadmin_plugins.AdditionalInfo.elements.ext_no.options.label = "Extension Number"
+vimbadmin_plugins.AdditionalInfo.elements.ext_no.options.validators.digits[] = 'Digits'
+vimbadmin_plugins.AdditionalInfo.elements.ext_no.options.validators.digits[] = true
+vimbadmin_plugins.AdditionalInfo.elements.ext_no.options.validators.length[] = 'StringLength'
+vimbadmin_plugins.AdditionalInfo.elements.ext_no.options.validators.length[] = false
+vimbadmin_plugins.AdditionalInfo.elements.ext_no.options.validators.length.range[] = 4
+vimbadmin_plugins.AdditionalInfo.elements.ext_no.options.validators.length.range[] = 4
+;;to disable autocomplete functionality
+vimbadmin_plugins.AdditionalInfo.elements.ext_no.options.autocomplete = 'off'
+
+; Direct Dial
+vimbadmin_plugins.AdditionalInfo.elements.d_dial.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.elements.d_dial.options.required = false
+vimbadmin_plugins.AdditionalInfo.elements.d_dial.options.label = "Direct Dial"
+vimbadmin_plugins.AdditionalInfo.elements.d_dial.options.autocomplete = 'off'
+
+; Mobile
+vimbadmin_plugins.AdditionalInfo.elements.mobile.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.elements.mobile.options.required = false
+vimbadmin_plugins.AdditionalInfo.elements.mobile.options.label = "Mobile"
+vimbadmin_plugins.AdditionalInfo.elements.mobile.options.autocomplete = 'off'
+
+;;;;;;;
+;; Aliases additional information
+;;
+; First Name
+vimbadmin_plugins.AdditionalInfo.alias.elements.name.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.alias.elements.name.options.required = false
+vimbadmin_plugins.AdditionalInfo.alias.elements.name.options.label = "Name"
+
+; Extension Number
+vimbadmin_plugins.AdditionalInfo.alias.elements.ext_no.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.alias.elements.ext_no.options.required = false
+vimbadmin_plugins.AdditionalInfo.alias.elements.ext_no.options.label = "Extension Number"
+vimbadmin_plugins.AdditionalInfo.alias.elements.ext_no.options.validators.digits[] = 'Digits'
+vimbadmin_plugins.AdditionalInfo.alias.elements.ext_no.options.validators.digits[] = true
+vimbadmin_plugins.AdditionalInfo.alias.elements.ext_no.options.validators.length[] = 'StringLength'
+vimbadmin_plugins.AdditionalInfo.alias.elements.ext_no.options.validators.length[] = false
+vimbadmin_plugins.AdditionalInfo.alias.elements.ext_no.options.validators.length.range[] = 4
+vimbadmin_plugins.AdditionalInfo.alias.elements.ext_no.options.validators.length.range[] = 4
+vimbadmin_plugins.AdditionalInfo.alias.elements.ext_no.options.autocomplete = 'off'
+
+; Direct Dial
+vimbadmin_plugins.AdditionalInfo.alias.elements.d_dial.type = "Zend_Form_Element_Text"
+vimbadmin_plugins.AdditionalInfo.alias.elements.d_dial.options.required = false
+vimbadmin_plugins.AdditionalInfo.alias.elements.d_dial.options.label = "Direct Dial"
+vimbadmin_plugins.AdditionalInfo.alias.elements.d_dial.options.autocomplete = 'off'
+
+
+[production : user]
includePaths.library = APPLICATION_PATH "/../library"
-includePaths.library = APPLICATION_PATH "/../library/Doctrine"
+includePaths.osslibrary = APPLICATION_PATH "/../vendor/opensolutions/oss-framework/src/"
+
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "ViMbAdmin"
temporary_directory = APPLICATION_PATH "/../var/tmp"
+pluginPaths.OSS_Resource = APPLICATION_PATH "/../vendor/opensolutions/oss-framework/src/OSS/Resource"
pluginPaths.ViMbAdmin_Resource = APPLICATION_PATH "/../library/ViMbAdmin/Resource"
mini_js = 1
@@ -278,51 +564,84 @@ mini_css = 1
alias_autocomplete_min_length = 2
-resources.router.routes.changepass.route = "/change-password"
-resources.router.routes.changepass.defaults.module = "default"
-resources.router.routes.changepass.defaults.controller = "auth"
-resources.router.routes.changepass.defaults.action = "change-password"
-
-resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
-resources.doctrine.data_fixtures_path = APPLICATION_PATH "/../doctrine/data/fixtures"
-resources.doctrine.models_path = APPLICATION_PATH "/models"
-resources.doctrine.migrations_path = APPLICATION_PATH "/../doctrine/migrations"
-resources.doctrine.sql_path = APPLICATION_PATH "/../doctrine/data/sql"
-resources.doctrine.yaml_schema_path = APPLICATION_PATH "/../doctrine/schema"
-resources.doctrine.generate_models_options.generateTableClasses = true
-resources.doctrine.extensions_path = APPLICATION_PATH "/../library/DoctrineExtensions"
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Database schema migration version - DO NOT CHANGE
-migration_version = 2
-
-resources.namespace.checkip = 1
-
-resources.auth = 1
+resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
+resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
+resources.modules[] =
+
+
+; doctrine2
+resources.doctrine2.models_path = APPLICATION_PATH
+resources.doctrine2.proxies_path = APPLICATION_PATH "/Proxies"
+resources.doctrine2.repositories_path = APPLICATION_PATH
+resources.doctrine2.xml_schema_path = APPLICATION_PATH "/../doctrine2/xml"
+resources.doctrine2.autogen_proxies = 0
+resources.doctrine2.logger = 1
+resources.doctrine2.models_namespace = "Entities"
+resources.doctrine2.proxies_namespace = "Proxies"
+resources.doctrine2.repositories_namespace = "Repositories"
+
+
+resources.doctrine2cache.autoload_method = "composer"
+;resources.doctrine2cache.type = 'ArrayCache'
+;resources.doctrine2cache.type = 'MemcacheCache'
+;resources.doctrine2cache.memcache.servers.0.host = '127.0.0.1'
+;resources.doctrine2cache.memcache.servers.0.port = '11211'
+;resources.doctrine2cache.memcache.servers.0.persistent = false
+;resources.doctrine2cache.memcache.servers.0.weight = 1
+;resources.doctrine2cache.memcache.servers.0.timeout = 1
+;resources.doctrine2cache.memcache.servers.0.retry_int = 15
+
+; resources.doctrine2cache.memcache.servers.1.host = 'xxx'
+; resources.doctrine2cache.memcache.servers.2.host = 'yyy'
+
+resources.namespace.checkip = 0
+
+resources.auth.enabled = 1
+resources.auth.oss.adapter = "OSS_Auth_Doctrine2Adapter"
+resources.auth.oss.pwhash = "bcrypt"
+resources.auth.oss.hash_cost = 9
+resources.auth.oss.entity = "\\Entities\\Admin"
+resources.auth.oss.disabled.lost-username = 1
+resources.auth.oss.disabled.lost-password = 0
+
+resources.auth.oss.rememberme.enabled = 1
+resources.auth.oss.rememberme.timeout = 2592000
+resources.auth.oss.rememberme.secure = true
+
+resources.auth.oss.lost_password.use_captcha = true
resources.session.save_path = APPLICATION_PATH "/../var/session"
resources.session.use_only_cookies = true
resources.session.remember_me_seconds = 3600
+resources.session.name = 'VIMBADMIN3'
-resources.logger.writers.stream.path = APPLICATION_PATH "/../var/log"
-resources.logger.writers.stream.owner = www-data
-resources.logger.writers.stream.group = www-data
+ondemand_resources.logger.writers.stream.path = APPLICATION_PATH "/../var/log"
+ondemand_resources.logger.writers.stream.owner = www-data
+ondemand_resources.logger.writers.stream.group = www-data
+ondemand_resources.logger.writers.stream.mode = single
+ondemand_resources.logger.writers.stream.logname = vimbadmin.log
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Smarty View
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-resources.view.enabled = 0
+
resources.smarty.enabled = 1
resources.smarty.templates = APPLICATION_PATH "/views"
+; resources.smarty.skin = "myskin"
resources.smarty.compiled = APPLICATION_PATH "/../var/templates_c"
resources.smarty.cache = APPLICATION_PATH "/../var/cache"
resources.smarty.config = APPLICATION_PATH "/configs/smarty"
resources.smarty.plugins[] = APPLICATION_PATH "/../library/ViMbAdmin/Smarty/functions"
-resources.smarty.plugins[] = APPLICATION_PATH "/../library/Smarty/plugins"
-resources.smarty.plugins[] = APPLICATION_PATH "/../library/Smarty/sysplugins"
+resources.smarty.plugins[] = APPLICATION_PATH "/../vendor/opensolutions/oss-framework/src/OSS/Smarty/functions"
+resources.smarty.plugins[] = APPLICATION_PATH "/../vendor/smarty/smarty/distribution/libs/plugins"
+resources.smarty.plugins[] = APPLICATION_PATH "/../vendor/smarty/smarty/distribution/libs/sysplugins"
resources.smarty.debugging = 0
+
+
+
[development : production]
mini_js = 0
@@ -332,8 +651,3 @@ phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
-resources.logger.writers.firebug.enabled = 1
-resources.logger.writers.firebug.level = 7
-
-resources.view.debugging = true
-resources.smarty.debugging = true
diff --git a/application/configs/davical.ini.dist b/application/configs/davical.ini.dist
new file mode 100644
index 0000000..c950cdf
--- /dev/null
+++ b/application/configs/davical.ini.dist
@@ -0,0 +1,47 @@
+;;
+;; davical plugin configuration
+;;
+
+[production]
+
+servers.davicalsrv1.name = "https://cal.example.com"
+servers.davicalsrv1.dbname = "davical"
+servers.davicalsrv1.user = "davical_app"
+servers.davicalsrv1.password = "xxx"
+servers.davicalsrv1.host = "127.0.0.1"
+servers.davicalsrv1.port = "5432"
+servers.davicalsrv1.driver = "pdo_pgsql"
+
+;; The following is for creating shared calanders
+;;
+;; It will be created automatically
+
+shared_resource.username = "davical-shared-resources@example.com"
+shared_resource.password = "xxx"
+shared_resource.fullname = "Example Shared Resources"
+shared_resource.email = "admin@example.com"
+shared_resource.active = 1
+shared_resource.updated = "now()"
+
+
+;; Calanders are created and named in the UI
+;;
+;; If true, the UI will be preset to create the following named calanders:
+
+auto_create = true
+auto.work = "Work"
+
+;;;;;;;;;;
+;; Configurations for DavMail syncronization script
+;;
+maildav.server.url = "http://example.com"
+maildav.server.port = 1080
+maildav.tmp.path = "/var/tmp"
+maildav.default.calendar_name = "work"
+maildav.domain.src = "example.com"
+maildav.domain.dst = "example.net"
+
+
+[development : production]
+
+
diff --git a/application/configs/jabber.ini.dist b/application/configs/jabber.ini.dist
new file mode 100644
index 0000000..0e63df9
--- /dev/null
+++ b/application/configs/jabber.ini.dist
@@ -0,0 +1,30 @@
+;;
+;; Jabber plugin configuration
+;;
+
+[production]
+
+servers.1.name = "Exampple Staff Instant Messaging Server"
+servers.1.auto = true
+servers.1.useSQLview = true
+servers.1.dbal.dbname = "jabberd2"
+servers.1.dbal.user = "jabberd2"
+servers.1.dbal.password = "xxx"
+servers.1.dbal.host = "localhost"
+servers.1.dbal.driver = "pdo_mysql"
+
+
+servers.1.settingsPreBlurb = "You should be able to configure most clients with just your
+Jabber ID as above. If not, you can try manually setting the
+following:"
+
+servers.1.settingsPostBlurb = "Contact us for assistance if you have any difficulty."
+
+servers.1.server = "im.example.com"
+servers.1.port = 5222
+servers.1.ssl = false
+servers.1.tls = true
+servers.1.resource = "Thunderbird"
+
+
+[development : production]
diff --git a/application/configs/roundcube.ini.dist b/application/configs/roundcube.ini.dist
new file mode 100644
index 0000000..348c098
--- /dev/null
+++ b/application/configs/roundcube.ini.dist
@@ -0,0 +1,22 @@
+;;
+;; roundcube plugin configuration
+;;
+
+[production]
+
+; database parameters
+servers.dbal.dbname = "roundcubemail"
+servers.dbal.user = "roundcube"
+servers.dbal.password = "xxx"
+servers.dbal.host = "localhost"
+servers.dbal.driver = "pdo_mysql"
+
+servers.davical.address = "https://cal.example.com"
+
+;;;;;;
+;; key for password encryption
+;;
+
+auth.key = "xxx"
+
+[development : production]
diff --git a/application/configs/sogo.ini.dist b/application/configs/sogo.ini.dist
new file mode 100644
index 0000000..bddcb7f
--- /dev/null
+++ b/application/configs/sogo.ini.dist
@@ -0,0 +1,33 @@
+;;
+;; roundcube plugin configuration
+;;
+
+[production]
+
+; database parameters
+servers.dbal.dbname = "sogo"
+servers.dbal.user = "sogo"
+servers.dbal.password = "xxx"
+servers.dbal.host = "localhost"
+servers.dbal.driver = "pdo_mysql"
+
+user_profile.default.SOGoTimeZone = "Europe/Dublin"
+user_profile.default.SOGoLanguage = "English"
+user_profile.default.SOGoShorDateFormat = "%d/%m/%Y"
+user_profile.default.SOGoLongDateFormat = "%A, %d %B, %Y"
+user_profile.default.SOGoTimeFormat = "%H:%M"
+user_profile.default.SOGoFirstDayOfWeek = "0"
+user_profile.auxiliaryImap.default.encryption = "ssl"
+user_profile.auxiliaryImap.default.server = "gpo.example.com"
+
+sogo.server.uri = "https://webmail.example.com/SOGo"
+sogo.defaults.calendar_name = "personal"
+sogo.defaults.contacts_name = "personal"
+
+maildav.server.url = "http://10.20.30.40"
+maildav.server.port = 1080
+maildav.tmp.path = "/var/tmp"
+maildav.domain.src = "example.com"
+maildav.domain.dst = "example.net"
+
+[development : production]
diff --git a/application/models/MailboxTable.php b/application/controllers/AdditionalInfoController.php
similarity index 68%
rename from application/models/MailboxTable.php
rename to application/controllers/AdditionalInfoController.php
index 343c047..962aa14 100644
--- a/application/models/MailboxTable.php
+++ b/application/controllers/AdditionalInfoController.php
@@ -7,7 +7,7 @@
* project which provides an easily manageable web based virtual
* mailbox administration system.
*
- * Copyright (c) 2011 Open Source Solutions Limited
+ * Copyright (c) 2011 - 2014 Open Source Solutions Limited
*
* ViMbAdmin is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,28 +26,29 @@
* 147 Stepaside Park, Stepaside, Dublin 18, Ireland.
* Barry O'Donovan application.ini
file." ), ViMbAdmin_Message::INFO );
+ $this->addMessage( _( "Incorrect security salt provided. Please copy and paste it from the application.ini
file." ), OSS_Message::INFO );
}
else
{
- $admin = new Admin();
- $admin['username'] = $form->getValue( 'username' );
- $admin->setPassword( $form->getValue( 'password' ), $this->_options['securitysalt'], false );
- $admin->super = true;
- $admin->active = true;
- $admin->save();
-
+ $admin = new \Entities\Admin();
+ $admin->setUsername( $form->getValue( 'username' ) );
+ $admin->setPassword(
+ OSS_Auth_Password::hash( $form->getValue( 'password' ), $this->_options['resources']['auth']['oss'] )
+ );
+ $admin->setSuper( true );
+ $admin->setActive( true );
+ $admin->setCreated( new \DateTime() );
+ $admin->setModified( new \DateTime() );
+ $this->getD2EM()->persist( $admin );
+
// we need to populate the Doctine migration table
- $migration = new MigrationVersion();
- $migration['version'] = $this->_options['migration_version'];
- $migration->save();
+ $dbversion = new \Entities\DatabaseVersion();
+ $dbversion->setVersion( ViMbAdmin_Version::DBVERSION );
+ $dbversion->setName( ViMbAdmin_Version::DBVERSION_NAME );
+ $dbversion->setAppliedOn( new \DateTime() );
+ $this->getD2EM()->persist( $dbversion );
+
+ $this->getD2EM()->flush();
try
{
- $mailer = new Zend_Mail( 'UTF-8' );
+ $mailer = $this->getMailer();
$mailer->setSubject( _( 'ViMbAdmin :: Your New Administrator Account' ) );
- $mailer->addTo( $admin['username'] );
+ $mailer->addTo( $admin->getUsername() );
$mailer->setFrom(
$this->_options['server']['email']['address'],
$this->_options['server']['email']['name']
);
- $this->view->username = $admin['username'];
+ $this->view->username = $admin->getUsername();
$this->view->password = $form->getValue( 'password' );
$mailer->setBodyText( $this->view->render( 'admin/email/new_admin.phtml' ) );
$mailer->send();
}
- catch( Exception $e )
- {}
+ catch( Zend_Mail_Exception $e )
+ {
+ $this->addMessage( _( 'Could not send welcome email to the new administrator.
+ Please ensure you have configured a mail relay server in your application.ini
.' ), OSS_Message::ALERT );
+ }
- $this->addMessage( _( 'Your administrator account has been added. Please log in below.' ), ViMbAdmin_Message::SUCCESS );
+ $this->addMessage( _( 'Your administrator account has been added. Please log in below.' ), OSS_Message::SUCCESS );
}
if( !( isset( $this->_options['skipInstallPingback'] ) && $this->_options['skipInstallPingback'] ) )
{
- // Try and track new installs to see if it is worthwhile continueing development
- include_once( APPLICATION_PATH . '/../public/PiwikTracker.php' );
-
- if( class_exists( 'PiwikTracker' ) )
+ try
{
- if( $_SERVER['HTTPS'] == 'on' )
- PiwikTracker::$URL = 'https://stats.opensolutions.ie/';
- else
- PiwikTracker::$URL = 'http://stats.opensolutions.ie/';
-
- $piwikTracker = new PiwikTracker( $idSite = 5 );
- $piwikTracker->doTrackPageView( 'Nes Install Completed' );
- $piwikTracker->doTrackGoal( $idGoal = 1, $revenue = 0 );
+ // Try and track new installs to see if it is worthwhile continueing development
+ include_once( APPLICATION_PATH . '/../public/PiwikTracker.php' );
+
+ if( class_exists( 'PiwikTracker' ) )
+ {
+ if( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' )
+ PiwikTracker::$URL = 'https://stats.opensolutions.ie/';
+ else
+ PiwikTracker::$URL = 'http://stats.opensolutions.ie/';
+
+ $piwikTracker = new PiwikTracker( $idSite = 5 );
+ $piwikTracker->doTrackPageView( 'New V3 Install Completed' );
+ $piwikTracker->doTrackGoal( $idGoal = 2, $revenue = 1 );
+ }
}
+ catch( Exception $e ){}
}
- $this->_helper->viewRenderer->setNoRender( true );
$this->_redirect( 'auth/login' );
}
}
- $this->view->form = $form;
}
-
}
+
+
diff --git a/application/controllers/DomainController.php b/application/controllers/DomainController.php
index cf40422..81dfebd 100644
--- a/application/controllers/DomainController.php
+++ b/application/controllers/DomainController.php
@@ -7,7 +7,7 @@
* project which provides an easily manageable web based virtual
* mailbox administration system.
*
- * Copyright (c) 2011 Open Source Solutions Limited
+ * Copyright (c) 2011 - 2014 Open Source Solutions Limited
*
* ViMbAdmin is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
* 147 Stepaside Park, Stepaside, Dublin 18, Ireland.
* Barry O'Donovan