addSource

addSource

ADVANCED / PREMIUM TRIAL

Inserts a source into the Word document.

Description
public addSource ( string $tag, string $type, array $author, array $info [, array $options = array()] )

This method allows to insert sources into a Word document.

Parameters

tag

Sets the tag name of a source, needed to add a citation.

type

Source type:

  • Art
  • ArticleInAPeriodical
  • Book
  • BookSection
  • Case
  • ConferenceProceedings
  • DocumentFromInternetSite
  • ElectronicSource
  • Film
  • InternetSite
  • Interview
  • JournalArticle
  • Misc
  • Patent
  • Performance
  • Report
  • SoundRecording

author

  • Author
  • Editor
  • Translator

info

Source information:

  • AbbreviatedCaseNumber
  • AlbumTitle
  • BookTitle
  • Broadcaster
  • BroadcastTitle
  • CaseNumber
  • ChapterNumber
  • City
  • Comments
  • ConferenceName
  • CountryRegion
  • Court
  • Day
  • DayAccessed
  • Department
  • Distributor
  • Edition
  • Institution
  • InternetSiteTitle
  • Issue
  • JournalName
  • LCID
  • Medium
  • Month
  • MonthAccessed
  • NumberVolumes
  • Pages
  • PatentNumber
  • PeriodicalTitle
  • ProductionCompany
  • PublicationTitle
  • Publisher
  • RecordingNumber
  • RefOrder
  • Reporter
  • ShortTitle
  • StandardNumber
  • StateProvince
  • Station
  • Theater
  • ThesisType
  • Title
  • Type
  • URL
  • Version
  • Volume
  • Year
  • YearAccessed
Exceptions

Method not available.

Code samples

Example #1

The resulting Word document looks like:

Release notes
  • phpdocx 12.0:
    • new method.