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

Commit

Permalink
Merge branch 'master' of git://github.com/zendframework/zf2 into cach…
Browse files Browse the repository at this point in the history
…e_interfaces
  • Loading branch information
Show file tree
Hide file tree
Showing 19 changed files with 144 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .travis/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
travisdir=$(dirname $(readlink /proc/$$/fd/255))
travisdir=$(dirname "$0")
testdir="$travisdir/../tests"
testedcomponents=(`cat "$travisdir/tested-components"`)
result=0
Expand Down
1 change: 1 addition & 0 deletions .travis/skipped-components
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Zend/Amf
Zend/Date
Zend/Dojo
Zend/Queue
Zend/Service
Zend/Test
Expand Down
4 changes: 3 additions & 1 deletion .travis/tested-components
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,19 @@ Zend/Form
Zend/GData
Zend/Http
Zend/InfoCard
Zend/InputFilter
Zend/Json
Zend/Ldap
Zend/Loader
Zend/Locale
Zend/Log
Zend/Mail
Zend/Markup
Zend/Math
Zend/Measure
Zend/Memory
Zend/Mime
Zend/Module
Zend/ModuleManager
Zend/Mvc
Zend/Navigation
Zend/OAuth
Expand Down
34 changes: 34 additions & 0 deletions src/Exception/OutOfRangeException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?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_Barcode
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id$
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Barcode\Exception;

/**
* Exception for Zend_Barcode component.
*
* @category Zend
* @package Zend_Barcode
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class OutOfRangeException extends \OutOfRangeException implements ExceptionInterface
{
}
34 changes: 34 additions & 0 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?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_Barcode
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id$
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Barcode\Exception;

/**
* Exception for Zend_Barcode component.
*
* @category Zend
* @package Zend_Barcode
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class RuntimeException extends \RuntimeException implements ExceptionInterface
{
}
35 changes: 35 additions & 0 deletions src/Exception/UnexpectedValueException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?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_Barcode
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id$
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Barcode\Exception;

/**
* Exception for Zend_Barcode component.
*
* @category Zend
* @package Zend_Barcode
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class UnexpectedValueException extends \UnexpectedValueException implements
ExceptionInterface
{
}
2 changes: 1 addition & 1 deletion src/Object/AbstractObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function __construct($options = null)
if (is_array($options)) {
$this->setOptions($options);
}
$this->type = strtolower(substr(get_class($this), strlen($this->barcodeNamespace) + 1));
$this->type = strtolower(substr(get_called_class(), strlen($this->barcodeNamespace) + 1));
if ($this->mandatoryChecksum) {
$this->withChecksum = true;
$this->withChecksumInText = true;
Expand Down
2 changes: 1 addition & 1 deletion src/Object/Ean13.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function getChecksum($text)
*/
protected function drawText()
{
if (get_class($this) == 'Zend\Barcode\Object\Ean13') {
if (get_called_class() == 'Zend\Barcode\Object\Ean13') {
$this->drawEan13Text();
} else {
parent::drawText();
Expand Down
4 changes: 1 addition & 3 deletions src/Object/Exception/BarcodeValidationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class BarcodeValidationException
extends \Exception
implements ExceptionInterface
class BarcodeValidationException extends InvalidArgumentException
{
}
6 changes: 3 additions & 3 deletions src/Object/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace Zend\Barcode\Object\Exception;

use Zend\Barcode\Exception\ExceptionInterface as BarcodeException;
use Zend\Barcode\Exception\ExceptionInterface as Exception;

/**
* Base exception interface for barcode objects
Expand All @@ -32,6 +32,6 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface ExceptionInterface extends BarcodeException
interface ExceptionInterface extends Exception
{
}
}
4 changes: 1 addition & 3 deletions src/Object/Exception/ExtensionNotLoadedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class ExtensionNotLoadedException
extends \RuntimeException
implements ExceptionInterface
class ExtensionNotLoadedException extends RuntimeException
{
}
7 changes: 4 additions & 3 deletions src/Object/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

namespace Zend\Barcode\Object\Exception;

use Zend\Barcode\Exception;

/**
* Exception for Zend_Barcode component.
*
Expand All @@ -29,8 +31,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class InvalidArgumentException
extends \InvalidArgumentException
implements ExceptionInterface
class InvalidArgumentException extends Exception\InvalidArgumentException implements
ExceptionInterface
{
}
7 changes: 4 additions & 3 deletions src/Object/Exception/OutOfRangeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

namespace Zend\Barcode\Object\Exception;

use Zend\Barcode\Exception;

/**
* Exception for Zend_Barcode component.
*
Expand All @@ -29,8 +31,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class OutOfRangeException
extends \OutOfRangeException
implements ExceptionInterface
class OutOfRangeException extends Exception\OutOfRangeException implements
ExceptionInterface
{
}
7 changes: 4 additions & 3 deletions src/Object/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

namespace Zend\Barcode\Object\Exception;

use Zend\Barcode\Exception;

/**
* Exception for Zend_Barcode component.
*
Expand All @@ -29,8 +31,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class RuntimeException
extends \RuntimeException
implements ExceptionInterface
class RuntimeException extends Exception\RuntimeException implements
ExceptionInterface
{
}
2 changes: 1 addition & 1 deletion src/Renderer/AbstractRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function __construct($options = null)
$this->setOptions($options);
}
$this->type = strtolower(substr(
get_class($this),
get_called_class(),
strlen($this->rendererNamespace) + 1
));
}
Expand Down
7 changes: 4 additions & 3 deletions src/Renderer/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

namespace Zend\Barcode\Renderer\Exception;

use Zend\Barcode\Exception;

/**
* Exception for Zend_Barcode component.
*
Expand All @@ -29,8 +31,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class InvalidArgumentException
extends \InvalidArgumentException
implements ExceptionInterface
class InvalidArgumentException extends Exception\InvalidArgumentException implements
ExceptionInterface
{
}
7 changes: 4 additions & 3 deletions src/Renderer/Exception/OutOfRangeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

namespace Zend\Barcode\Renderer\Exception;

use Zend\Barcode\Exception;

/**
* Exception for Zend_Barcode component.
*
Expand All @@ -29,8 +31,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class OutOfRangeException
extends \OutOfRangeException
implements ExceptionInterface
class OutOfRangeException extends Exception\OutOfRangeException implements
ExceptionInterface
{
}
7 changes: 4 additions & 3 deletions src/Renderer/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

namespace Zend\Barcode\Renderer\Exception;

use Zend\Barcode\Exception;

/**
* Exception for Zend_Barcode component.
*
Expand All @@ -29,8 +31,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class RuntimeException
extends \RuntimeException
implements ExceptionInterface
class RuntimeException extends Exception\RuntimeException implements
ExceptionInterface
{
}
7 changes: 4 additions & 3 deletions src/Renderer/Exception/UnexpectedValueException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

namespace Zend\Barcode\Renderer\Exception;

use Zend\Barcode\Exception;

/**
* Exception for Zend_Barcode component.
*
Expand All @@ -29,8 +31,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class UnexpectedValueException
extends \UnexpectedValueException
implements ExceptionInterface
class UnexpectedValueException extends Exception\UnexpectedValueException implements
ExceptionInterface
{
}

0 comments on commit d11d08b

Please sign in to comment.