CMS  Version 3.9
APIContentManager Class Reference

Provides a central management class for event handlers and common functionality for the api component. More...

+ Inheritance diagram for APIContentManager:
+ Collaboration diagram for APIContentManager:

Public Member Functions

 getDefaultPage ($section)
 Returns the identifier for the default page in the section (i.e. More...
 
 getContent ($section, $identifier)
 Returns a SectionContent object for the specified section and identifier. More...
 
 sendContent ($section, $identifier)
 Renders and sends the specified content for the given section. More...
 
 getAdminView ($section)
 Factory method to build the view class for displaying and manipulating section content for the specified section. More...
 

Detailed Description

Provides a central management class for event handlers and common functionality for the api component.

Definition at line 97 of file api_manager.inc.

Member Function Documentation

◆ getAdminView()

APIContentManager::getAdminView (   $section)

Factory method to build the view class for displaying and manipulating section content for the specified section.

Parameters
unknown$section

Implements ISectionContentManager.

Definition at line 120 of file api_manager.inc.

121  {
122  return new APIContentAdminView($section);
123  }
$section
Definition: event_form.inc:44

◆ getContent()

APIContentManager::getContent (   $section,
  $identifier 
)

Returns a SectionContent object for the specified section and identifier.

Parameters
Section$section
string$identifier

Implements ISectionContentManager.

Definition at line 101 of file api_manager.inc.

102  {
103  // Create Mock SectionContent object
104  $content = new SectionContent();
105  $content->section_id = $section->section_id;
106  $content->identifier = $identifier;
107  return $content;
108  }
$identifier
Definition: rss.inc:37
if(array_key_exists("HTTP_IF_MODIFIED_SINCE", $_SERVER)) $content
Definition: styles.css.inc:24

◆ getDefaultPage()

APIContentManager::getDefaultPage (   $section)

Returns the identifier for the default page in the section (i.e.

the page that should be served when no identifier is specified).

Implements ISectionContentManager.

Definition at line 99 of file api_manager.inc.

99 { return $section->default_page; }

◆ sendContent()

APIContentManager::sendContent (   $section,
  $identifier 
)

Renders and sends the specified content for the given section.

Parameters
Section$section
string$identifier

Implements ISectionContentManager.

Definition at line 110 of file api_manager.inc.

111  {
112  if (!$identifier)
113  {
114  throw new FakoliException("Missing identifier");
115  }
116 
118  }
static dispatch($endpoint)
FakoliException is the base exception class for all Fakoli errors.
Definition: core.inc:53

The documentation for this class was generated from the following file: