Squiz Matrix
4.12.2
|
Public Member Functions | |
__construct ($assetid=0) | |
create (Array &$link) | |
_getAllowedLinks () | |
canClone () | |
getLogs () | |
getLogSettings ($logname) | |
& | getLogLine ($logname, $rotation_index=NULL, $offset=0) |
getLogSize ($logname, $rotation_index=NULL) | |
getLogIterator ($logname, $rotation_index=NULL) | |
rotateLogs () | |
rotateLog ($logname, &$log_data) | |
getCommunicatorUrl () | |
paintBackend (Backend_Outputter $o) | |
Public Member Functions inherited from Asset | |
Asset ($assetid=0) | |
create (Array &$link) | |
load ($assetid) | |
_loadDataPaths () | |
reload () | |
canDelete () | |
delete ($release_lock=TRUE, $check_locked=TRUE) | |
useSystemVersion () | |
loadSystemVersion () | |
saveSystemVersion () | |
clearSystemVersion () | |
revertToSystemVersion () | |
revertNoticeLinksToSystemVersion () | |
_updated ($update_parents=TRUE) | |
type () | |
getTypeAncestors ($include_asset=TRUE) | |
incrementVersion ($number='micro', $update_parents=TRUE) | |
getLanguages () | |
setLanguages (Array $languages) | |
setCharset ($charset) | |
setForceSecure ($force_secure) | |
remapAssetids (Array $map) | |
morph ($new_type_code) | |
_morphCleanup ($new_type_code) | |
onRequestKeywords (Asset $broadcaster, Array $vars=Array()) | |
canClone () | |
cloneComponents (Asset $clone, Array $components, $override=FALSE) | |
cloneComponentsAdditional (Asset $clone, Array $components) | |
cloneLinks (Asset $clone) | |
getStatus () | |
getAvailableStatii () | |
getStatusDescription () | |
processStatusChange ($new_status, $update_parents=TRUE, $run_updated=TRUE) | |
setDate ($date_type, $time=NULL, $userid=NULL) | |
lockTypes () | |
canForceablyAcquireLock ($lock_type) | |
getEditingLocks ($keywords) | |
_getAllowedLinks () | |
createLink (Asset $minor, $link_type, $value='', $sort_order=NULL, $dependant='0', $exclusive='0', $moving=FALSE, $locked=0) | |
prepareLink (Asset $asset, $side_of_link, &$link_type, &$value, &$sort_order, &$dependant, &$exclusive) | |
canCreateLink (Asset $minor, $link_type, $exclusive) | |
canMoveLink (Asset $minor, Asset $old_major, $link_type) | |
describeLink ($linkid) | |
isDeletableLink ($linkid) | |
canDeleteLink ($linkid) | |
deleteLink ($linkid, $check_locked=TRUE) | |
linksUpdated () | |
canCloneLink () | |
saveAttributes ($dont_run_updated=FALSE, $log_message=TRUE) | |
setAttrValue ($name, $value) | |
attr ($name) | |
& | attrByRef ($name) |
getAttribute ($name, $mute_errors=FALSE) | |
getAssetKeywords ($descriptions=FALSE) | |
getAvailableKeywords () | |
getKeywordReplacement ($keyword) | |
getAssetWebPathKeywordReplacement () | |
getCustomKeywordReplacements ($keywords=Array(), $invoke_backend=FALSE) | |
processCustomKeywords ($keywords=Array()) | |
getContent () | |
setContent () | |
getEffectiveLastUpdatedTime ($assetids) | |
readAccess (Array $assetids=Array()) | |
writeAccess ($lock_type='', Array $assetids=Array(), $only_workflow=TRUE) | |
adminAccess ($lock_type='', Array $assetids=Array()) | |
backendAccess () | |
liveEditAccess ($lock_type) | |
canliveEdit ($lock_type) | |
effectiveUnrestricted () | |
checkAccess ($perm, $lock_type, Array $assetids=Array(), $only_workflow=TRUE) | |
accessEffective () | |
permissionsUpdated () | |
printFrontend () | |
printFrontendAsset (Asset $asset, $design=NULL) | |
getValidProtocols () | |
printHead () | |
printBody () | |
getCurrentPaintLayoutName () | |
getCurrentDesignName () | |
printBodyWithPaintLayout ($layout_id='') | |
initLimbo () | |
printLimbo () | |
paintBackend (Backend_Outputter $o) | |
getPrefix () | |
processBackend (Backend_Outputter $o, Array &$link) | |
getEI () | |
getEditFns () | |
getBackendHref ($screen='', $backend_page=TRUE) | |
getURL ($base_url=NULL, $ignore_rollback=FALSE, $base_contextid=NULL) | |
getURLs () | |
getHref ($base_url=NULL, $ignore_rollback=FALSE) | |
getWebDataPath () | |
getWebPaths () | |
saveWebPaths ($paths, $auto_add_remaps=TRUE) | |
getLookups ($field='') | |
getDesignLookups () | |
getLookupValues ($inherited=NULL, $prefix='', $like_search=TRUE, $ignore_override=FALSE) | |
deleteLookupValue ($layout_name, $layout_value) | |
setPaintLayouts ($layouts) | |
updateLookups ($auto_add_remaps=TRUE) | |
setLookupValues (Array $values) | |
getAssetStatusDescriptionKeywordReplacement () | |
getAssetStatusColourKeywordReplacement () | |
replaceKeywordsInString ($string) | |
fastTrack ($tasks) | |
unFastTrack ($tasks) | |
shouldFastTrack ($task, $assetid=NULL) | |
getFaskTrackedTaskAssetids ($task) | |
getDependantParentsURL () | |
Public Member Functions inherited from MySource_Object | |
MySource_Object () | |
__sleep () | |
__wakeup () | |
Protected Member Functions | |
_getName ($short_name=FALSE) | |
_getLogPrefixFromFileName ($file) | |
_setLogDefaults ($log=Array()) | |
_decodeLine ($line) | |
_readLineFromFile ($file, $offset=0) | |
_getFileSize ($file) | |
_rotateLogFiles ($file, $current_rotation, $new_rotation) | |
_directCommunicator () | |
Protected Member Functions inherited from Asset | |
_preCreateCheck (Array &$link) | |
_createAdditional (Array &$link) | |
_abortCreate ($trigger_level_changed=FALSE, $linkid=0) | |
_loadVars () | |
_getName ($short_name=FALSE, $contextid=NULL) | |
_getKeywordReplacement ($keyword) | |
_checkPermissionAccess ($perm, $assetids=Array(), $only_workflow=TRUE) | |
makeAndSaveInitialWebPath ($path, $parent_link=NULL) | |
Protected Attributes | |
$log_level_map | |
$min_tail_lines = 10 | |
Additional Inherited Members | |
Data Fields inherited from Asset | |
$id = 0 | |
$version = '' | |
$name = '' | |
$short_name = '' | |
$status | |
$languages = '' | |
$charset = '' | |
$force_secure = '0' | |
$created | |
$created_userid | |
$updated | |
$updated_userid | |
$published | |
$published_userid | |
$status_changed | |
$status_changed_userid | |
$_is_cacheable = FALSE | |
$vars = Array() | |
$_available_keywords = Array() | |
$data_path_suffix = '' | |
$data_path = '' | |
$data_path_public = '' | |
$_ser_attrs = FALSE | |
Definition at line 30 of file log_manager.inc.
__construct | ( | $assetid = 0 | ) |
Constructor
int | $assetid | the asset id to be loaded |
Definition at line 44 of file log_manager.inc.
|
protected |
Decodes a line after being read from a logfile
Returns an array in the following format:
Array( 'userid' => int, 'user' => string, 'date' => int, 'level' => int, 'data' => string|array, );
or FALSE if the metadata can't be decoded or the line is empty
string | $line | The line of raw data to decode |
Definition at line 333 of file log_manager.inc.
|
protected |
Direct Communicator
Performs the direct communication bypassing matrix interface
Get the absolute co-ordinates of an element
Object | elt The element to find the position of |
Scroll to the bottom of the page
Definition at line 664 of file log_manager.inc.
_getAllowedLinks | ( | ) |
Return an array of all the permitted link types, the type asset and the cardinality
Definition at line 98 of file log_manager.inc.
|
protected |
Returns the size (in bytes) of a particular file
string | $file | the file to read |
Definition at line 429 of file log_manager.inc.
|
protected |
Determines the prefix of a log by the filename
Returns FALSE if it can't work it out
string | $file | The filename to get the prefix from |
Definition at line 193 of file log_manager.inc.
|
protected |
Return a name to use to describe this instance of the asset
boolean | $short_name | whether or not we are after the shortname or the full name |
Definition at line 132 of file log_manager.inc.
|
protected |
Read a line starting from a particular offset, and return it along with the new offset
The returned array is in the format:
Array( 'line' => string // the line read from the file 'offset' => integer // the new offset }
string | $file | the logfile to read |
int | $offset | the offset from which the read will start, defaults to 0 |
Definition at line 392 of file log_manager.inc.
|
protected |
Rotate a logfile from the specified rotation index to the new rotation index. eg "$file.$current_index" to "$file.$new_rotation" if current_rotation is empty, we're trying to move 'file.log' for example to 'file.log.1' if it's not empty, we're moving 'file.log.1' to 'file.log.2'
string | $file | the logfile to rotate |
string | $current_rotation | the current rotation index |
string | $new_rotation | the new rotation index |
Definition at line 593 of file log_manager.inc.
|
protected |
Sets the default settings for 'logs', if they are not already set Returns the updated settings
array | $log | The array containing the settings for a particular log type, ie. $_vars['logs']['logname'] |
Definition at line 299 of file log_manager.inc.
canClone | ( | ) |
Return FALSE always because we don't want to be able to clone a log manager
Definition at line 116 of file log_manager.inc.
create | ( | Array & | $link | ) |
Create this asset
Returns either the linkid or FALSE on error
array | &$link | information used to create the initial link |
Definition at line 63 of file log_manager.inc.
getCommunicatorUrl | ( | ) |
Get URL of this asset for direct communication
Returns a backend URL of this asset that can service direct connections (ignoring backend frames)
Definition at line 623 of file log_manager.inc.
getLogIterator | ( | $logname, | |
$rotation_index = NULL |
|||
) |
Returns a reference to a new Log_Iterator that acts as a bridge between a log_report and the log_manager
string | $logname | the name of the log |
NULL | int | $rotation_index | the index of the log rotation |
Definition at line 280 of file log_manager.inc.
& getLogLine | ( | $logname, | |
$rotation_index = NULL , |
|||
$offset = 0 |
|||
) |
Returns a line from a specified logfile
string | $logname | the logfile prefix |
int | $rotation_index | optional, the rotation index of the past log to access |
int | $offset | start from this offset |
Definition at line 238 of file log_manager.inc.
getLogs | ( | ) |
Returns a list of all the logs and their details If an unregistered log is found in the log directory, this function will return it with default settings If no logs are found, an empty array will be returned
Logs are returned in the following format:
Array( logname => Array( rotation => Array( last_timestamp => int // unix time min_index => int // the smallest index a log rotation can have max_index => int // the largest index a log rotation can have interval => int // the number of seconds between rotations ), ), )
Definition at line 164 of file log_manager.inc.
getLogSettings | ( | $logname | ) |
Returns the settings for one log (or FALSE if it doesn't exist)
string | $logname | the name of the log |
Definition at line 213 of file log_manager.inc.
getLogSize | ( | $logname, | |
$rotation_index = NULL |
|||
) |
Returns the size of the log in bytes
string | $logname | the name of the log to get the size of |
NULL | int | $rotation_index | the index of the log rotation |
Definition at line 263 of file log_manager.inc.
paintBackend | ( | Backend_Outputter | $o | ) |
Backend Painter
Backend_Outputter | $o | the Backend Outputter class |
Definition at line 638 of file log_manager.inc.
rotateLog | ( | $logname, | |
& | $log_data | ||
) |
Rotates the specified log, modifies and returns the settings it was passed
string | $logname | the log to rotate |
string | &$log_data | the settings associated with the log |
Get an array of existing log filenames Saves doing file_exists checks inside the while loop below but does have small room for a race condition
Start at $max_index and work our way backwards. If the log exists, move it to the next name.
The max_index file is a special case the highest file just gets deleted, not moved. once we've dealt with the max_index case, skip to the next log to look at.
After moving the rest, move the original log file.
Definition at line 502 of file log_manager.inc.
rotateLogs | ( | ) |
Rotates all the logs in the system Returns a list of logs that were rotated
Definition at line 453 of file log_manager.inc.