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

Commit

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

namespace Zend\Stdlib;

/**
* @category Zend
* @package Zend_Stdlib
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface ArraySerializableInterface
{
/**
* Exchange internal values from provided array
*
* @param array $array
* @return void
*/
public function exchangeArray(array $array);

/**
* Return an array representation of the object
*
* @return array
*/
public function getArrayCopy();
}
7 changes: 2 additions & 5 deletions src/ArrayStack.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Stdlib;

use ArrayIterator,
ArrayObject;
use ArrayIterator;
use ArrayObject;

/**
* ArrayObject that acts as a stack with regards to iteration
Expand Down
14 changes: 8 additions & 6 deletions src/CallbackHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Stdlib;

use Closure,
ReflectionClass,
WeakRef;
use Closure;
use ReflectionClass;
use WeakRef;

/**
* CallbackHandler
Expand Down Expand Up @@ -166,6 +163,11 @@ public function call(array $args = array())
{
$callback = $this->getCallback();

// WeakRef object will return null if the real object was disposed
if (null === $callback) {
return null;
}

$isPhp54 = version_compare(PHP_VERSION, '5.4.0rc1', '>=');

if ($isPhp54 && is_string($callback)) {
Expand Down
7 changes: 0 additions & 7 deletions src/Dispatchable.php

This file was deleted.

10 changes: 10 additions & 0 deletions src/DispatchableInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
namespace Zend\Stdlib;

use Zend\Stdlib\ResponseInterface as Response,
Zend\Stdlib\RequestInterface as Request;

interface DispatchableInterface
{
public function dispatch(Request $request, Response $response = null);
}
7 changes: 0 additions & 7 deletions src/Exception.php

This file was deleted.

8 changes: 1 addition & 7 deletions src/Exception/BadMethodCallException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

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

use Zend\Stdlib\Exception;

/**
* Bad method call exception
*
Expand All @@ -33,7 +28,6 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class BadMethodCallException extends \BadMethodCallException
implements Exception
class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
{
}
4 changes: 1 addition & 3 deletions src/Exception/DomainException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Zend\Stdlib\Exception;

use Zend\Stdlib\Exception;

class DomainException extends \DomainException implements Exception
class DomainException extends \DomainException implements ExceptionInterface
{
}
7 changes: 7 additions & 0 deletions src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Zend\Stdlib\Exception;

interface ExceptionInterface
{
}
6 changes: 1 addition & 5 deletions src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

namespace Zend\Stdlib\Exception;

use Zend\Stdlib\Exception;

class InvalidArgumentException
extends \InvalidArgumentException
implements Exception
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
{
}
11 changes: 1 addition & 10 deletions src/Exception/InvalidCallbackException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,16 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

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

use Zend\Stdlib\Exception;

/**
* Invalid callback exception
*
* @uses Exception
* @uses Zend\Stdlib\Exception
* @category Zend
* @package Zend_Stdlib
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class InvalidCallbackException
extends DomainException
implements Exception
class InvalidCallbackException extends DomainException implements ExceptionInterface
{
}
7 changes: 1 addition & 6 deletions src/Exception/LogicException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

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

use Zend\Stdlib\Exception;

/**
* logic exception
*
Expand All @@ -33,6 +28,6 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class LogicException extends \LogicException implements Exception
class LogicException extends \LogicException implements ExceptionInterface
{
}
Loading

0 comments on commit 736df07

Please sign in to comment.