定制 booellean/apa-formatter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

booellean/apa-formatter

Composer 安装命令:

composer require booellean/apa-formatter

包简介

A set of functions that will build a publication into formatted html

README 文档

README

This package is for formatting publications and research grants into APA formatted html. This package has prebuilt functions to format your publication, or individual functions to pass to create an APA format with more customality.

List of Primary Functions

  • apaFormatBookChapter()
  • apaFormatBookEntry()
  • apaFormatBookReview()
  • apaFormatConferencePaper()
  • apaFormatDissertationOrThesis()
  • apaFormatEditorial()
  • apaFormatForeword()
  • apaFormatJournalEntry()
  • apaFormatReport()
  • apaFormatSoftware()
  • apaFormatVideoGame()
  • apaFormatVideoSeries()
  • apaFormatWebProject()
  • apaFormatResearchBrief()
  • apaFormatDefaultItem()

To Keep this README manageable, please look in trait code for examples of what types of publications should be used with which function. The Code has very in depth comments about this.

List of Secondary Functions

Sometimes we want to do special formatting (i.e. hyperlinking a book name) for our APA formatted entry. In that case, use the secondary building functions to create a custom entry.

  • apaStructureAuthors() - Outputs author string from Array
  • apaAddIfElseCharacter() - Very specialized Shorthad logic. Sometimes we need a comma, sometimes we don't. We can pass values here to check that all exist before we output that character.
  • apaGetEdition() - Formats Edition of publication
  • apaGetEditors() - Outputs editors string from Array
  • apaGetPageNumbers() - Formats page numbers of publication
  • apaGetPublishing() - Sets up Publiching info from the city/state and publisher passed
  • apaGetSecondaryTitle() - Outputs a chapter entry or journal name if secondary title is present
  • apaGetTitle() - Get Title as emphasized html for publication
  • apaGetType() - Formats type of publication if present
  • apaGetUrl() - Formats an anchor tag with url if present
  • apaGetVolumeAndIssue() - Formats Volume and Issue appropriately if none, some, or both are present
  • apaGetYear() - Returns year or properly formats that year is unknown

There are many examples in the Primary Functions' code that illustrate how these may be used in conjunction

Example Publication Array

A Publication is an array passed. Not every publication will have the following properties, but this is a complete list of probably properties for a publication array:

        $pub = [
            'authors' => [
                [
                    'last_name' => 'Isaka',
                    'first_name' => 'Kotaro',
                    'middle_name' => ''
                ],
                [
                    'last_name' => 'Hayashi',
                    'first_name' => 'Tamio',
                    'middle_name' => ''
                ]
            ],
            'conf_city_state' => 'New York, NY',
            'editors' => [
                [
                    'last_name' => 'Oohata',
                    'first_name' => 'Eisuke',
                    'middle_name' => ''
                ]
            ],
            'issue' => 6,
            'page_number' => '320',
            'pub_city_state' => 'New York, NY',
            'publication' => 'Fisshū Sutōrī',
            'publisher' => 'New York Asian Film Festival',
            'status' => 'Published',
            'title' => 'Fish Story',
            'title_secondary' => 'The Story of My Life if My Life Were a Fish',
            'type' => 'Movie',
            'url' => 'https://en.wikipedia.org/wiki/Fish_Story_(film)',
            'volume' => 1,
            'year_published' => 2009,

Note: Unfortunately, with our limited information, this trait does not support fields for a Publisher Platform or DOI:DOI Number.

统计信息

  • 总下载量: 1.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固