mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Updated ZF up to 2.4.13 (#106)
This commit is contained in:
parent
cec9c3ba61
commit
80fe6e12fd
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
90
library/Zend/Authentication/Adapter/Callback.php
Normal file
90
library/Zend/Authentication/Adapter/Callback.php
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Zend Framework (http://framework.zend.com/)
|
||||||
|
*
|
||||||
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Zend\Authentication\Adapter;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use Zend\Authentication\Exception\InvalidArgumentException;
|
||||||
|
use Zend\Authentication\Exception\RuntimeException;
|
||||||
|
use Zend\Authentication\Result;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authentication Adapter authenticates using callback function.
|
||||||
|
*
|
||||||
|
* The Callback function must return an identity on authentication success,
|
||||||
|
* and false on authentication failure.
|
||||||
|
*/
|
||||||
|
class Callback extends AbstractAdapter
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var callable
|
||||||
|
*/
|
||||||
|
protected $callback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param callable $callback The authentication callback
|
||||||
|
*/
|
||||||
|
public function __construct($callback = null)
|
||||||
|
{
|
||||||
|
if (null !== $callback) {
|
||||||
|
$this->setCallback($callback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authenticate using the provided callback
|
||||||
|
*
|
||||||
|
* @return Result The authentication result
|
||||||
|
* @throws RuntimeException
|
||||||
|
*/
|
||||||
|
public function authenticate()
|
||||||
|
{
|
||||||
|
$callback = $this->getCallback();
|
||||||
|
if (! $callback) {
|
||||||
|
throw new RuntimeException('No callback provided');
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$identity = call_user_func($callback, $this->getIdentity(), $this->getCredential());
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return new Result(Result::FAILURE_UNCATEGORIZED, null, array($e->getMessage()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $identity) {
|
||||||
|
return new Result(Result::FAILURE, null, array('Authentication failure'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Result(Result::SUCCESS, $identity, array('Authentication success'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of callback.
|
||||||
|
*
|
||||||
|
* @return null|callable
|
||||||
|
*/
|
||||||
|
public function getCallback()
|
||||||
|
{
|
||||||
|
return $this->callback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of callback.
|
||||||
|
*
|
||||||
|
* @param callable $callback the callback
|
||||||
|
* @throws InvalidArgumentException
|
||||||
|
*/
|
||||||
|
public function setCallback($callback)
|
||||||
|
{
|
||||||
|
if (! is_callable($callback)) {
|
||||||
|
throw new InvalidArgumentException('Invalid callback provided');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->callback = $callback;
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ abstract class AbstractAdapter extends BaseAdapter
|
|||||||
public function setAmbiguityIdentity($flag)
|
public function setAmbiguityIdentity($flag)
|
||||||
{
|
{
|
||||||
if (is_int($flag)) {
|
if (is_int($flag)) {
|
||||||
$this->ambiguityIdentity = (1 === $flag ? true : false);
|
$this->ambiguityIdentity = (1 === $flag);
|
||||||
} elseif (is_bool($flag)) {
|
} elseif (is_bool($flag)) {
|
||||||
$this->ambiguityIdentity = $flag;
|
$this->ambiguityIdentity = $flag;
|
||||||
}
|
}
|
||||||
@ -173,7 +173,7 @@ abstract class AbstractAdapter extends BaseAdapter
|
|||||||
*/
|
*/
|
||||||
public function getDbSelect()
|
public function getDbSelect()
|
||||||
{
|
{
|
||||||
if ($this->dbSelect == null) {
|
if ($this->dbSelect === null) {
|
||||||
$this->dbSelect = new Sql\Select();
|
$this->dbSelect = new Sql\Select();
|
||||||
}
|
}
|
||||||
return $this->dbSelect;
|
return $this->dbSelect;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -125,14 +125,14 @@ class Http implements AdapterInterface
|
|||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $imaProxy;
|
protected $imaProxy = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag indicating the client is IE and didn't bother to return the opaque string
|
* Flag indicating the client is IE and didn't bother to return the opaque string
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $ieNoOpaque;
|
protected $ieNoOpaque = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -149,10 +149,6 @@ class Http implements AdapterInterface
|
|||||||
*/
|
*/
|
||||||
public function __construct(array $config)
|
public function __construct(array $config)
|
||||||
{
|
{
|
||||||
$this->request = null;
|
|
||||||
$this->response = null;
|
|
||||||
$this->ieNoOpaque = false;
|
|
||||||
|
|
||||||
if (empty($config['accept_schemes'])) {
|
if (empty($config['accept_schemes'])) {
|
||||||
throw new Exception\InvalidArgumentException('Config key "accept_schemes" is required');
|
throw new Exception\InvalidArgumentException('Config key "accept_schemes" is required');
|
||||||
}
|
}
|
||||||
@ -181,6 +177,9 @@ class Http implements AdapterInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (in_array('digest', $this->acceptSchemes)) {
|
if (in_array('digest', $this->acceptSchemes)) {
|
||||||
|
$this->useOpaque = true;
|
||||||
|
$this->algo = 'MD5';
|
||||||
|
|
||||||
if (empty($config['digest_domains']) ||
|
if (empty($config['digest_domains']) ||
|
||||||
!ctype_print($config['digest_domains']) ||
|
!ctype_print($config['digest_domains']) ||
|
||||||
strpos($config['digest_domains'], '"') !== false) {
|
strpos($config['digest_domains'], '"') !== false) {
|
||||||
@ -204,22 +203,16 @@ class Http implements AdapterInterface
|
|||||||
// We use the opaque value unless explicitly told not to
|
// We use the opaque value unless explicitly told not to
|
||||||
if (isset($config['use_opaque']) && false == (bool) $config['use_opaque']) {
|
if (isset($config['use_opaque']) && false == (bool) $config['use_opaque']) {
|
||||||
$this->useOpaque = false;
|
$this->useOpaque = false;
|
||||||
} else {
|
|
||||||
$this->useOpaque = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($config['algorithm']) && in_array($config['algorithm'], $this->supportedAlgos)) {
|
if (isset($config['algorithm']) && in_array($config['algorithm'], $this->supportedAlgos)) {
|
||||||
$this->algo = $config['algorithm'];
|
$this->algo = (string) $config['algorithm'];
|
||||||
} else {
|
|
||||||
$this->algo = 'MD5';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't be a proxy unless explicitly told to do so
|
// Don't be a proxy unless explicitly told to do so
|
||||||
if (isset($config['proxy_auth']) && true == (bool) $config['proxy_auth']) {
|
if (isset($config['proxy_auth']) && true == (bool) $config['proxy_auth']) {
|
||||||
$this->imaProxy = true; // I'm a Proxy
|
$this->imaProxy = true; // I'm a Proxy
|
||||||
} else {
|
|
||||||
$this->imaProxy = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -727,7 +720,7 @@ class Http implements AdapterInterface
|
|||||||
if (!$ret || empty($temp[1])) {
|
if (!$ret || empty($temp[1])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (32 != strlen($temp[1]) || !ctype_xdigit($temp[1])) {
|
if (!$this->isValidMd5Hash($temp[1])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -778,7 +771,7 @@ class Http implements AdapterInterface
|
|||||||
|
|
||||||
// This implementation only sends MD5 hex strings in the opaque value
|
// This implementation only sends MD5 hex strings in the opaque value
|
||||||
if (!$this->ieNoOpaque &&
|
if (!$this->ieNoOpaque &&
|
||||||
(32 != strlen($temp[1]) || !ctype_xdigit($temp[1]))) {
|
!$this->isValidMd5Hash($temp[1])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -811,8 +804,17 @@ class Http implements AdapterInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data['nc'] = $temp[1];
|
$data['nc'] = $temp[1];
|
||||||
$temp = null;
|
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* validates if $value is a valid Md5 hash
|
||||||
|
* @param string $value
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
private function isValidMd5Hash($value)
|
||||||
|
{
|
||||||
|
return 32 == strlen($value) && ctype_xdigit($value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ class AuthenticationService implements AuthenticationServiceInterface
|
|||||||
$storage = $this->getStorage();
|
$storage = $this->getStorage();
|
||||||
|
|
||||||
if ($storage->isEmpty()) {
|
if ($storage->isEmpty()) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $storage->read();
|
return $storage->read();
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class Result
|
|||||||
*/
|
*/
|
||||||
public function isValid()
|
public function isValid()
|
||||||
{
|
{
|
||||||
return ($this->code > 0) ? true : false;
|
return ($this->code > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -8,11 +8,10 @@
|
|||||||
],
|
],
|
||||||
"homepage": "https://github.com/zendframework/zf2",
|
"homepage": "https://github.com/zendframework/zf2",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-4": {
|
||||||
"Zend\\Authentication\\": ""
|
"Zend\\Authentication\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"target-dir": "Zend/Authentication",
|
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.23",
|
"php": ">=5.3.23",
|
||||||
"zendframework/zend-stdlib": "self.version"
|
"zendframework/zend-stdlib": "self.version"
|
||||||
@ -37,8 +36,8 @@
|
|||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.3-dev",
|
"dev-master": "2.4-dev",
|
||||||
"dev-develop": "2.4-dev"
|
"dev-develop": "2.5-dev"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,14 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Zend\Barcode;
|
namespace Zend\Barcode;
|
||||||
|
|
||||||
use Traversable;
|
use Traversable;
|
||||||
|
use Zend\Barcode\Renderer\RendererInterface;
|
||||||
use Zend\Stdlib\ArrayUtils;
|
use Zend\Stdlib\ArrayUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -92,7 +93,7 @@ abstract class Barcode
|
|||||||
* @param mixed $barcodeConfig OPTIONAL; an array or Traversable object with barcode parameters.
|
* @param mixed $barcodeConfig OPTIONAL; an array or Traversable object with barcode parameters.
|
||||||
* @param mixed $rendererConfig OPTIONAL; an array or Traversable object with renderer parameters.
|
* @param mixed $rendererConfig OPTIONAL; an array or Traversable object with renderer parameters.
|
||||||
* @param bool $automaticRenderError OPTIONAL; set the automatic rendering of exception
|
* @param bool $automaticRenderError OPTIONAL; set the automatic rendering of exception
|
||||||
* @return Barcode
|
* @return RendererInterface
|
||||||
* @throws Exception\ExceptionInterface
|
* @throws Exception\ExceptionInterface
|
||||||
*/
|
*/
|
||||||
public static function factory(
|
public static function factory(
|
||||||
@ -146,7 +147,7 @@ abstract class Barcode
|
|||||||
* @param mixed $barcode String name of barcode class, or Traversable object, or barcode object.
|
* @param mixed $barcode String name of barcode class, or Traversable object, or barcode object.
|
||||||
* @param mixed $barcodeConfig OPTIONAL; an array or Traversable object with barcode parameters.
|
* @param mixed $barcodeConfig OPTIONAL; an array or Traversable object with barcode parameters.
|
||||||
* @throws Exception\InvalidArgumentException
|
* @throws Exception\InvalidArgumentException
|
||||||
* @return Object
|
* @return Object\ObjectInterface
|
||||||
*/
|
*/
|
||||||
public static function makeBarcode($barcode, $barcodeConfig = array())
|
public static function makeBarcode($barcode, $barcodeConfig = array())
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -21,48 +21,56 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Namespace of the barcode for autoloading
|
* Namespace of the barcode for autoloading
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $barcodeNamespace = 'Zend\Barcode\Object';
|
protected $barcodeNamespace = 'Zend\Barcode\Object';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set of drawing instructions
|
* Set of drawing instructions
|
||||||
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $instructions = array();
|
protected $instructions = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Barcode type
|
* Barcode type
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $type = null;
|
protected $type = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Height of the object
|
* Height of the object
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $height = null;
|
protected $height = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Width of the object
|
* Width of the object
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $width = null;
|
protected $width = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Height of the bar
|
* Height of the bar
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $barHeight = 50;
|
protected $barHeight = 50;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Width of a thin bar
|
* Width of a thin bar
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $barThinWidth = 1;
|
protected $barThinWidth = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Width of a thick bar
|
* Width of a thick bar
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $barThickWidth = 3;
|
protected $barThickWidth = 3;
|
||||||
@ -70,42 +78,49 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Factor to multiply bar and font measure
|
* Factor to multiply bar and font measure
|
||||||
* (barHeight, barThinWidth, barThickWidth & fontSize)
|
* (barHeight, barThinWidth, barThickWidth & fontSize)
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $factor = 1;
|
protected $factor = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Font and bars color of the object
|
* Font and bars color of the object
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $foreColor = 0x000000;
|
protected $foreColor = 0x000000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Background color of the object
|
* Background color of the object
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $backgroundColor = 0xFFFFFF;
|
protected $backgroundColor = 0xFFFFFF;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate/deactivate border of the object
|
* Activate/deactivate border of the object
|
||||||
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $withBorder = false;
|
protected $withBorder = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate/deactivate drawing of quiet zones
|
* Activate/deactivate drawing of quiet zones
|
||||||
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $withQuietZones = true;
|
protected $withQuietZones = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Force quiet zones even if
|
* Force quiet zones even if
|
||||||
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $mandatoryQuietZones = false;
|
protected $mandatoryQuietZones = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Orientation of the barcode in degrees
|
* Orientation of the barcode in degrees
|
||||||
|
*
|
||||||
* @var float
|
* @var float
|
||||||
*/
|
*/
|
||||||
protected $orientation = 0;
|
protected $orientation = 0;
|
||||||
@ -113,6 +128,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Offset from the top the object
|
* Offset from the top the object
|
||||||
* (calculated from the orientation)
|
* (calculated from the orientation)
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $offsetTop = null;
|
protected $offsetTop = null;
|
||||||
@ -120,24 +136,28 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Offset from the left the object
|
* Offset from the left the object
|
||||||
* (calculated from the orientation)
|
* (calculated from the orientation)
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $offsetLeft = null;
|
protected $offsetLeft = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Text to display
|
* Text to display
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $text = null;
|
protected $text = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display (or not) human readable text
|
* Display (or not) human readable text
|
||||||
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $drawText = true;
|
protected $drawText = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adjust (or not) position of human readable characters with barcode
|
* Adjust (or not) position of human readable characters with barcode
|
||||||
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $stretchText = false;
|
protected $stretchText = false;
|
||||||
@ -146,30 +166,35 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
* Font resource
|
* Font resource
|
||||||
* - integer (1 to 5): corresponds to GD included fonts
|
* - integer (1 to 5): corresponds to GD included fonts
|
||||||
* - string: corresponds to path of a TTF font
|
* - string: corresponds to path of a TTF font
|
||||||
|
*
|
||||||
* @var int|string
|
* @var int|string
|
||||||
*/
|
*/
|
||||||
protected $font = null;
|
protected $font = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Font size
|
* Font size
|
||||||
|
*
|
||||||
* @var float
|
* @var float
|
||||||
*/
|
*/
|
||||||
protected $fontSize = 10;
|
protected $fontSize = 10;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drawing of checksum
|
* Drawing of checksum
|
||||||
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $withChecksum = false;
|
protected $withChecksum = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drawing of checksum inside text
|
* Drawing of checksum inside text
|
||||||
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $withChecksumInText = false;
|
protected $withChecksumInText = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fix barcode length (numeric or string like 'even')
|
* Fix barcode length (numeric or string like 'even')
|
||||||
|
*
|
||||||
* @var int | string
|
* @var int | string
|
||||||
*/
|
*/
|
||||||
protected $barcodeLength = null;
|
protected $barcodeLength = null;
|
||||||
@ -177,6 +202,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Activate automatic addition of leading zeros
|
* Activate automatic addition of leading zeros
|
||||||
* if barcode length is fixed
|
* if barcode length is fixed
|
||||||
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $addLeadingZeros = true;
|
protected $addLeadingZeros = true;
|
||||||
@ -184,18 +210,21 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Activation of mandatory checksum
|
* Activation of mandatory checksum
|
||||||
* to deactivate unauthorized modification
|
* to deactivate unauthorized modification
|
||||||
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $mandatoryChecksum = false;
|
protected $mandatoryChecksum = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Character used to substitute checksum character for validation
|
* Character used to substitute checksum character for validation
|
||||||
|
*
|
||||||
* @var mixed
|
* @var mixed
|
||||||
*/
|
*/
|
||||||
protected $substituteChecksumCharacter = 0;
|
protected $substituteChecksumCharacter = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
*
|
||||||
* @param array|Traversable $options
|
* @param array|Traversable $options
|
||||||
*/
|
*/
|
||||||
public function __construct($options = null)
|
public function __construct($options = null)
|
||||||
@ -217,7 +246,6 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set default options for particular object
|
* Set default options for particular object
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
protected function getDefaultOptions()
|
protected function getDefaultOptions()
|
||||||
{
|
{
|
||||||
@ -225,6 +253,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set barcode state from options array
|
* Set barcode state from options array
|
||||||
|
*
|
||||||
* @param array $options
|
* @param array $options
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
*/
|
*/
|
||||||
@ -263,6 +292,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve type of barcode
|
* Retrieve type of barcode
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getType()
|
public function getType()
|
||||||
@ -272,6 +302,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set height of the barcode bar
|
* Set height of the barcode bar
|
||||||
|
*
|
||||||
* @param int $value
|
* @param int $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
@ -289,6 +320,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get height of the barcode bar
|
* Get height of the barcode bar
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getBarHeight()
|
public function getBarHeight()
|
||||||
@ -298,6 +330,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set thickness of thin bar
|
* Set thickness of thin bar
|
||||||
|
*
|
||||||
* @param int $value
|
* @param int $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
@ -315,6 +348,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get thickness of thin bar
|
* Get thickness of thin bar
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getBarThinWidth()
|
public function getBarThinWidth()
|
||||||
@ -324,6 +358,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set thickness of thick bar
|
* Set thickness of thick bar
|
||||||
|
*
|
||||||
* @param int $value
|
* @param int $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
@ -341,6 +376,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get thickness of thick bar
|
* Get thickness of thick bar
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getBarThickWidth()
|
public function getBarThickWidth()
|
||||||
@ -351,7 +387,8 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Set factor applying to
|
* Set factor applying to
|
||||||
* thinBarWidth - thickBarWidth - barHeight - fontSize
|
* thinBarWidth - thickBarWidth - barHeight - fontSize
|
||||||
* @param float $value
|
*
|
||||||
|
* @param int|float|string|bool $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
*/
|
*/
|
||||||
@ -369,6 +406,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Get factor applying to
|
* Get factor applying to
|
||||||
* thinBarWidth - thickBarWidth - barHeight - fontSize
|
* thinBarWidth - thickBarWidth - barHeight - fontSize
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getFactor()
|
public function getFactor()
|
||||||
@ -378,6 +416,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set color of the barcode and text
|
* Set color of the barcode and text
|
||||||
|
*
|
||||||
* @param string $value
|
* @param string $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
@ -398,6 +437,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve color of the barcode and text
|
* Retrieve color of the barcode and text
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getForeColor()
|
public function getForeColor()
|
||||||
@ -407,6 +447,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the color of the background
|
* Set the color of the background
|
||||||
|
*
|
||||||
* @param int $value
|
* @param int $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
@ -427,6 +468,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve background color of the image
|
* Retrieve background color of the image
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getBackgroundColor()
|
public function getBackgroundColor()
|
||||||
@ -436,6 +478,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate/deactivate drawing of the bar
|
* Activate/deactivate drawing of the bar
|
||||||
|
*
|
||||||
* @param bool $value
|
* @param bool $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
*/
|
*/
|
||||||
@ -447,6 +490,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve if border are draw or not
|
* Retrieve if border are draw or not
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getWithBorder()
|
public function getWithBorder()
|
||||||
@ -456,6 +500,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate/deactivate drawing of the quiet zones
|
* Activate/deactivate drawing of the quiet zones
|
||||||
|
*
|
||||||
* @param bool $value
|
* @param bool $value
|
||||||
* @return AbstractObject
|
* @return AbstractObject
|
||||||
*/
|
*/
|
||||||
@ -467,6 +512,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve if quiet zones are draw or not
|
* Retrieve if quiet zones are draw or not
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getWithQuietZones()
|
public function getWithQuietZones()
|
||||||
@ -476,6 +522,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow fast inversion of font/bars color and background color
|
* Allow fast inversion of font/bars color and background color
|
||||||
|
*
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
*/
|
*/
|
||||||
public function setReverseColor()
|
public function setReverseColor()
|
||||||
@ -488,7 +535,8 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set orientation of barcode and text
|
* Set orientation of barcode and text
|
||||||
* @param float $value
|
*
|
||||||
|
* @param int|float|string|bool $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
*/
|
*/
|
||||||
@ -500,6 +548,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve orientation of barcode and text
|
* Retrieve orientation of barcode and text
|
||||||
|
*
|
||||||
* @return float
|
* @return float
|
||||||
*/
|
*/
|
||||||
public function getOrientation()
|
public function getOrientation()
|
||||||
@ -509,6 +558,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set text to encode
|
* Set text to encode
|
||||||
|
*
|
||||||
* @param string $value
|
* @param string $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
*/
|
*/
|
||||||
@ -520,6 +570,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve text to encode
|
* Retrieve text to encode
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getText()
|
public function getText()
|
||||||
@ -533,8 +584,9 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Automatically add leading zeros if barcode length is fixed
|
* Automatically add leading zeros if barcode length is fixed
|
||||||
* @param string $text
|
*
|
||||||
* @param bool $withoutChecksum
|
* @param string $text
|
||||||
|
* @param bool $withoutChecksum
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function addLeadingZeros($text, $withoutChecksum = false)
|
protected function addLeadingZeros($text, $withoutChecksum = false)
|
||||||
@ -557,6 +609,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve text to encode
|
* Retrieve text to encode
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getRawText()
|
public function getRawText()
|
||||||
@ -566,6 +619,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve text to display
|
* Retrieve text to display
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getTextToDisplay()
|
public function getTextToDisplay()
|
||||||
@ -579,6 +633,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate/deactivate drawing of text to encode
|
* Activate/deactivate drawing of text to encode
|
||||||
|
*
|
||||||
* @param bool $value
|
* @param bool $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
*/
|
*/
|
||||||
@ -590,6 +645,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve if drawing of text to encode is enabled
|
* Retrieve if drawing of text to encode is enabled
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getDrawText()
|
public function getDrawText()
|
||||||
@ -600,6 +656,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Activate/deactivate the adjustment of the position
|
* Activate/deactivate the adjustment of the position
|
||||||
* of the characters to the position of the bars
|
* of the characters to the position of the bars
|
||||||
|
*
|
||||||
* @param bool $value
|
* @param bool $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
@ -613,6 +670,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Retrieve if the adjustment of the position of the characters
|
* Retrieve if the adjustment of the position of the characters
|
||||||
* to the position of the bars is enabled
|
* to the position of the bars is enabled
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getStretchText()
|
public function getStretchText()
|
||||||
@ -624,6 +682,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
* Activate/deactivate the automatic generation
|
* Activate/deactivate the automatic generation
|
||||||
* of the checksum character
|
* of the checksum character
|
||||||
* added to the barcode text
|
* added to the barcode text
|
||||||
|
*
|
||||||
* @param bool $value
|
* @param bool $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
*/
|
*/
|
||||||
@ -638,6 +697,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Retrieve if the checksum character is automatically
|
* Retrieve if the checksum character is automatically
|
||||||
* added to the barcode text
|
* added to the barcode text
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getWithChecksum()
|
public function getWithChecksum()
|
||||||
@ -649,6 +709,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
* Activate/deactivate the automatic generation
|
* Activate/deactivate the automatic generation
|
||||||
* of the checksum character
|
* of the checksum character
|
||||||
* added to the barcode text
|
* added to the barcode text
|
||||||
|
*
|
||||||
* @param bool $value
|
* @param bool $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
@ -664,6 +725,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Retrieve if the checksum character is automatically
|
* Retrieve if the checksum character is automatically
|
||||||
* added to the barcode text
|
* added to the barcode text
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getWithChecksumInText()
|
public function getWithChecksumInText()
|
||||||
@ -675,6 +737,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
* Set the font:
|
* Set the font:
|
||||||
* - if integer between 1 and 5, use gd built-in fonts
|
* - if integer between 1 and 5, use gd built-in fonts
|
||||||
* - if string, $value is assumed to be the path to a TTF font
|
* - if string, $value is assumed to be the path to a TTF font
|
||||||
|
*
|
||||||
* @param int|string $value
|
* @param int|string $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
@ -706,6 +769,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the font
|
* Retrieve the font
|
||||||
|
*
|
||||||
* @return int|string
|
* @return int|string
|
||||||
*/
|
*/
|
||||||
public function getFont()
|
public function getFont()
|
||||||
@ -715,6 +779,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the size of the font in case of TTF
|
* Set the size of the font in case of TTF
|
||||||
|
*
|
||||||
* @param float $value
|
* @param float $value
|
||||||
* @return \Zend\Barcode\Object\ObjectInterface
|
* @return \Zend\Barcode\Object\ObjectInterface
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
@ -748,6 +813,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Quiet zone before first bar
|
* Quiet zone before first bar
|
||||||
* and after the last bar
|
* and after the last bar
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getQuietZone()
|
public function getQuietZone()
|
||||||
@ -761,6 +827,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an instruction in the array of instructions
|
* Add an instruction in the array of instructions
|
||||||
|
*
|
||||||
* @param array $instruction
|
* @param array $instruction
|
||||||
*/
|
*/
|
||||||
protected function addInstruction(array $instruction)
|
protected function addInstruction(array $instruction)
|
||||||
@ -770,6 +837,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the set of drawing instructions
|
* Retrieve the set of drawing instructions
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getInstructions()
|
public function getInstructions()
|
||||||
@ -779,9 +847,10 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a polygon drawing instruction in the set of instructions
|
* Add a polygon drawing instruction in the set of instructions
|
||||||
|
*
|
||||||
* @param array $points
|
* @param array $points
|
||||||
* @param int $color
|
* @param int $color
|
||||||
* @param bool $filled
|
* @param bool $filled
|
||||||
*/
|
*/
|
||||||
protected function addPolygon(array $points, $color = null, $filled = true)
|
protected function addPolygon(array $points, $color = null, $filled = true)
|
||||||
{
|
{
|
||||||
@ -798,13 +867,14 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a text drawing instruction in the set of instructions
|
* Add a text drawing instruction in the set of instructions
|
||||||
|
*
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @param float $size
|
* @param float $size
|
||||||
* @param int[] $position
|
* @param int[] $position
|
||||||
* @param string $font
|
* @param string $font
|
||||||
* @param int $color
|
* @param int $color
|
||||||
* @param string $alignment
|
* @param string $alignment
|
||||||
* @param float $orientation
|
* @param float|int $orientation
|
||||||
*/
|
*/
|
||||||
protected function addText(
|
protected function addText(
|
||||||
$text,
|
$text,
|
||||||
@ -832,6 +902,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checking of parameters after all settings
|
* Checking of parameters after all settings
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function checkParams()
|
public function checkParams()
|
||||||
@ -844,8 +915,8 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a text is really provided to barcode
|
* Check if a text is really provided to barcode
|
||||||
|
*
|
||||||
* @param string|null $value
|
* @param string|null $value
|
||||||
* @return void
|
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
*/
|
*/
|
||||||
protected function checkText($value = null)
|
protected function checkText($value = null)
|
||||||
@ -863,9 +934,9 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check the ratio between the thick and the thin bar
|
* Check the ratio between the thick and the thin bar
|
||||||
|
*
|
||||||
* @param int $min
|
* @param int $min
|
||||||
* @param int $max
|
* @param int $max
|
||||||
* @return void
|
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
*/
|
*/
|
||||||
protected function checkRatio($min = 2, $max = 3)
|
protected function checkRatio($min = 2, $max = 3)
|
||||||
@ -883,7 +954,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Drawing with an angle is just allow TTF font
|
* Drawing with an angle is just allow TTF font
|
||||||
* @return void
|
*
|
||||||
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
* @throws \Zend\Barcode\Object\Exception\ExceptionInterface
|
||||||
*/
|
*/
|
||||||
protected function checkFontAndOrientation()
|
protected function checkFontAndOrientation()
|
||||||
@ -898,6 +969,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Width of the result image
|
* Width of the result image
|
||||||
* (before any rotation)
|
* (before any rotation)
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
protected function calculateWidth()
|
protected function calculateWidth()
|
||||||
@ -909,12 +981,14 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate the width of the barcode
|
* Calculate the width of the barcode
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
abstract protected function calculateBarcodeWidth();
|
abstract protected function calculateBarcodeWidth();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Height of the result object
|
* Height of the result object
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
protected function calculateHeight()
|
protected function calculateHeight()
|
||||||
@ -926,6 +1000,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Height of the barcode
|
* Height of the barcode
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
protected function calculateBarcodeHeight()
|
protected function calculateBarcodeHeight()
|
||||||
@ -941,6 +1016,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get height of the result object
|
* Get height of the result object
|
||||||
|
*
|
||||||
* @param bool $recalculate
|
* @param bool $recalculate
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@ -956,6 +1032,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get width of the result object
|
* Get width of the result object
|
||||||
|
*
|
||||||
* @param bool $recalculate
|
* @param bool $recalculate
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@ -972,6 +1049,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Calculate the offset from the left of the object
|
* Calculate the offset from the left of the object
|
||||||
* if an orientation is activated
|
* if an orientation is activated
|
||||||
|
*
|
||||||
* @param bool $recalculate
|
* @param bool $recalculate
|
||||||
* @return float
|
* @return float
|
||||||
*/
|
*/
|
||||||
@ -993,6 +1071,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Calculate the offset from the top of the object
|
* Calculate the offset from the top of the object
|
||||||
* if an orientation is activated
|
* if an orientation is activated
|
||||||
|
*
|
||||||
* @param bool $recalculate
|
* @param bool $recalculate
|
||||||
* @return float
|
* @return float
|
||||||
*/
|
*/
|
||||||
@ -1013,9 +1092,10 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply rotation on a point in X/Y dimensions
|
* Apply rotation on a point in X/Y dimensions
|
||||||
* @param float $x1 x-position before rotation
|
*
|
||||||
* @param float $y1 y-position before rotation
|
* @param float $x1 x-position before rotation
|
||||||
* @return int[] Array of two elements corresponding to the new XY point
|
* @param float $y1 y-position before rotation
|
||||||
|
* @return array Array of two elements corresponding to the new XY point
|
||||||
*/
|
*/
|
||||||
protected function rotate($x1, $y1)
|
protected function rotate($x1, $y1)
|
||||||
{
|
{
|
||||||
@ -1030,6 +1110,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Complete drawing of the barcode
|
* Complete drawing of the barcode
|
||||||
|
*
|
||||||
* @return array Table of instructions
|
* @return array Table of instructions
|
||||||
*/
|
*/
|
||||||
public function draw()
|
public function draw()
|
||||||
@ -1043,7 +1124,6 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Draw the barcode
|
* Draw the barcode
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
protected function drawBarcode()
|
protected function drawBarcode()
|
||||||
{
|
{
|
||||||
@ -1100,7 +1180,6 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Partial function to draw border
|
* Partial function to draw border
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
protected function drawBorder()
|
protected function drawBorder()
|
||||||
{
|
{
|
||||||
@ -1124,7 +1203,6 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Partial function to draw text
|
* Partial function to draw text
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
protected function drawText()
|
protected function drawText()
|
||||||
{
|
{
|
||||||
@ -1167,8 +1245,8 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check for invalid characters
|
* Check for invalid characters
|
||||||
* @param string $value Text to be checked
|
*
|
||||||
* @return void
|
* @param string $value Text to be checked
|
||||||
*/
|
*/
|
||||||
public function validateText($value)
|
public function validateText($value)
|
||||||
{
|
{
|
||||||
@ -1177,6 +1255,7 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Standard validation for most of barcode objects
|
* Standard validation for most of barcode objects
|
||||||
|
*
|
||||||
* @param string $value
|
* @param string $value
|
||||||
* @param array $options
|
* @param array $options
|
||||||
*/
|
*/
|
||||||
@ -1222,15 +1301,11 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checking of parameters after all settings
|
* Checking of parameters after all settings
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
abstract protected function checkSpecificParams();
|
abstract protected function checkSpecificParams();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow each child to draw something else
|
* Allow each child to draw something else
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
protected function preDrawBarcode()
|
protected function preDrawBarcode()
|
||||||
{
|
{
|
||||||
@ -1239,8 +1314,6 @@ abstract class AbstractObject implements ObjectInterface
|
|||||||
/**
|
/**
|
||||||
* Allow each child to draw something else
|
* Allow each child to draw something else
|
||||||
* (ex: bearer bars in interleaved 2 of 5 code)
|
* (ex: bearer bars in interleaved 2 of 5 code)
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
protected function postDrawBarcode()
|
protected function postDrawBarcode()
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -52,13 +52,13 @@ abstract class AbstractRenderer implements RendererInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Horizontal position of the barcode in the rendering resource
|
* Horizontal position of the barcode in the rendering resource
|
||||||
* @var int
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $horizontalPosition = 'left';
|
protected $horizontalPosition = 'left';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vertical position of the barcode in the rendering resource
|
* Vertical position of the barcode in the rendering resource
|
||||||
* @var int
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $verticalPosition = 'top';
|
protected $verticalPosition = 'top';
|
||||||
|
|
||||||
@ -501,7 +501,7 @@ abstract class AbstractRenderer implements RendererInterface
|
|||||||
* @param string $font
|
* @param string $font
|
||||||
* @param int $color
|
* @param int $color
|
||||||
* @param string $alignment
|
* @param string $alignment
|
||||||
* @param float $orientation
|
* @param float|int $orientation
|
||||||
*/
|
*/
|
||||||
abstract protected function drawText(
|
abstract protected function drawText(
|
||||||
$text,
|
$text,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -204,6 +204,11 @@ class Image extends AbstractRenderer
|
|||||||
$height = $this->userHeight;
|
$height = $this->userHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cast width and height to ensure they are correct type for image
|
||||||
|
// operations
|
||||||
|
$width = (int) $width;
|
||||||
|
$height = (int) $height;
|
||||||
|
|
||||||
$this->resource = imagecreatetruecolor($width, $height);
|
$this->resource = imagecreatetruecolor($width, $height);
|
||||||
|
|
||||||
$white = imagecolorallocate($this->resource, 255, 255, 255);
|
$white = imagecolorallocate($this->resource, 255, 255, 255);
|
||||||
@ -238,8 +243,8 @@ class Image extends AbstractRenderer
|
|||||||
$this->resource,
|
$this->resource,
|
||||||
$this->leftOffset,
|
$this->leftOffset,
|
||||||
$this->topOffset,
|
$this->topOffset,
|
||||||
$this->leftOffset + $barcodeWidth - 1,
|
(int) ($this->leftOffset + $barcodeWidth - 1),
|
||||||
$this->topOffset + $barcodeHeight - 1,
|
(int) ($this->topOffset + $barcodeHeight - 1),
|
||||||
$this->imageBackgroundColor
|
$this->imageBackgroundColor
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -358,7 +363,7 @@ class Image extends AbstractRenderer
|
|||||||
* @param string $font
|
* @param string $font
|
||||||
* @param int $color
|
* @param int $color
|
||||||
* @param string $alignment
|
* @param string $alignment
|
||||||
* @param float $orientation
|
* @param float|int $orientation
|
||||||
* @throws Exception\RuntimeException
|
* @throws Exception\RuntimeException
|
||||||
*/
|
*/
|
||||||
protected function drawText($text, $size, $position, $font, $color, $alignment = 'center', $orientation = 0)
|
protected function drawText($text, $size, $position, $font, $color, $alignment = 'center', $orientation = 0)
|
||||||
@ -370,7 +375,7 @@ class Image extends AbstractRenderer
|
|||||||
$color & 0x0000FF
|
$color & 0x0000FF
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($font == null) {
|
if ($font === null) {
|
||||||
$font = 3;
|
$font = 3;
|
||||||
}
|
}
|
||||||
$position[0] += $this->leftOffset;
|
$position[0] += $this->leftOffset;
|
||||||
@ -382,7 +387,7 @@ class Image extends AbstractRenderer
|
|||||||
* imagestring() doesn't allow orientation, if orientation
|
* imagestring() doesn't allow orientation, if orientation
|
||||||
* needed: a TTF font is required.
|
* needed: a TTF font is required.
|
||||||
* Throwing an exception here, allow to use automaticRenderError
|
* Throwing an exception here, allow to use automaticRenderError
|
||||||
* to informe user of the problem instead of simply not drawing
|
* to inform user of the problem instead of simply not drawing
|
||||||
* the text
|
* the text
|
||||||
*/
|
*/
|
||||||
throw new Exception\RuntimeException(
|
throw new Exception\RuntimeException(
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -8,11 +8,10 @@
|
|||||||
],
|
],
|
||||||
"homepage": "https://github.com/zendframework/zf2",
|
"homepage": "https://github.com/zendframework/zf2",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-4": {
|
||||||
"Zend\\Barcode\\": ""
|
"Zend\\Barcode\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"target-dir": "Zend/Barcode",
|
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.23",
|
"php": ">=5.3.23",
|
||||||
"zendframework/zend-stdlib": "self.version",
|
"zendframework/zend-stdlib": "self.version",
|
||||||
@ -28,8 +27,8 @@
|
|||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.3-dev",
|
"dev-master": "2.4-dev",
|
||||||
"dev-develop": "2.4-dev"
|
"dev-develop": "2.5-dev"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ class CallbackCache extends AbstractPattern
|
|||||||
$cacheOutput = $options->getCacheOutput();
|
$cacheOutput = $options->getCacheOutput();
|
||||||
if ($cacheOutput) {
|
if ($cacheOutput) {
|
||||||
ob_start();
|
ob_start();
|
||||||
ob_implicit_flush(false);
|
ob_implicit_flush(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: do not cache on errors using [set|restore]_error_handler
|
// TODO: do not cache on errors using [set|restore]_error_handler
|
||||||
@ -137,9 +137,11 @@ class CallbackCache extends AbstractPattern
|
|||||||
$callbackKey = strtolower($callbackKey);
|
$callbackKey = strtolower($callbackKey);
|
||||||
|
|
||||||
// generate a unique key of object callbacks
|
// generate a unique key of object callbacks
|
||||||
if (is_object($callback)) { // Closures & __invoke
|
if (is_object($callback)) {
|
||||||
|
// Closures & __invoke
|
||||||
$object = $callback;
|
$object = $callback;
|
||||||
} elseif (isset($callback[0])) { // array($object, 'method')
|
} elseif (isset($callback[0])) {
|
||||||
|
// array($object, 'method')
|
||||||
$object = $callback[0];
|
$object = $callback[0];
|
||||||
}
|
}
|
||||||
if (isset($object)) {
|
if (isset($object)) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ class CaptureCache extends AbstractPattern
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
ob_implicit_flush(false);
|
ob_implicit_flush(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -301,14 +301,14 @@ class CaptureCache extends AbstractPattern
|
|||||||
// build-in mkdir function is enough
|
// build-in mkdir function is enough
|
||||||
|
|
||||||
$umask = ($umask !== false) ? umask($umask) : false;
|
$umask = ($umask !== false) ? umask($umask) : false;
|
||||||
$res = mkdir($pathname, ($perm !== false) ? $perm : 0777, true);
|
$res = mkdir($pathname, ($perm !== false) ? $perm : 0775, true);
|
||||||
|
|
||||||
if ($umask !== false) {
|
if ($umask !== false) {
|
||||||
umask($umask);
|
umask($umask);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$res) {
|
if (!$res) {
|
||||||
$oct = ($perm === false) ? '777' : decoct($perm);
|
$oct = ($perm === false) ? '775' : decoct($perm);
|
||||||
$err = ErrorHandler::stop();
|
$err = ErrorHandler::stop();
|
||||||
throw new Exception\RuntimeException("mkdir('{$pathname}', 0{$oct}, true) failed", 0, $err);
|
throw new Exception\RuntimeException("mkdir('{$pathname}', 0{$oct}, true) failed", 0, $err);
|
||||||
}
|
}
|
||||||
@ -341,13 +341,13 @@ class CaptureCache extends AbstractPattern
|
|||||||
|
|
||||||
// create a single directory, set and reset umask immediately
|
// create a single directory, set and reset umask immediately
|
||||||
$umask = ($umask !== false) ? umask($umask) : false;
|
$umask = ($umask !== false) ? umask($umask) : false;
|
||||||
$res = mkdir($path, ($perm === false) ? 0777 : $perm, false);
|
$res = mkdir($path, ($perm === false) ? 0775 : $perm, false);
|
||||||
if ($umask !== false) {
|
if ($umask !== false) {
|
||||||
umask($umask);
|
umask($umask);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$res) {
|
if (!$res) {
|
||||||
$oct = ($perm === false) ? '777' : decoct($perm);
|
$oct = ($perm === false) ? '775' : decoct($perm);
|
||||||
ErrorHandler::stop();
|
ErrorHandler::stop();
|
||||||
throw new Exception\RuntimeException(
|
throw new Exception\RuntimeException(
|
||||||
"mkdir('{$path}', 0{$oct}, false) failed"
|
"mkdir('{$path}', 0{$oct}, false) failed"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Zend Framework (http://framework.zend.com/)
|
* Zend Framework (http://framework.zend.com/)
|
||||||
*
|
*
|
||||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||||
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ class OutputCache extends AbstractPattern
|
|||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
ob_implicit_flush(false);
|
ob_implicit_flush(0);
|
||||||
$this->keyStack[] = $key;
|
$this->keyStack[] = $key;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user