CodeExplorer setCollectors example
/**
* @return Profile
*/
protected function createProfileFromData(string
$token, array
$data, Profile
$parent = null
) { $profile =
new Profile($token);
$profile->
setIp($data['ip'
]);
$profile->
setMethod($data['method'
]);
$profile->
setUrl($data['url'
]);
$profile->
setTime($data['time'
]);
$profile->
setStatusCode($data['status_code'
]);
$profile->
setCollectors($data['data'
]);
if (!
$parent &&
$data['parent'
]) { $parent =
$this->
read($data['parent'
]);
} if ($parent) { $profile->
setParent($parent);
} foreach ($data['children'
] as $token) { if (null !==
$childProfile =
$this->
doRead($token,
$profile)) { /**
* @return Profile
*/
protected function createProfileFromData(string
$token, array
$data, Profile
$parent = null
) { $profile =
new Profile($token);
$profile->
setIp($data['ip'
]);
$profile->
setMethod($data['method'
]);
$profile->
setUrl($data['url'
]);
$profile->
setTime($data['time'
]);
$profile->
setStatusCode($data['status_code'
]);
$profile->
setCollectors($data['data'
]);
if (!
$parent &&
$data['parent'
]) { $parent =
$this->
read($data['parent'
]);
} if ($parent) { $profile->
setParent($parent);
} foreach ($data['children'
] as $token) { if (null !==
$childProfile =
$this->
doRead($token,
$profile)) {