clearFusionCMS 3.0.0
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • clearFusionCMS
    • module
      • cloudflare
      • comments
      • content
      • forms
      • members
      • search
  • fusionLib
  • None

Classes

  • _flFormGroup
  • _flUtf8Base
  • flAcMgr
  • flApiDbInstaller
  • flApiKeyMgr
  • flApiServer
  • flApiService
  • flApp
  • flAuthTOTP
  • flBufferCode
  • flBufferCss
  • flBufferJs
  • flCache
  • flCacheAPC
  • flCacheDb
  • flCacheDbInstaller
  • flCacheDummy
  • flCacheFile
  • flCacheFunction
  • flCacheMemcache
  • flCacheMemcached
  • flCacheOutput
  • flCacheRedis
  • flCacheSqlite
  • flConfig
  • flConfigDb
  • flConfigDbInstaller
  • flConfigFile
  • flConfigIni
  • flController
  • flControllerAction
  • flDate
  • flDateTzMenu
  • flDb
  • flDbInstaller
  • flDbInstallerInterface
  • flDbMySQL
  • flDbMySQLi
  • flDbMySQLiResult
  • flDbMySQLResult
  • flDbNestedSet
  • flDbResult
  • flDbSQLite
  • flDbSQLite3
  • flDbSQLite3Result
  • flDbSQLiteResult
  • flEmail
  • flEvent
  • flEventDbInstaller
  • flEventManager
  • flExceptionErrorController
  • flExceptionReporter
  • flForm
  • flFormBuilder
  • flFormDecorator
  • flFormDecoratorDl
  • flFormDecoratorDtDd
  • flFormDecoratorFieldset
  • flFormDecoratorForm
  • flFormDecoratorLi
  • flFormDecoratorList
  • flFormDecoratorUl
  • flFormElement
  • flFormElementButton
  • flFormElementCheckbox
  • flFormElementChecklist
  • flFormElementEmail
  • flFormElementFile
  • flFormElementHidden
  • flFormElementImage
  • flFormElementInteger
  • flFormElementNumber
  • flFormElementPane
  • flFormElementPassword
  • flFormElementRadio
  • flFormElementRecaptcha
  • flFormElementSearch
  • flFormElementSelect
  • flFormElementSubmit
  • flFormElementText
  • flFormElementTextArea
  • flFormElementTextSuggest
  • flFormElementUri
  • flFormElementWYSIWYG
  • flFormValidator
  • flFormValidatorAttribMax
  • flFormValidatorAttribMin
  • flFormValidatorCustomJS
  • flFormValidatorEmail
  • flFormValidatorEquals
  • flFormValidatorInteger
  • flFormValidatorMax
  • flFormValidatorMaxChecklist
  • flFormValidatorMaxLength
  • flFormValidatorMin
  • flFormValidatorMinChecklist
  • flFormValidatorMinLength
  • flFormValidatorMultiEmail
  • flFormValidatorNotEquals
  • flFormValidatorNumber
  • flFormValidatorRegex
  • flFormValidatorRequired
  • flFormValidatorSameAs
  • flFormValidatorUri
  • flFtpClient
  • flGravatar
  • flHttpClient
  • flHttpClientCookie
  • flImage
  • flImageFilter
  • flImageFilterBrightness
  • flImageFilterColorize
  • flImageFilterContrast
  • flImageFilterEdgeDetect
  • flImageFilterEmboss
  • flImageFilterGaussianBlur
  • flImageFilterGrayscale
  • flImageFilterMeanRemoval
  • flImageFilterNegative
  • flImageFilterPixelate
  • flImageFilterSelectiveBlur
  • flImageFilterSepia
  • flImageFilterSepia2
  • flImageFilterSmooth
  • flIntegrity
  • flKeygen
  • flLog
  • flLogHandlerChrome
  • flLogHandlerLoggly
  • flLogHandlerPapertrail
  • flLogHandlerSlack
  • flMimeTypes
  • flModuleDbInstaller
  • flModuleMgr
  • flRegistry
  • flRequest
  • flRequestDbInstaller
  • flRequestThrottle
  • flResponse
  • flRouter
  • flRouterRoute
  • flRssChannel
  • flRssClient
  • flRssItem
  • flSearch
  • flSearchIndexer
  • flSearchManager
  • flSearchResults
  • flSearchTags
  • flSession
  • flSessionData
  • flSessionDb
  • flSessionDbInstaller
  • flSessionFile
  • flSessionMemcache
  • flSessionMemcached
  • flSessionRedis
  • flTemplateDbInstaller
  • flTemplateEngine
  • flTemplateManager
  • flTextHTML
  • flTextSplitWords
  • flTextStemmer
  • flTextStemmerEn
  • flTextStrip
  • flTimer
  • flUri
  • flUser
  • flUserAdapter
  • flUserAdapterRemote
  • flUserDbInstaller
  • flUserMgr
  • flUserPwdGen
  • flUserServerApiV1
  • flUtf8
  • flUuid
  • flVariables
  • flVariablesDbInstaller
  • flWidgetBreadcrumb
  • flWidgetFloatingActionMenu
  • flWidgetPagination
  • flWidgetTable
  • flWidgetTabs
  • flWidgetToolbar
  • flWidgetTreeChildNode
  • flWidgetTreeLinkNode
  • flWidgetTreeNode
  • flWidgetTreeView
  • fusionLib

Interfaces

  • flFormElementWYSIWYGCodeInterface
  • flFormElementWYSIWYGInterface
  • flFormElementWYSIWYGTransformInterface
  • flLogHandler
  • flModuleInstallInterface

Exceptions

  • flAcException
  • flAppException
  • flCacheException
  • flConfigException
  • flDateException
  • flDbException
  • flEventException
  • flException
  • flExceptionBadRequest
  • flExceptionForbidden
  • flExceptionLoadClass
  • flExceptionNotFound
  • flExceptionPHP
  • flFormException
  • flHttpClientException
  • flImageException
  • flRegistryException
  • flRequestThrottleException
  • flRouterException
  • flSessionException
  • flTemplateEngineException
  • flUserException
  • flVariablesException
  • flWidgetException

Functions

  • __
  • __noop
  • _flErrorHandler
  • _n
  • _n_noop

Class flDbNestedSet

flDbNestedSet Class

Class to implement nested set within the database.

Direct known subclasses

cfContent

Package: fusionLib
Copyright: Copyright (c) 2008 - 2016 fusionLib. All rights reserved.
Located at system/libs/Db/flDbNestedSet.php

Methods summary

public
# __construct( flDb $db, string $table, string $idField = 'id' )

Construct the object.

Construct the object.

Parameters

$db
The database object.
$table
The name of the table.
$idField
The name of the ID field.
public
# lock( )

Lock the table.

Lock the table.

public
# unlock( )

Unlock the table.

Unlock the table.

public integer
# insertNode( integer $id, enum $where, array $data = array() )

Insert a new child node before or after the given node.

Insert a new child node before or after the given node.

Parameters

$id
The node to insert the child before or after.
$where
One of BEFORE, AFTER or UNDER.
$data
Array of name => value pairs of the field data to set.

Returns

integer
ID of the new node or false if not added.
public
# deleteNode( integer $id )

Delete the node and all child nodes.

Delete the node and all child nodes.

Parameters

$id
The ID of the node to delete.
public boolean
# moveNode( integer $id, integer $nodeId, enum $where )

Move a node before/after another node.

Move a node before/after another node.

Parameters

$id
The ID of the node to move.
$nodeId
The ID of the node to move before/after or make the parent of $id.
$where
One of BEFORE, AFTER or UNDER.

Returns

boolean
true of the node was moved; else false.
public boolean
# updateNodeData( integer $id, array $data )

Update the node data.

Update the node data.

Parameters

$id
The ID of the node to update.
$data
The name => value pairs of the data to update

Returns

boolean
true of the data was updated; else false.
public array
# getNodeData( integer $id, array $fields = array('id') )

Get the node data.

Get the node data.

Parameters

$id
The ID of the node to get.
$fields
Fields to get.

Returns

array
The fields fetched from the node.
public integer
# getParent( integer $id )

Get the parent node.

Get the parent node.

Parameters

$id
ID of the node to get the parent of.

Returns

integer
The parent ID or false if the node doesn't exist.
public array
# getChildren( integer $id, array $fields = array('id'), integer $num = 0, boolean $leftToRight = true, integer $depth = 1, string $sortBy = 'lft' )

Get direct child nodes of the given node.

Get direct child nodes of the given node.

Parameters

$id
The ID of the node to get the children of.
$fields
Fields to get.
$num
The number of children to get or 0 for all.
$leftToRight
true to order nodes left to right or false to order right to left.
$depth
The maximum depth to descend to, 0 for unlimited.
$sortBy
The field to sort by.

Returns

array
The fields fetched from the child nodes.
public array
# getFirstChild( integer $id, array $fields = array('id') )

Get the first child node of a parent.

Get the first child node of a parent.

Parameters

$id
ID of parent to get the 1st child of.
$fields
Fields to get.

Returns

array
The fields fetched from the child.
public array
# getLastChild( integer $id, array $fields = array('id') )

Get the last child node of a parent.

Get the last child node of a parent.

Parameters

$id
ID of parent to get the last child of.
$fields
Fields to get.

Returns

array
The fields fetched from the child.
public array
# getChildAt( integer $id, integer $idx, array $fields = array('id') )

Get the nth child node.

Get the nth child node.

Parameters

$id
ID of the node to get the child from.
$idx
The zero based index of the child to get.
$fields
Fields to get.

Returns

array
The fields fetched from the child or null/false.
public array
# getPrevSibling( integer $id, array $fields = array('id') )

Get the nodes previous sibling.

Get the nodes previous sibling.

Parameters

$id
ID of parent to get the previous sibling of.
$fields
Fields to get.

Returns

array
The fields fetched from the child or null/false.
public array
# getNextSibling( integer $id, array $fields = array('id') )

Get the nodes next sibling.

Get the nodes next sibling.

Parameters

$id
ID of parent to get the next sibling of.
$fields
Fields to get.

Returns

array
The fields fetched from the child or null/false.
public integer
# getSize( integer $id, boolean $directOnly = false )

Get the number of nodes in the specified nodes subtree.

Get the number of nodes in the specified nodes subtree.

Parameters

$id
ID of the node to count from.
$directOnly
true if counting direct decedents.

Returns

integer
The number of nodes.
public integer
# getDepth( integer $id )

Get the depth of the node within the tree.

Get the depth of the node within the tree.

Parameters

$id
ID of the node to get the depth of.

Returns

integer
The depth, 1 being the top level.
public array
# getPath( integer $id, array $fields = array('id') )

Get the path from the root to a node.

Get the path from the root to a node.

Parameters

$id
ID of the node to get the path to.
$fields
Fields to get.

Returns

array
The fields for the nodes in the path or false if node not known.
public array
# getShortPath( integer $id, string $using = 'id' )

Get the short path from the root to a node.

Get the short path from the root to a node.

Parameters

$id
ID of the node to get the path to.
$using
The field to return in the short path.

Returns

array
The short path root, node or false if node not known.
public array
# getByPath( string|array $path, string $using, array $fields = array('id'), boolean $useWholePath = true, string $pathField = 'childpath' )

Get a node based on the path from the root.

Get a node based on the path from the root.

Parameters

$path
The path to the node either an array or a / seperated string of nodes.
$using
The name of the field to use in the search.
$fields
Fields to get.
$useWholePath
true if the whole path must be used, false to get deepest matching node.
$pathField
Name of the filed to return holding unused path segments.

Returns

array
The fields fetched or null if not found.
public array
# getByShortPath( string|array $path, string $using, array $fields = array('id') )

Get a node based on it's identifier but under a given root node.

Get a node based on it's identifier but under a given root node.

Parameters

$path
The path to the node formatted as root:node, or array(root,node)
$using
The name of the field to use in the search.
$fields
Fields to get.

Returns

array
The fields fetched or false if not found.

Constants summary

integer BEFORE

Locations.

Locations.

# 0
integer AFTER
# 1
integer UNDER
# 2

Properties summary

protected flDb $db

The database object to use.

The database object to use.

#
protected string $table

The database table name.

The database table name.

#
protected integer $lockCount

The lock count.

The lock count.

# 0
protected string $idField

The name of the ID field.

The name of the ID field.

#
clearFusionCMS 3.0.0 API documentation generated by ApiGen