Beispiel #1
0
 /**
  * Returns an array of user defined Plex library sections that can be used
  * to interact with th eitems contained within.
  *
  * @uses Plex_MachineAbstract::$name
  * @uses Plex_MachineAbstract::$address
  * @uses Plex_MachineAbstract::$port
  * @uses Plex_MachineAbstract::makeCall()
  * @uses Plex_Server_Library::ENDPOINT_SECTION
  * @uses Plex_Server_Library::buildUrl()
  * @uses Plex_Server_Library_SectionAbstract::factory()
  * @uses Plex_Server_Library_SectionAbstract::setAttributes()
  *
  * @return Plex_Server_Library_Section[] An array of user defined Plex
  * library sections.
  */
 public function getSections()
 {
     $sections = array();
     $sectionArray = $this->makeCall($this->buildUrl(self::ENDPOINT_SECTION));
     foreach ($sectionArray as $attribute) {
         $section = Plex_Server_Library_SectionAbstract::factory($attribute['type'], $this->name, $this->address, $this->port);
         $section->setAttributes($attribute);
         $sections[] = $section;
     }
     return $sections;
 }