0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-19 17:42:14 +02:00

Simplify phpdocs generation

This commit is contained in:
Marcus Bointon 2016-05-01 17:30:19 +02:00
parent da739aa763
commit 9b784d23b0
5 changed files with 24 additions and 13 deletions

4
.gitignore vendored
View File

@ -1,7 +1,7 @@
docs/phpdoc/
docs/
!docs/README.md
test/message.txt
test/testbootstrap.php
*.pem
.idea
build/
vendor/

View File

@ -1,6 +1,6 @@
# PHPMailer Documentation
Pre-built PHPMailer API documentation is not provided with the PHP classes, but you can generate API documentation by running the `generatedocs.sh` shell script in this folder. You will need to have [phpDocumentor](https://www.phpdoc.org) installed. This documentation is also [available online](http://phpmailer.github.io/PHPMailer/), though it may not be quite up to date or match your version.
Pre-built PHPMailer API documentation is not provided with the PHP classes, but you can generate API documentation by running `phpdoc` in the top-level folder of this project, and documentation will be generated in this folder. You will need to have [phpDocumentor](https://www.phpdoc.org) installed. This documentation is also [available online](http://phpmailer.github.io/PHPMailer/), though it may not be quite up to date or match your version exactly. The configuration for phpdoc is in the [phpdoc.dist.xml file](https://github.com/PHPMailer/PHPMailer/blob/master/phpdoc.dist.xml).
Further help and information is available in [the PHPMailer README](https://github.com/PHPMailer/PHPMailer/blob/master/README.md), [the examples folder](https://github.com/PHPMailer/PHPMailer/tree/master/examples), and in [the GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki).

View File

@ -1,8 +0,0 @@
#!/bin/sh
# Regenerate PHPMailer documentation
# Run from within the docs folder
rm -rf phpdoc/*
phpdoc --directory ../src --target ./phpdoc --sourcecode --force --title PHPMailer --template="clean"
# You can merge regenerated docs into a separate docs working copy without messing up the git status like so:
# rsync -a --delete --exclude ".git" --exclude "phpdoc-cache-*/" --exclude "README.md" phpdoc/ ../../phpmailer-docs
# After updating docs, push/PR them to the phpmailer gh-pages branch: https://github.com/PHPMailer/PHPMailer/tree/gh-pages

20
phpdoc.dist.xml Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
<title>PHPMailer</title>
<parser>
<target>docs</target>
<encoding>utf8</encoding>
<markers>
<item>TODO</item>
</markers>
</parser>
<transformer>
<target>docs</target>
</transformer>
<transformations>
<template name="clean"/>
</transformations>
<files>
<directory>src</directory>
</files>
</phpdoc>

View File

@ -3800,8 +3800,7 @@ class PHPMailer
protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from)
{
if (!empty($this->action_function) and is_callable($this->action_function)) {
$params = [$isSent, $to, $cc, $bcc, $subject, $body, $from];
call_user_func_array($this->action_function, $params);
call_user_func_array($this->action_function, [$isSent, $to, $cc, $bcc, $subject, $body, $from]);
}
}