Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Prepare documentation for publication #5

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
.*.sw*
.*.un~
nbproject
doc/html/
tmp/
zf-mkdoc-theme/

clover.xml
composer.lock
Expand Down
18 changes: 17 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@ language: php

branches:
except:
- /^release-.*$/
- /^release-\d+\.\d+\.\d+.*$/
- /^ghgfk-.*$/

cache:
directories:
- $HOME/.composer/cache
- $HOME/.local
- zf-mkdoc-theme

env:
global:
- SITE_URL: https://zendframework.github.io/zend-debug
- GH_USER_NAME: "Matthew Weier O'Phinney"
- GH_USER_EMAIL: [email protected]
- GH_REF: github.com/zendframework/zend-debug.git
- secure: "L2VCLoMn2dvOci7YvfIPOx8a3DikGtCj8NuQve5IoE2LMCMyDwO78vgQ+/phcz8k+Acw9XBthtlIIJvjhtlN1rgywAhoEEO/QmtqIUmzPwFTEgP8un0L6I9K4rZMEJ0akKrEVDGyZzXFv3xCXyANzqIo7aVAoFFbnGjKo/Dktb1RBFkiAitVLcNAcNud/JxTvscsI4Y7Cx/sCmG6AgYm+4ibGo8Ev+L3etK+00IovTALxhKmu53PIIxUxClmMOTQ4wny6H6JNwcm9xr83Mxhn0jUWQeVlFXUEUGKC9IxHGaCa5pBOv2vtRyWrUkMzzqiZjtAGaRNCIiPx3PmXJmE1Z1sEQ3NuCbx8JBnF9pRg2Ewloc8nqRnTXzciJOsFgrifWEQBgajv12+WsWmpkrofYZ3HLdyWd7a5UT5T3xqtM3YnMKQe4j3uM43k+crlEFsxwUcf8i3Kcbm4PvkP0RPdyOgwdNAd6oMrzu2vQL6qwunuFipLkj475z8psSAuo3fPzI9FygaLf3pJMeRHPiv3yKotnAvge4JhBAPC90SvY/irjgB+hDitRemLHfKvdC6U2eC0uAhFCpI3kiv9oS8QRwdx+yzGXW1tRUbbMiye582QRgRZaJPKYw9w6NciGPAMsxGfoo+nNK9Lqx7XbI6KNZFwcLRmpVH7zpjiYL7Tto="

matrix:
fast_finish: true
Expand All @@ -20,6 +30,8 @@ matrix:
- php: 5.6
env:
- EXECUTE_TEST_COVERALLS=true
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
- PATH="$HOME/.local/bin:$PATH"
- php: 7
- php: hhvm
allow_failures:
Expand All @@ -42,6 +54,10 @@ script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi

after_success:
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi

after_script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ returns information about an expression. This simple technique of debugging is
common because it is easy to use in an ad hoc fashion and requires no
initialization, special tools, or debugging environment.


- File issues at https://github.com/zendframework/zend-debug/issues
- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-debug
- Documentation is at https://zendframework.github.io/zend-debug/
10 changes: 10 additions & 0 deletions doc/book/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="container">
<div class="jumbotron">
<h1>zend-debug</h1>

<p>Safely dump debug information to HTML.</p>

<pre><code class="language-bash">$ composer require zendframework/zend-debug</code></pre>
</div>
</div>

1 change: 1 addition & 0 deletions doc/book/index.md
43 changes: 43 additions & 0 deletions doc/book/usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Usage

zend-debug exposes the static method `Zend\Debug\Debug::dump()`, which prints or
returns information about an expression. This simple technique of debugging is
common because it is easy to use in an ad hoc fashion and requires no
initialization, special tools, or debugging environment.

## Example

```php
Zend\Debug\Debug::dump($var, $label = null, $echo = true);
```

The `$var` argument specifies the expression or variable about which the
`Zend\Debug\Debug::dump()` method outputs information.

The `$label` argument is a string to be prepended to the output of
`Zend\Debug\Debug::dump()`. It may be useful, for example, to use labels if you
are dumping information about multiple variables on a given screen.

The boolean `$echo` argument specifies whether the output of
`Zend\Debug\Debug::dump()` is echoed or not. If `TRUE`, the output is echoed.
Regardless of the value of the `$echo` argument, the return value of this method
contains the output.

It may be helpful to understand that ``Zend\Debug\Debug::dump()`` wraps the PHP
function [`var_dump()`](http://php.net/var_dump). If the output stream is
detected as a web presentation, the output of `var_dump()` is escaped using
[`htmlspecialchars()`](http://php.net/htmlspecialchars) and wrapped with HTML
`<pre>` tags.


> ### Debugging with Zend\Log
>
> ``Zend\Debug\Debug::dump()`` is best for ad hoc debugging during software
> development. You can add code to dump a variable and then remove the code very
> quickly.
>
> Also consider the [zend-log component](http://zendframework.github.io/zend-log/)
> when writing more permanent debugging code. For example, you can use the
> `DEBUG` log level and the
> [stream log writer](http://zendframework.github.io/zend-log/writers/#writing-to-streams)
> to output the string returned by `Zend\Debug\Debug::dump()`.
9 changes: 9 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
docs_dir: doc/book
site_dir: doc/html
pages:
- index.md
- Usage: usage.md
site_name: zend-debug
site_description: zend-debug
repo_url: 'https://github.com/zendframework/zend-debug'
copyright: 'Copyright (c) 2016 <a href="http://www.zend.com/">Zend Technologies USA Inc.</a>'