/**
  * @param USER $user The user for which entries are to be retrieved.
  */
 public function __construct($user)
 {
     parent::__construct($user->app);
     $this->_user = $user;
     $this->_user->load_permissions();
     // Make sure permissions are available
 }
 /**
  * @param USER $user The user for which folders are to be retrieved.
  */
 public function __construct($user)
 {
     parent::__construct($user->app);
     /* Folders may be loaded as another query is executing;
      * make sure not to execute in the existing connection.
      */
     $this->ensure_has_own_database_connection();
     $this->_user = $user;
     $this->_user->load_permissions();
     // Make sure permissions are available
 }
 /**
  * Builds a query for an object in a folder.
  * @param FOLDER $folder
  */
 public function __construct($folder)
 {
     parent::__construct($folder->app);
     $this->_folder = $folder;
 }