Changeset 158 for Dev/trunk/classes/ApplicationConnector.php
- Timestamp:
- 11/18/11 11:07:07 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/ApplicationConnector.php
r149 r158 49 49 /** 50 50 * function get($arguments) 51 * Gets the array of Application objects belonging to arguments supplied.52 51 * @param type $arguments : An array containing zero or more of the following keys: 53 * 52 * 'uid', 'title', 'description', 'style' 54 53 */ 55 54 public function get($arguments) { … … 58 57 $keys = array_keys($arguments); 59 58 //Set default values for arguments 60 $uid = " ?uid"; $title = "?title"; $description = "?description"; $style = "?style";59 $uid = ""; $title = ""; $description = ""; $style = ""; 61 60 //Set the arguments if they are supplied 62 61 if(in_array("uid", $keys)) 63 $uid = " \"".$arguments["uid"]."\"";62 $uid = "predicates:uid \"".$arguments["uid"]."\""; 64 63 if(in_array("title", $keys)) 65 $title = ' \''.$arguments["title"].'\'';64 $title = 'predicates:title \''.$arguments["title"].'\''; 66 65 if(in_array("description", $keys)) 67 $description = " \"".$arguments["description"]."\"";66 $description = "predicates:description \"".$arguments["description"]."\""; 68 67 if(in_array("style", $keys)) 69 $style = " \"".$arguments["style"]."\"";68 $style = "predicates:style \"".$arguments["style"]."\""; 70 69 71 70 //Create the querystring … … 80 79 predicates:title ?title ; 81 80 predicates:description ?description ; 82 predicates:style ?style ; 83 predicates:uid ' . $uid . ' 84 predicates:title ' . $title . ' 85 predicates:description ' . $description . ' 86 predicates:style ' . $style . ' 81 predicates:style ?style ; ' 82 . $uid . $title . $description . $style . ' 87 83 }'; 88 84 … … 135 131 $this->model->add(new Statement($resourceApplication,$predicateStyle,$applicationStyle)); 136 132 137 $this->save();133 $this->save(); 138 134 } 139 135 }
Note: See TracChangeset
for help on using the changeset viewer.