2

我一直在使用 ProjectPier,并找到了如下所示的数组。如何使用 PHP 阅读此架构?

ApplicationLog Object
(
[is_new:DataObject:private] => 
[is_deleted:DataObject:private] => 
[is_loaded:DataObject:private] => 1
[column_values:DataObject:private] => Array
    (
        [id] => 24
        [taken_by_id] => 1
        [project_id] => 2
        [rel_object_id] => 7
        [object_name] => screenshots
        [rel_object_manager] => ProjectFolders
        [created_on] => DateTimeValue Object
            (
                [timestamp:DateTimeValue:private] => 1264869022
                [day:DateTimeValue:private] => 30
                [month:DateTimeValue:private] => 1
                [year:DateTimeValue:private] => 2010
                [hour:DateTimeValue:private] => 16
                [minute:DateTimeValue:private] => 30
                [second:DateTimeValue:private] => 22
            )

        [created_by_id] => 1
        [action] => add
        [is_private] => 
        [is_silent] => 
    )
4

1 回答 1

3

我下载了 ProjectPier 并搜索了 ApplicationLog 类(application/models/application_logs/ApplicationLog.class.php 和 application/models/application_logs/base/BaseApplicationLog.class.php)

它为您提供了各种 getter(和 setter):

function getTakenBy()
function getTakenByDisplayName() 
function getProject()
function getText() 
function getObject() 
function getObjectUrl() 
function getObjectTypeName()
function getId()
function getTakenById()
function getProjectId()
function getRelObjectId() 
function getObjectName() 
function getRelObjectManager()
function getCreatedOn() 
function getCreatedById()
function getAction() 
function getIsPrivate()
function getIsSilent()
function manager() 

您可以通过 访问column_values['id']例如$applicationLog->getId()

于 2010-01-30T19:15:33.823 回答