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

Commit

Permalink
Merge branch 'master' of git://github.com/zendframework/zf2
Browse files Browse the repository at this point in the history
Fixed files permissions
  • Loading branch information
Show file tree
Hide file tree
Showing 67 changed files with 2,068 additions and 329 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.4-dev",
"dev-develop": "2.5-dev"
"dev-master": "2.1-dev",
"dev-develop": "2.2-dev"
}
},
"autoload-dev": {
Expand Down
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
31 changes: 25 additions & 6 deletions src/Filter/SuppressFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,43 @@
* @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 SuppressFilter implements FilterInterface
{
/**
* @var bool
*/
protected $accept = true;

/**
* This is a simple boolean filter.
*
* @param int|array|Traversable $suppress
* @throws Exception\InvalidArgumentException
*/
public function __construct($suppress = false)
{
if ($suppress instanceof Traversable) {
$suppress = iterator_to_array($suppress);
}
if (is_array($suppress)) {
$suppress = isset($suppress['suppress']) ? $suppress['suppress'] : false;
}
if (!is_bool($suppress)) {
throw new Exception\InvalidArgumentException(sprintf(
'Suppress must be an boolean; received "%s"', gettype($suppress)
));
}

$this->suppress($suppress);
}

/**
* This is a simple boolean filter.
*
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-2013 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
Loading

0 comments on commit f86b028

Please sign in to comment.