From 5797efa2630cd5bae1b6f9ae9200284abfaf66cb Mon Sep 17 00:00:00 2001 From: Gus King Date: Sat, 25 Jan 2014 22:17:17 -0500 Subject: [PATCH] Documented magic properties of DataObject --- filesystem/File.php | 12 ++++++++++++ model/DataObject.php | 5 +++++ security/Group.php | 14 ++++++++++++++ security/LoginAttempt.php | 8 ++++++++ security/Member.php | 18 ++++++++++++++++++ security/MemberPassword.php | 8 ++++++++ security/Permission.php | 8 ++++++++ security/PermissionRole.php | 6 ++++++ security/PermissionRoleCode.php | 6 ++++++ 9 files changed, 85 insertions(+) diff --git a/filesystem/File.php b/filesystem/File.php index f2ea6d625..d88f00af1 100644 --- a/filesystem/File.php +++ b/filesystem/File.php @@ -61,6 +61,18 @@ * * @package framework * @subpackage filesystem + * + * @property string Name Basename of the file + * @property string Title Title of the file + * @property string Filename Filename including path + * @property string Content + * @property string ShowInSearch Boolean that indicates if file is shown in search. Doesn't apply to Folder + * + * @property int ParentID ID of parent File/Folder + * @property int OwnerID ID of Member who owns the file + * + * @method File Parent() Returns parent File + * @method Member Owner() Returns Member object of file owner. */ class File extends DataObject { diff --git a/model/DataObject.php b/model/DataObject.php index fa0029e8c..9cbabbf02 100644 --- a/model/DataObject.php +++ b/model/DataObject.php @@ -65,6 +65,11 @@ * * @package framework * @subpackage model + * + * @property integer ID ID of the DataObject, 0 if the DataObject doesn't exist in database. + * @property string ClassName Class name of the DataObject + * @property string LastEdited Date and time of DataObject's last modification. + * @property string Created Date and time of DataObject creation. */ class DataObject extends ViewableData implements DataObjectInterface, i18nEntityProvider { diff --git a/security/Group.php b/security/Group.php index 65d4a48bc..eba1e1dbb 100755 --- a/security/Group.php +++ b/security/Group.php @@ -4,6 +4,20 @@ * * @package framework * @subpackage security + * + * @property string Title Name of the group + * @property string Description Description of the group + * @property string Code Group code + * @property string Locked Boolean indicating whether group is locked in security panel + * @property int Sort + * @property string HtmlEditorConfig + * + * @property int ParentID ID of parent group + * + * @method Group Parent() Return parent group + * @method HasManyList Permissions() List of group permissions + * @method HasManyList Groups() List of child groups + * @method ManyManyList Roles() List of PermissionRoles */ class Group extends DataObject { diff --git a/security/LoginAttempt.php b/security/LoginAttempt.php index 5d39350fe..43c4917bc 100644 --- a/security/LoginAttempt.php +++ b/security/LoginAttempt.php @@ -11,6 +11,14 @@ * * @package framework * @subpackage security + * + * @property string Email Email address used for login attempt + * @property string Status Status of the login attempt, either 'Success' or 'Failure' + * @property string IP IP address of user attempting to login + * + * @property int MemberID ID of the Member, only if Member with Email exists + * + * @method Member Member() Member object of the user trying to log in, only if Member with Email exists */ class LoginAttempt extends DataObject { diff --git a/security/Member.php b/security/Member.php index cb16a8632..966af2b7e 100644 --- a/security/Member.php +++ b/security/Member.php @@ -4,6 +4,24 @@ * * @package framework * @subpackage security + * + * @property string FirstName + * @property string Surname + * @property string Email + * @property string Password + * @property string RememberLoginHash + * @property int NumVisit + * @property string LastVisited Date and time of last visit + * @property string AutoLoginHash + * @property string AutoLoginExpired + * @property string PasswordEncryption + * @property string Salt + * @property string PasswordExpiry + * @property string LockedOutUntil + * @property string Locale + * @property int FailedLoginCount + * @property string DateFormat + * @property string TimeFormat */ class Member extends DataObject implements TemplateGlobalProvider { diff --git a/security/MemberPassword.php b/security/MemberPassword.php index 95b4256dd..f6b4e3bf4 100644 --- a/security/MemberPassword.php +++ b/security/MemberPassword.php @@ -3,6 +3,14 @@ * Keep track of users' previous passwords, so that we can check that new passwords aren't changed back to old ones. * @package framework * @subpackage security + * + * @property string Password + * @property string Salt + * @property string PasswordEncryption + * + * @property int MemberID ID of the Member + * + * @method Member Member() Owner of the password */ class MemberPassword extends DataObject { private static $db = array( diff --git a/security/Permission.php b/security/Permission.php index fa62cf15c..deb79111d 100644 --- a/security/Permission.php +++ b/security/Permission.php @@ -3,6 +3,14 @@ * Represents a permission assigned to a group. * @package framework * @subpackage security + * + * @property string Code + * @property int Arg + * @property int Type + * + * @property int GroupID + * + * @method Group Group() */ class Permission extends DataObject implements TemplateGlobalProvider { diff --git a/security/PermissionRole.php b/security/PermissionRole.php index f0775c691..e9e9c77cd 100644 --- a/security/PermissionRole.php +++ b/security/PermissionRole.php @@ -12,6 +12,12 @@ * * @package framework * @subpackage security + * + * @property string Title + * @property string OnlyAdminCanApply + * + * @method HasManyList Codes() List of PermissionRoleCode objects + * @method ManyManyList Groups() List of Group objects */ class PermissionRole extends DataObject { private static $db = array( diff --git a/security/PermissionRoleCode.php b/security/PermissionRoleCode.php index ffd911839..71afdfc88 100644 --- a/security/PermissionRoleCode.php +++ b/security/PermissionRoleCode.php @@ -4,6 +4,12 @@ * * @package framework * @subpackage security + * + * @property string Code + * + * @property int RoleID + * + * @method PermissionRole Role() */ class PermissionRoleCode extends DataObject { private static $db = array(