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

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Preparing to tag 2.1.0 -- all new features from develop are now merged to master.
  • Loading branch information
Show file tree
Hide file tree
Showing 65 changed files with 1,921 additions and 302 deletions.
5 changes: 0 additions & 5 deletions src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Exception;

/**
* @category Zend
* @package Zend_Log
*/
interface ExceptionInterface
{}
5 changes: 0 additions & 5 deletions src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Exception;

/**
* Invalid argument exception
*
* @category Zend
* @package Zend_Log
* @subpackage Exception
*/
class InvalidArgumentException
extends \InvalidArgumentException
Expand Down
5 changes: 0 additions & 5 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Exception;

/**
* Runtime argument exception
*
* @category Zend
* @package Zend_Log
* @subpackage Exception
*/
class RuntimeException
extends \RuntimeException
Expand Down
5 changes: 0 additions & 5 deletions src/Filter/FilterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Filter;

/**
* @category Zend
* @package Zend_Log
*/
interface FilterInterface
{
/**
Expand Down
6 changes: 0 additions & 6 deletions src/Filter/Mock.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Filter;

/**
* @category Zend
* @package Zend_Log
* @subpackage Writer
*/
class Mock implements FilterInterface
{
/**
Expand Down
6 changes: 0 additions & 6 deletions src/Filter/Priority.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,13 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Filter;

use Traversable;
use Zend\Log\Exception;

/**
* @category Zend
* @package Zend_Log
* @subpackage Filter
*/
class Priority implements FilterInterface
{
/**
Expand Down
6 changes: 0 additions & 6 deletions src/Filter/Regex.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Filter;
Expand All @@ -14,11 +13,6 @@
use Zend\Log\Exception;
use Zend\Stdlib\ErrorHandler;

/**
* @category Zend
* @package Zend_Log
* @subpackage Filter
*/
class Regex implements FilterInterface
{
/**
Expand Down
6 changes: 0 additions & 6 deletions src/Filter/SuppressFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Filter;

use Zend\Log\Exception;

/**
* @category Zend
* @package Zend_Log
* @subpackage Filter
*/
class SuppressFilter implements FilterInterface
{
/**
Expand Down
6 changes: 0 additions & 6 deletions src/Filter/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Filter;
Expand All @@ -14,11 +13,6 @@
use Zend\Log\Exception;
use Zend\Validator\ValidatorInterface as ZendValidator;

/**
* @category Zend
* @package Zend_Log
* @subpackage Filter
*/
class Validator implements FilterInterface
{
/**
Expand Down
16 changes: 9 additions & 7 deletions src/Formatter/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,13 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Formatter;

use DateTime;
use Traversable;

/**
* @category Zend
* @package Zend_Log
* @subpackage Formatter
*/
class Base implements FormatterInterface
{
/**
Expand All @@ -32,10 +26,18 @@ class Base implements FormatterInterface
* Class constructor
*
* @see http://php.net/manual/en/function.date.php
* @param null|string $dateTimeFormat Format for DateTime objects
* @param null|string|array|Traversable $dateTimeFormat Format for DateTime objects
*/
public function __construct($dateTimeFormat = null)
{
if ($dateTimeFormat instanceof Traversable) {
$dateTimeFormat = iterator_to_array($dateTimeFormat);
}

if (is_array($dateTimeFormat)) {
$dateTimeFormat = isset($dateTimeFormat['dateTimeFormat'])? $dateTimeFormat['dateTimeFormat'] : null;
}

if (null !== $dateTimeFormat) {
$this->dateTimeFormat = $dateTimeFormat;
}
Expand Down
45 changes: 45 additions & 0 deletions src/Formatter/ChromePhp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Log\Formatter;

class ChromePhp implements FormatterInterface
{
/**
* Formats the given event data into a single line to be written by the writer.
*
* @param array $event The event data which should be formatted.
* @return string
*/
public function format($event)
{
return $event['message'];
}

/**
* This method is implemented for FormatterInterface but not used.
*
* @return string
*/
public function getDateTimeFormat()
{
return '';
}

/**
* This method is implemented for FormatterInterface but not used.
*
* @param string $dateTimeFormat
* @return FormatterInterface
*/
public function setDateTimeFormat($dateTimeFormat)
{
return $this;
}
}
15 changes: 9 additions & 6 deletions src/Formatter/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Formatter;

use DateTime;
use Traversable;

/**
* @category Zend
* @package Zend_Log
* @subpackage Formatter
*/
class Db implements FormatterInterface
{
/**
Expand All @@ -35,6 +30,14 @@ class Db implements FormatterInterface
*/
public function __construct($dateTimeFormat = null)
{
if ($dateTimeFormat instanceof Traversable) {
$dateTimeFormat = iterator_to_array($dateTimeFormat);
}

if (is_array($dateTimeFormat)) {
$dateTimeFormat = isset($dateTimeFormat['dateTimeFormat'])? $dateTimeFormat['dateTimeFormat'] : null;
}

if (null !== $dateTimeFormat) {
$this->setDateTimeFormat($dateTimeFormat);
}
Expand Down
6 changes: 0 additions & 6 deletions src/Formatter/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Formatter;

use DateTime;

/**
* @category Zend
* @package Zend_Log
* @subpackage Formatter
*/
class ErrorHandler extends Simple
{
const DEFAULT_FORMAT = '%timestamp% %priorityName% (%priority%) %message% (errno %extra[errno]%) in %extra[file]% on line %extra[line]%';
Expand Down
6 changes: 0 additions & 6 deletions src/Formatter/ExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Formatter;

use DateTime;

/**
* @category Zend
* @package Zend_Log
* @subpackage Formatter
*/
class ExceptionHandler implements FormatterInterface
{
/**
Expand Down
22 changes: 12 additions & 10 deletions src/Formatter/FirePhp.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,29 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Formatter;

/**
* @category Zend
* @package Zend_Log
* @subpackage Formatter
*/
class FirePhp implements FormatterInterface
{
/**
* Formats the given event data into a single line to be written by the writer.
*
* @param array $event The event data which should be formatted.
* @return string
* @param array $event The event data which should be formatted.
* @return array line message and optionally label if 'extra' data exists.
*/
public function format($event)
{
return $event['message'];
$label = null;
if ( !empty($event['extra']) ) {
$line = $event['extra'];
$label = $event['message'];
} else {
$line = $event['message'];
}

return array($line, $label);
}

/**
Expand All @@ -41,7 +43,7 @@ public function getDateTimeFormat()
/**
* This method is implemented for FormatterInterface but not used.
*
* @param string $dateTimeFormat
* @param string $dateTimeFormat
* @return FormatterInterface
*/
public function setDateTimeFormat($dateTimeFormat)
Expand Down
5 changes: 0 additions & 5 deletions src/Formatter/FormatterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/

namespace Zend\Log\Formatter;

/**
* @category Zend
* @package Zend_Log
*/
interface FormatterInterface
{
/**
Expand Down
Loading

0 comments on commit 7a782f4

Please sign in to comment.