Skip to content

Commit

Permalink
update phpDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
mister-good-deal committed Aug 15, 2015
1 parent 36293bc commit efa0ecc
Show file tree
Hide file tree
Showing 96 changed files with 17,144 additions and 1,866 deletions.
74 changes: 49 additions & 25 deletions classes/abstracts.API.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/abstracts.AbstractLogger.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/abstracts.designPatterns.Collection.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/abstracts.designPatterns.Entity.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/abstracts.designPatterns.EntityManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.Benchmark.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.DataBase.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.ExceptionManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.ImagesManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.IniManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.LoggerManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.PDOStatementCustom.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.console.Console.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.console.ConsoleColors.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.entities.User.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.entities.UserStatistics.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.entitiesCollection.UserCollection.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.entitiesManager.UserEntityManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.entitiesManager.UserStatisticsEntityManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.logger.ConsoleLogger.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.logger.FileLogger.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/classes.logger.LogLevel.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/interfaces.LoggerInterface.html

Large diffs are not rendered by default.

995 changes: 995 additions & 0 deletions classes/interfaces.http.MessageInterface.html

Large diffs are not rendered by default.

1,280 changes: 1,280 additions & 0 deletions classes/interfaces.http.RequestInterface.html

Large diffs are not rendered by default.

1,147 changes: 1,147 additions & 0 deletions classes/interfaces.http.ResponseInterface.html

Large diffs are not rendered by default.

1,843 changes: 1,843 additions & 0 deletions classes/interfaces.http.ServerRequestInterface.html

Large diffs are not rendered by default.

1,051 changes: 1,051 additions & 0 deletions classes/interfaces.http.StreamInterface.html

Large diffs are not rendered by default.

767 changes: 767 additions & 0 deletions classes/interfaces.http.UploadedFileInterface.html

Large diffs are not rendered by default.

1,221 changes: 1,221 additions & 0 deletions classes/interfaces.http.UriInterface.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/traits.EchoTrait.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/traits.FiltersTrait.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/traits.PrettyOutputTrait.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions classes/traits.ShortcutsTrait.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/abstracts.AbstractLogger.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/abstracts.api.AbstractApi.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/abstracts.designPatterns.Collection.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/abstracts.designPatterns.Entity.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/abstracts.designPatterns.EntityManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/autoloader.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.Benchmark.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.DataBase.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.ExceptionManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.ImagesManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.IniManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.LoggerManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.PDOStatementCustom.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.console.Console.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.console.ConsoleColors.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.entities.User.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.entities.UserStatistics.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.entitiesCollection.UserCollection.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.entitiesManager.UserEntityManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.entitiesManager.UserStatisticsEntityManager.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.logger.ConsoleLogger.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.logger.FileLogger.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/classes.logger.LogLevel.html

Large diffs are not rendered by default.

30 changes: 14 additions & 16 deletions files/classes/ImagesManager.php.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ class ImagesManager
}
}

/*----- End of Magic methods ------*/

/*=========================================
= Setters / getters =
=========================================*/
Expand Down Expand Up @@ -131,10 +133,6 @@ class ImagesManager
}

/*----- End of Setters / getters ------*/



/*----- End of Magic methods ------*/

/*======================================
= Public methods =
Expand Down Expand Up @@ -184,43 +182,43 @@ class ImagesManager
$draw->setFillColor('#ffffff');
$draw->setTextUnderColor('#00000088');

$textMetrics = $this->image->queryFontMetrics($draw, $text);
$textMetrics = $this->image->queryFontMetrics($draw, $text);
$textWidth = $textMetrics['textWidth'] + 2 * $textMetrics['boundingBox']['x1'];
$extraTextHeight = $textMetrics['descender'];
$textHeight = $textMetrics['textHeight'] + $extraTextHeight;

switch ($position) {
case 'bottom-right':
$width = $this->image->getImageWidth()
- ($textMetrics['textWidth'] + 2 * $textMetrics['boundingBox']['x1']);
$height = $this->image->getImageHeight();
$width = $this->image->getImageWidth() - $textWidth;
$height = $this->image->getImageHeight() + $extraTextHeight;
$width -= static::$EXTRA_TEXT_PADDING;
$height -= static::$EXTRA_TEXT_PADDING;
break;

case 'bottom-left':
$width = 0;
$height = $this->image->getImageHeight();
$height = $this->image->getImageHeight() + $extraTextHeight;
$width += static::$EXTRA_TEXT_PADDING;
$height -= static::$EXTRA_TEXT_PADDING;
break;

case 'top-right':
$width = $this->image->getImageWidth()
- ($textMetrics['textWidth'] + 2 * $textMetrics['boundingBox']['x1']);
$height = $textMetrics['textHeight'] + $textMetrics['descender'];
$width = $this->image->getImageWidth() - $textWidth;
$height = $textHeight;
$width -= static::$EXTRA_TEXT_PADDING;
$height += static::$EXTRA_TEXT_PADDING;
break;

case 'top-left':
$width = 0;
$height = $textMetrics['textHeight'] + $textMetrics['descender'];
$height = $textHeight;
$width += static::$EXTRA_TEXT_PADDING;
$height += static::$EXTRA_TEXT_PADDING;
break;

default:
$width = $this->image->getImageWidth()
- ($textMetrics['textWidth'] + 2 * $textMetrics['boundingBox']['x1']);
$height = $this->image->getImageHeight();
$width = $this->image->getImageWidth() - $textWidth;
$height = $this->image->getImageHeight() + $extraTextHeight;
$width -= static::$EXTRA_TEXT_PADDING;
$height -= static::$EXTRA_TEXT_PADDING;
break;
Expand Down
74 changes: 49 additions & 25 deletions files/examples.dataBase.html

Large diffs are not rendered by default.

74 changes: 49 additions & 25 deletions files/interfaces.LoggerInterface.html

Large diffs are not rendered by default.

505 changes: 505 additions & 0 deletions files/interfaces.http.MessageInterface.html

Large diffs are not rendered by default.

503 changes: 503 additions & 0 deletions files/interfaces.http.RequestInterface.html

Large diffs are not rendered by default.

503 changes: 503 additions & 0 deletions files/interfaces.http.ResponseInterface.html

Large diffs are not rendered by default.

503 changes: 503 additions & 0 deletions files/interfaces.http.ServerRequestInterface.html

Large diffs are not rendered by default.

503 changes: 503 additions & 0 deletions files/interfaces.http.StreamInterface.html

Large diffs are not rendered by default.

503 changes: 503 additions & 0 deletions files/interfaces.http.UploadedFileInterface.html

Large diffs are not rendered by default.

503 changes: 503 additions & 0 deletions files/interfaces.http.UriInterface.html

Large diffs are not rendered by default.

194 changes: 194 additions & 0 deletions files/interfaces/http/MessageInterface.php.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
<?php
/**
* Http message interface
*
* @category Interface
* @author Romain Laneuville <[email protected]>
*/
namespace interfaces\http;

/**
* HTTP messages consist of requests from a client to a server and responses
* from a server to a client. This interface defines the methods common to
* each.
*
* Messages are considered immutable; all methods that might change state MUST
* be implemented such that they retain the internal state of the current
* message and return an instance that contains the changed state.
*
* @see http://www.ietf.org/rfc/rfc7230.txt
* @see http://www.ietf.org/rfc/rfc7231.txt
*/
interface MessageInterface
{
/**
* Retrieves the HTTP protocol version as a string.
*
* The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
*
* @return string HTTP protocol version.
*/
public function getProtocolVersion();

/**
* Return an instance with the specified HTTP protocol version.
*
* The version string MUST contain only the HTTP version number (e.g.,
* "1.1", "1.0").
*
* This method MUST be implemented in such a way as to retain the
* immutability of the message, and MUST return an instance that has the
* new protocol version.
*
* @param string $version HTTP protocol version
* @return self
*/
public function withProtocolVersion($version);

/**
* Retrieves all message header values.
*
* The keys represent the header name as it will be sent over the wire, and
* each value is an array of strings associated with the header.
*
* // Represent the headers as a string
* foreach ($message->getHeaders() as $name => $values) {
* echo $name . ": " . implode(", ", $values);
* }
*
* // Emit headers iteratively:
* foreach ($message->getHeaders() as $name => $values) {
* foreach ($values as $value) {
* header(sprintf('%s: %s', $name, $value), false);
* }
* }
*
* While header names are not case-sensitive, getHeaders() will preserve the
* exact case in which headers were originally specified.
*
* @return string[][] Returns an associative array of the message's headers.
* Each key MUST be a header name, and each value MUST be an array of
* strings for that header.
*/
public function getHeaders();

/**
* Checks if a header exists by the given case-insensitive name.
*
* @param string $name Case-insensitive header field name.
* @return bool Returns true if any header names match the given header
* name using a case-insensitive string comparison. Returns false if
* no matching header name is found in the message.
*/
public function hasHeader($name);

/**
* Retrieves a message header value by the given case-insensitive name.
*
* This method returns an array of all the header values of the given
* case-insensitive header name.
*
* If the header does not appear in the message, this method MUST return an
* empty array.
*
* @param string $name Case-insensitive header field name.
* @return string[] An array of string values as provided for the given
* header. If the header does not appear in the message, this method MUST
* return an empty array.
*/
public function getHeader($name);

/**
* Retrieves a comma-separated string of the values for a single header.
*
* This method returns all of the header values of the given
* case-insensitive header name as a string concatenated together using
* a comma.
*
* NOTE: Not all header values may be appropriately represented using
* comma concatenation. For such headers, use getHeader() instead
* and supply your own delimiter when concatenating.
*
* If the header does not appear in the message, this method MUST return
* an empty string.
*
* @param string $name Case-insensitive header field name.
* @return string A string of values as provided for the given header
* concatenated together using a comma. If the header does not appear in
* the message, this method MUST return an empty string.
*/
public function getHeaderLine($name);

/**
* Return an instance with the provided value replacing the specified header.
*
* While header names are case-insensitive, the casing of the header will
* be preserved by this function, and returned from getHeaders().
*
* This method MUST be implemented in such a way as to retain the
* immutability of the message, and MUST return an instance that has the
* new and/or updated header and value.
*
* @param string $name Case-insensitive header field name.
* @param string|string[] $value Header value(s).
* @return self
* @throws \InvalidArgumentException for invalid header names or values.
*/
public function withHeader($name, $value);

/**
* Return an instance with the specified header appended with the given value.
*
* Existing values for the specified header will be maintained. The new
* value(s) will be appended to the existing list. If the header did not
* exist previously, it will be added.
*
* This method MUST be implemented in such a way as to retain the
* immutability of the message, and MUST return an instance that has the
* new header and/or value.
*
* @param string $name Case-insensitive header field name to add.
* @param string|string[] $value Header value(s).
* @return self
* @throws \InvalidArgumentException for invalid header names.
* @throws \InvalidArgumentException for invalid header values.
*/
public function withAddedHeader($name, $value);

/**
* Return an instance without the specified header.
*
* Header resolution MUST be done without case-sensitivity.
*
* This method MUST be implemented in such a way as to retain the
* immutability of the message, and MUST return an instance that removes
* the named header.
*
* @param string $name Case-insensitive header field name to remove.
* @return self
*/
public function withoutHeader($name);

/**
* Gets the body of the message.
*
* @return StreamInterface Returns the body as a stream.
*/
public function getBody();

/**
* Return an instance with the specified message body.
*
* The body MUST be a StreamInterface object.
*
* This method MUST be implemented in such a way as to retain the
* immutability of the message, and MUST return a new instance that has the
* new body stream.
*
* @param StreamInterface $body Body.
* @return self
* @throws \InvalidArgumentException When the body is not valid.
*/
public function withBody(StreamInterface $body);
}

Loading

0 comments on commit efa0ecc

Please sign in to comment.