-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProfile.php
43 lines (34 loc) · 1.05 KB
/
Profile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* Created by PhpStorm.
* User: bwalleshauser
* Date: 4/28/2015
* Time: 5:27 PM
*/
class Mainstreethost_GatorTraxBoatBuilder_Model_Json_Profile
extends Mainstreethost_GatorTraxBoatBuilder_Model_Json_Abstract
implements Mainstreethost_GatorTraxBoatBuilder_Model_Json_IAutojson
{
private $id;
private $name;
private $configurations;
public function __construct()
{
$this->configurations = array();
}
public function Hydrate($profile)
{
$this->id = (int)$profile->getProfileId();
$this->name = Mage::helper('gator')->GetAttributeValueById($profile->getProfileAttributeValueId());
$configurations = Mage::getModel('pc/configuration')->LoadByProfileId($profile->getProfileId());
foreach ($configurations as $configuration)
{
array_push($this->configurations,Mage::getModel('gator/Json_Configuration')->Hydrate($configuration));
}
return $this;
}
public function get($member)
{
return $this->$member;
}
}