/**
  * @see ProjectTemplateInterface::get_status_attributes()
  * @param integer $status_id
  * @return array
  */
 public function get_status_attributes($status_id)
 {
     if ($this->project_template and $this->project_template_id and is_numeric($status_id)) {
         $oldl = new Oldl($this->project_template->get_template_id());
         $xml_array = $oldl->get_cutted_xml_array("body");
         $return_array = array();
         $counter = 0;
         $in_status = false;
         foreach ($xml_array as $key => $value) {
             $value[0] = trim(strtolower($value[0]));
             $value[1] = trim(strtolower($value[1]));
             $value[2] = trim(strtolower($value[2]));
             if ($value[1] == "status" and $value[3]['id'] == $status_id and $value[3]['id'] != "#" and $value[3]['type'] != "#") {
                 if ($value[3]['id']) {
                     $return_array['id'] = $value[3]['id'];
                 }
                 if ($value[3]['requirement']) {
                     $return_array['requirement'] = $value[3]['requirement'];
                 }
             }
         }
         return $return_array;
     } else {
         return null;
     }
 }
 /**
  * @see SampleTemplateInterface::get_requirements()
  * @return array
  */
 public function get_requirements()
 {
     if ($this->sample_template and $this->sample_template_id) {
         $oldl = new Oldl($this->sample_template->get_template_id());
         $xml_array = $oldl->get_cutted_xml_array("body");
         $return_array = array();
         $counter = 0;
         $in_status = false;
         if (is_array($xml_array) and count($xml_array) >= 1) {
             foreach ($xml_array as $key => $value) {
                 $value[0] = trim(strtolower($value[0]));
                 $value[1] = trim(strtolower($value[1]));
                 $value[2] = trim(strtolower($value[2]));
                 if ($value[3]['id'] != "#" and $value[3]['type'] != "#") {
                     $return_array[$counter] = $value[3];
                     $return_array[$counter]['xml_element'] = $value[1];
                     $counter++;
                 } else {
                     $return_array[$counter]['xml_element'] = $value[1];
                     $return_array[$counter]['close'] = "1";
                     $counter++;
                 }
             }
         } else {
             $return_array = array();
         }
         return $return_array;
     } else {
         return null;
     }
 }