Lines Matching defs:attributes
148 * @param array $attributes Default attributes of the ou
151 public function create($attributes)
153 if (!is_array($attributes)){ return "Attributes must be an array"; }
154 if (!is_array($attributes["container"])) { return "Container attribute must be an array."; }
155 if (!array_key_exists("ou_name",$attributes)) { return "Missing compulsory field [ou_name]"; }
156 if (!array_key_exists("container",$attributes)) { return "Missing compulsory field [container]"; }
158 $attributes["container"] = array_reverse($attributes["container"]);
162 $add["OU"] = $attributes['ou_name'];
164 if (count($attributes['container']) > 0) {
165 $containers = "OU=" . implode(",OU=", $attributes["container"]) . ",";
168 $containers = "OU=" . implode(",OU=", $attributes["container"]);