public static function createRequest($url, $profile)
 {
     $request = new self();
     $request->setMaster(new IngestRequestMaster());
     $request->getMaster()->setUrl($url);
     $request->setProfile($profile);
     return $request;
 }
Example #2
0
 public static function detect()
 {
     $m = new self();
     $m->setUseragent(request::getUseragent(''));
     $m->setProfile(request::getHttpHeader('X-Wap-Profile', ''));
     //$m->setUseragent('NokiaN8-00/10.0.000 (Symbian/3; S60/5.2 Mozilla/5.0; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebkit/525 (KHTML, like Gecko) BrowserNG/7.2');
     //$m->setProfile('http://nds1.nds.nokia.com/uaprof/NN8-00r100-3G.xml');
     $m->dump();
 }
Example #3
0
 /**
  * Creates an instance with data
  *
  * @param  array $data
  * @return self
  */
 public static function create(array $data = array())
 {
     $defaults = array('id' => null, 'folder_id' => null, 'profile' => null, 'name' => null, 'date_created' => new DateTime(), 'status' => null, 'resource' => null, 'uuid' => null, 'data' => new IdentifiableDataContainer(array()));
     $data = array_merge($defaults, $data);
     $obj = new self();
     $obj->setId($data['id']);
     $obj->setFolderId($data['folder_id']);
     $obj->setProfile($data['profile']);
     $obj->setName($data['name']);
     $obj->setDateCreated($data['date_created']);
     $obj->setStatus($data['status']);
     $obj->setResource($data['resource']);
     $obj->setUuid($data['uuid']);
     $obj->setData($data['data']);
     return $obj;
 }