1
0
mirror of https://github.com/php/phd.git synced 2026-03-25 23:52:15 +01:00

21 Commits

Author SHA1 Message Date
lacatoire
f662181225 Fix deprecated null array offset usage in Reader_Partial 2026-02-03 18:35:36 +00:00
haszi
b80ae36dba Change property names to camel case 2024-12-29 19:58:10 +00:00
haszi
15284136ff Separate regular PhD output from error handling (#176)
- Move error handling code into a class and remove PhD message output handling from it.
- Introduce a new class to handle PhD message output.
- Make the implicit dependency on the output functionality of classes explicit.
- Update PEAR package.xml.
- Fix tests.
- Use proper variadic parameters
- Use class constants
- Use first-class callable syntax

---------

Co-authored-by: haszi <haszika80@gmail.com>
2024-11-10 17:57:05 +00:00
haszi
e817ea8c42 Refactor Partial Reader
Inject all dependencies in the constructor.
Add parameter and return type hints.
Remove unused variables.
Add test.
2024-04-16 11:13:06 +01:00
haszi
e5b8bf35a9 Remove file ending comment blocks (#92)
Co-authored-by: haszi <haszika80@gmail.com>
2024-02-08 12:46:21 +00:00
Peter Kokot
3564283891 Sync final newlines
This patch adds some missing newlines and trims multiple redundant
newlines into a single newline.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-02 06:23:33 +02:00
Sobak
aecae4e2c3 Eliminate $ comments 2015-03-09 06:20:39 +01:00
Hannes Magnusson
37a0e4268d WS :) 2012-06-09 17:33:56 +01:00
Hannes Magnusson
6fe84dbd58 Only index the stuff within the partial scope
# This takes rendering book.mysqli down to 7seconds (including indexing)
2011-04-24 09:58:39 +00:00
Hannes Magnusson
c34c7cb81b shave off few seconds when seeking for an chunk to render 2011-04-24 08:25:29 +00:00
Moacir de Oliveira Miranda Júnior
2ccdf38aec adding the partial rendering 2009-08-06 16:25:43 +00:00
Christian Weiske
ff5cc4ebcf Add namespace in (hopefully) every class. This is fully untested!
I probably confused Format_Legacy with Format in some files.
2009-06-19 21:48:54 +00:00
Christian Weiske
6b9b00257a WHITESPACE FRENZY! 2009-02-11 05:08:17 +00:00
Gwynne Raskind
ec1405a062 - Rewrote option parsing, allows the same code to be reused for multiple scripts
- Rewrote config option access, avoids globals
- Cleaned up error handler
- Color output is now on all three output streams if user selects for it
- --list option now glob()s the themes/ and formats/ directories
- Whitespace fix in chunkedhtml.php
2008-05-24 15:04:50 +00:00
Gwynne Raskind
868119845a revert my big commit 2008-05-24 14:49:14 +00:00
Gwynne Raskind
3e7102833c - Rewrote option parsing, allows the same code to be reused for multiple scripts
- Rewrote config option access, avoids globals
- Cleaned up error handler
- Color output is now on all three output streams if user selects for it
- --list option now glob()s the themes/ and formats/ directories
- Whitespace fix in chunkedhtml.php
2008-05-24 14:30:00 +00:00
Hannes Magnusson
044825e0d6 Improve error/info "logger"
Add "option" to specify a resource for PHP triggered errors, PhD
triggered errors and PhD info messages
# We really need some "config interface", adding all options as
# arguments to `phd` is already starting to get messy :(
2008-05-03 23:33:36 +00:00
Hannes Magnusson
29d0db1f0e - Added option (-s/--skip) to skip rendering of chunks
# Usage:
#  Render all chunks from book.strings except for ref.strings and its childrens:
#   phd --partial book.strings --skip ref.strings -d.manual.xml
#
# Render all chunks from book.strings except for ref.strings
#   phd --partial book.strings --skip ref.strings=false -d.manual.xml
2008-02-04 23:01:27 +00:00
Hannes Magnusson
30ff3cd93a No need to continue reading if we have already rendered all the requested IDs 2007-10-26 14:49:05 +00:00
Hannes Magnusson
2f458c0194 Added various verbosity levels 2007-10-21 17:08:44 +00:00
Hannes Magnusson
83344cfc1c Added the possibility to render only specific IDs 2007-10-21 11:42:33 +00:00