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

Commit

Permalink
Merge commit 'zf2/master' into livedocx-2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmaron committed May 5, 2011
9 parents 66f51dc + 3894dbf + 07d1ba6 + bbae534 + 122c95e + 163c973 + 369dd16 + d913f72 + 2b48cb0 commit 3db8954
Show file tree
Hide file tree
Showing 51 changed files with 1,358 additions and 497 deletions.
4 changes: 2 additions & 2 deletions src/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @category Zend
* @package Zend_Log
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -26,7 +26,7 @@
/**
* @category Zend
* @package Zend_Log
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Exception
Expand Down
32 changes: 32 additions & 0 deletions src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Log
* @subpackage Exception
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Log\Exception;

/**
* Invalid argument exception
*
* @category Zend
* @package Zend_Log
* @subpackage Exception
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class InvalidArgumentException
extends \InvalidArgumentException
implements \Zend\Log\Exception
Expand Down
7 changes: 0 additions & 7 deletions src/Exception/NotImplementedException.php

This file was deleted.

32 changes: 32 additions & 0 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Log
* @subpackage Exception
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Log\Exception;

/**
* Runtime argument exception
*
* @category Zend
* @package Zend_Log
* @subpackage Exception
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class RuntimeException
extends \RuntimeException
implements \Zend\Log\Exception
Expand Down
8 changes: 4 additions & 4 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @category Zend
* @package Zend_Log
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -26,16 +26,16 @@
/**
* @category Zend
* @package Zend_Log
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Factory
{
/**
* Construct a Zend_Log driver
*
*
* @param array|\Zend\Config\Config $config
* @return \Zend\Log\Factory
*/
static public function factory($config = array());
}
}
6 changes: 2 additions & 4 deletions src/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
*
* @category Zend
* @package Zend_Log
* @subpackage Filter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -27,8 +26,7 @@
/**
* @category Zend
* @package Zend_Log
* @subpackage Filter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Filter
Expand Down
14 changes: 7 additions & 7 deletions src/Filter/AbstractFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @subpackage Filter
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -28,19 +28,19 @@

/**
* @uses \Zend\Log\Exception\InvalidArgumentException
* @uses \Zend\Log\Filter\FilterInterface
* @uses \Zend\Log\FactoryInterface
* @uses \Zend\Log\Filter
* @uses \Zend\Log\Factory
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @subpackage Filter
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class AbstractFilter implements Filter, Factory
{
/**
* Validate and optionally convert the config to array
*
*
* @param array|\Zend\Config\Config $config \Zend\Config\Config or Array
* @return array
* @throws \Zend\Log\Exception\InvalidArgumentException
Expand Down
9 changes: 5 additions & 4 deletions src/Filter/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @category Zend
* @package Zend_Log
* @subpackage Filter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -30,7 +30,7 @@
* @category Zend
* @package Zend_Log
* @subpackage Filter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Message extends AbstractFilter
Expand All @@ -44,6 +44,7 @@ class Message extends AbstractFilter
* Filter out any log messages not matching $regexp.
*
* @param string $regexp Regular expression to test the log message
* @return void
* @throws \Zend\Log\Exception\InvalidArgumentException
*/
public function __construct($regexp)
Expand All @@ -56,11 +57,11 @@ public function __construct($regexp)

/**
* Create a new instance of Zend_Log_Filter_Message
*
*
* @param array|\Zend\Config\Config $config
* @return \Zend\Log\Filter\Message
*/
static public function factory($config = array())
static public function factory($config = array())
{
$config = self::_parseConfig($config);
$config = array_merge(array(
Expand Down
17 changes: 9 additions & 8 deletions src/Filter/Priority.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @category Zend
* @package Zend_Log
* @subpackage Filter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -30,7 +30,7 @@
* @category Zend
* @package Zend_Log
* @subpackage Filter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Priority extends AbstractFilter
Expand All @@ -51,11 +51,12 @@ class Priority extends AbstractFilter
*
* @param integer $priority Priority
* @param string $operator Comparison operator
* @return void
* @throws \Zend\Log\Exception\InvalidArgumentException
*/
public function __construct($priority, $operator = null)
{
if (! is_integer($priority)) {
if (! is_int($priority)) {
throw new \Zend\Log\Exception\InvalidArgumentException('Priority must be an integer');
}

Expand All @@ -65,16 +66,16 @@ public function __construct($priority, $operator = null)

/**
* Create a new instance of Zend_Log_Filter_Priority
*
*
* @param array|\Zend\Config\Config $config
* @return \Zend\Log\Filter\Priority
* @throws \Zend\Log\Exception\InvalidArgumentException
*/
static public function factory($config = array())
static public function factory($config = array())
{
$config = self::_parseConfig($config);
$config = array_merge(array(
'priority' => null,
'priority' => null,
'operator' => null,
), $config);

Expand All @@ -86,9 +87,9 @@ static public function factory($config = array())
if (!is_numeric($config['priority'])) {
throw new \Zend\Log\Exception\InvalidArgumentException('Priority must be an integer.');
}

return new self(
(int) $config['priority'],
(int) $config['priority'],
$config['operator']
);
}
Expand Down
8 changes: 4 additions & 4 deletions src/Filter/SuppressFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @category Zend
* @package Zend_Log
* @subpackage Filter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -29,7 +29,7 @@
* @category Zend
* @package Zend_Log
* @subpackage Filter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class SuppressFilter extends AbstractFilter
Expand Down Expand Up @@ -66,9 +66,9 @@ public function accept($event)

/**
* Create a new instance of Zend_Log_Filter_Suppress
*
*
* @param array|\Zend\Config\Config $config
* @return \Zend\Log\Filter\Suppress
* @return \Zend\Log\Filter\SuppressFilter
*/
static public function factory($config = array())
{
Expand Down
6 changes: 2 additions & 4 deletions src/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
*
* @category Zend
* @package Zend_Log
* @subpackage Formatter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -27,8 +26,7 @@
/**
* @category Zend
* @package Zend_Log
* @subpackage Formatter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Formatter
Expand Down
40 changes: 40 additions & 0 deletions src/Formatter/AbstractFormatter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Log
* @subpackage Formatter
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Log\Formatter;
use \Zend\Log\Factory,
\Zend\Log\Formatter;

/**
* @uses \Zend\Log\Factory
* @uses \Zend\Log\Formatter
* @category Zend
* @package Zend_Log
* @subpackage Formatter
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class AbstractFormatter implements Formatter, Factory
{
}
Loading

0 comments on commit 3db8954

Please sign in to comment.