/**
  * Do a SELECT query over database with specified arguments
  * 
  * This function can return single instance or array of instances that match 
  * requirements provided in $arguments associative array
  * 
  * $arguments is an associative array with following fields (all optional):
  * 
  *  - one        - select first row
  *  - conditions - additional conditions
  *  - group      - group by string
  *  - having     - having string
  *  - order      - order by string
  *  - offset     - limit offset, valid only if limit is present
  *  - limit      - number of rows that need to be returned
  *
  * @param array $arguments
  * @param string $table_name
  * @param string $item_class
  * @return mixed
  * @throws DBQueryError
  */
 function find($arguments = null, $table_name = null, $item_class = null)
 {
     return DataManager::findBySQL(DataManager::prepareSelectFromArguments($arguments, $table_name), null, array_var($arguments, 'one'), $table_name, $item_class);
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'currencies', 'Currency');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'incoming_mail_activity_logs', 'IncomingMailActivityLog');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'project_groups', 'ProjectGroup');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'document_categories', 'DocumentCategory');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'commit_project_objects', 'CommitProjectObject');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'status_updates', 'StatusUpdate');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'modules', 'Module');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'activity_logs', 'ActivityLog');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'assignments', 'Assignment');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'time_reports', 'TimeReport');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'subscriptions', 'Subscription');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'invoice_note_templates', 'InvoiceNoteTemplate');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'reminders', 'Reminder');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'invoice_items', 'InvoiceItem');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'source_users', 'SourceUser');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'email_templates', 'EmailTemplate');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'config_options', 'ConfigOption');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'page_versions', 'PageVersion');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'incoming_mailboxes', 'IncomingMailbox');
 }
 /**
  * Return array of objects that match specific SQL
  *
  * @param string $sql
  * @param array $arguments
  * @param boolean $one
  * @return mixed
  */
 function findBySQL($sql, $arguments = null, $one = false)
 {
     return DataManager::findBySQL($sql, $arguments, $one, TABLE_PREFIX . 'tax_rates', 'TaxRate');
 }