[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Access/ -> Rules.php (summary)

Joomla! Content Management System

Copyright: (C) 2009 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 203 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Rules:: (8 methods):
  __construct()
  getData()
  mergeCollection()
  merge()
  mergeAction()
  allow()
  getAllowed()
  __toString()


Class: Rules  - X-Ref

Access rules class.

__construct($input = '')   X-Ref
Constructor.

The input array must be in the form: array('action' => array(-42 => true, 3 => true, 4 => false))
or an equivalent JSON encoded string, or an object where properties are arrays.

param: mixed  $input  A JSON format string (probably from the database) or a nested array.

getData()   X-Ref
Get the data for the action.

return: array  A named array of Rule objects.

mergeCollection($input)   X-Ref
Method to merge a collection of Rules.

param: mixed  $input  Rule or array of Rules
return: void

merge($actions)   X-Ref
Method to merge actions with this object.

param: mixed  $actions  Rule object, an array of actions or a JSON string array of actions.
return: void

mergeAction($action, $identities)   X-Ref
Merges an array of identities for an action.

param: string  $action      The name of the action.
param: array   $identities  An array of identities
return: void

allow($action, $identity)   X-Ref
Checks that an action can be performed by an identity.

The identity is an integer where +ve represents a user group,
and -ve represents a user.

param: string  $action    The name of the action.
param: mixed   $identity  An integer representing the identity, or an array of identities
return: mixed   Object or null if there is no information about the action.

getAllowed($identity)   X-Ref
Get the allowed actions for an identity.

param: mixed  $identity  An integer representing the identity or an array of identities
return: CMSObject  Allowed actions for the identity or identities

__toString()   X-Ref
Magic method to convert the object to JSON string representation.

return: string  JSON representation of the actions array



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer