Overview
  • Namespace
  • Class

Namespaces

  • MatthiasWeb
    • RealMediaLibrary
      • api
      • attachment
      • base
      • comp
        • complexquery
      • folder
      • general
      • metadata
      • order
      • rest
      • usersettings
  • None

Classes

  • CountCache
  • CustomField
  • Filter
  • Permissions
  • Shortcut
  • Structure
  • Upload

Class CountCache

This class handles the count cache for the folder structure.

MatthiasWeb\RealMediaLibrary\base\Base
Extended by MatthiasWeb\RealMediaLibrary\attachment\CountCache
Namespace: MatthiasWeb\RealMediaLibrary\attachment
Located at attachment/CountCache.class.php

Methods summary

public
# updateCountCache( int[] $folders = null, int[] $attachments = null, boolean $onlyReturn = false )

Handle the count cache for the folders. This should avoid a lack SQL subquery which loads data from the posts table.

Handle the count cache for the folders. This should avoid a lack SQL subquery which loads data from the posts table.

Parameters

$folders
Array of folders ID, if null then all folders with cnt = NULL are updated
$attachments
Array of attachments ID, is merged with $folders if given
$onlyReturn
Set to true if you only want the SQL query

Returns

string Void or SQL query
public
# getSingleCountSql( )

Get the single SQL for the subquery of count getter.

Get the single SQL for the subquery of count getter.

Returns

string
public
# resetCountCache( integer $folderId = null )

Reset the count cache for the current blog id. The content of the array is not prepared for the statement

Reset the count cache for the current blog id. The content of the array is not prepared for the statement

Parameters

$folderId
Array If you pass folder id/ids array, only this one will be resetted.

Returns

CountCache
public
# resetCountCacheOnWpDie( integer $folderId )

Is fired with wp_die event.

Is fired with wp_die event.

Parameters

$folderId
The folder id
public
# wp_die( )

Update at the end of the script execution the count of the given added / deleted attachments.

Update at the end of the script execution the count of the given added / deleted attachments.

public
# addNewAttachment( integer $id )

Add an attachment to the update queue.

Add an attachment to the update queue.

Parameters

$id
The attachment id
public static
# getInstance( )

Methods inherited from MatthiasWeb\RealMediaLibrary\base\Base

debug(), getCore(), getTableName()

API documentation generated by ApiGen