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

Commit

Permalink
Merge remote-tracking branch 'zf2/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 170 changed files with 22,601 additions and 23,582 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

14 changes: 0 additions & 14 deletions .travis/run-tests.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .travis/skipped-components

This file was deleted.

61 changes: 0 additions & 61 deletions .travis/tested-components

This file was deleted.

9 changes: 5 additions & 4 deletions composer.json
@@ -1,6 +1,6 @@
{
"name": "zendframework/zend-barcode",
"description": "Zend\\Barcode component",
"description": "provides a generic way to generate barcodes",
"license": "BSD-3-Clause",
"keywords": [
"zf2",
Expand All @@ -9,11 +9,11 @@
"homepage": "https://github.com/zendframework/zend-barcode",
"autoload": {
"psr-4": {
"Zend\\Barcode\\": "src/"
"Zend\\Barcode": "src/"
}
},
"require": {
"php": ">=5.3.23",
"php": ">=5.3.3",
"zendframework/zend-stdlib": "self.version",
"zendframework/zend-validator": "self.version"
},
Expand All @@ -26,7 +26,8 @@
},
"suggest": {
"zendframework/zend-servicemanager": "Zend\\ServiceManager component, required when using the factory methods of Zend\\Barcode.",
"zendframework/zendpdf": "ZendPdf component"
"zendframework/zendpdf": "ZendPdf component",
"zendframework/zend-validator": "Zend\\Validator component"
},
"extra": {
"branch-alias": {
Expand Down
70 changes: 28 additions & 42 deletions src/Barcode.php
@@ -1,38 +1,24 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* 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)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @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
* @package Zend_Barcode
*/

namespace Zend\Barcode;

use Traversable,
Zend,
Zend\Loader\Broker,
Zend\Loader\ShortNameLocator,
Zend\Stdlib\ArrayUtils;
use Traversable;
use Zend;
use Zend\Stdlib\ArrayUtils;

/**
* Class for generate Barcode
*
* @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 Barcode
{
Expand All @@ -50,45 +36,45 @@ class Barcode
protected static $staticFont = null;

/**
* The parser broker
* The parser plugin manager
*
* @var Broker
* @var ObjectPluginManager
*/
protected static $objectBroker;
protected static $objectPlugins;

/**
* The renderer broker
* The renderer plugin manager
*
* @var Broker
* @var RendererPluginManager
*/
protected static $rendererBroker;
protected static $rendererPlugins;

/**
* Get the parser broker
* Get the parser plugin manager
*
* @return Broker
* @return ObjectPluginManager
*/
public static function getObjectBroker()
public static function getObjectPluginManager()
{
if (!self::$objectBroker instanceof Broker) {
self::$objectBroker = new ObjectBroker();
if (!self::$objectPlugins instanceof ObjectPluginManager) {
self::$objectPlugins = new ObjectPluginManager();
}

return self::$objectBroker;
return self::$objectPlugins;
}

/**
* Get the renderer broker
* Get the renderer plugin manager
*
* @return Broker
* @return RendererPluginManager
*/
public static function getRendererBroker()
public static function getRendererPluginManager()
{
if (!self::$rendererBroker instanceof Broker) {
self::$rendererBroker = new RendererBroker();
if (!self::$rendererPlugins instanceof RendererPluginManager) {
self::$rendererPlugins = new RendererPluginManager();
}

return self::$rendererBroker;
return self::$rendererPlugins;
}

/**
Expand Down Expand Up @@ -210,7 +196,7 @@ public static function makeBarcode($barcode, $barcodeConfig = array())
);
}

return self::getObjectBroker()->load($barcode, $barcodeConfig);
return self::getObjectPluginManager()->get($barcode, $barcodeConfig);
}

/**
Expand Down Expand Up @@ -261,7 +247,7 @@ public static function makeRenderer($renderer = 'image', $rendererConfig = array
);
}

return self::getRendererBroker()->load($renderer, $rendererConfig);
return self::getRendererPluginManager()->get($renderer, $rendererConfig);
}

/**
Expand Down
22 changes: 5 additions & 17 deletions src/Exception/ExceptionInterface.php
@@ -1,21 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to version 1.0 of the Zend Framework
* license, that is bundled with this package in the file LICENSE.txt, and
* is available through the world-wide-web at the following URL:
* http://framework.zend.com/license/new-bsd. If you did not receive
* a copy of the Zend Framework license and are unable to obtain it
* through the world-wide-web, please send a note to license@zend.com
* so we can mail you a copy immediately.
*
* @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
* @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
* @package Zend_Barcode
*/

namespace Zend\Barcode\Exception;
Expand All @@ -26,8 +16,6 @@
* @category Zend
* @package Zend_Barcode
* @subpackage Exception
* @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
{
Expand Down
23 changes: 5 additions & 18 deletions src/Exception/InvalidArgumentException.php
@@ -1,22 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* 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
* @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
* @package Zend_Barcode
*/

namespace Zend\Barcode\Exception;
Expand All @@ -26,8 +15,6 @@
*
* @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 InvalidArgumentException
extends \InvalidArgumentException
Expand Down
23 changes: 5 additions & 18 deletions src/Exception/OutOfRangeException.php
@@ -1,22 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* 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
* @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
* @package Zend_Barcode
*/

namespace Zend\Barcode\Exception;
Expand All @@ -26,8 +15,6 @@
*
* @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
{
Expand Down
23 changes: 5 additions & 18 deletions src/Exception/RendererCreationException.php
@@ -1,22 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* 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
* @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
* @package Zend_Barcode
*/

namespace Zend\Barcode\Exception;
Expand All @@ -26,8 +15,6 @@
*
* @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 RendererCreationException
extends \InvalidArgumentException
Expand Down

0 comments on commit a274d7e

Please sign in to comment.