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

Commit

Permalink
Merge branch 'master' into rfc/escaper
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 15 changed files with 228 additions and 221 deletions.
36 changes: 0 additions & 36 deletions src/Exception.php

This file was deleted.

22 changes: 22 additions & 0 deletions src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Uri
*/

namespace Zend\Uri\Exception;

/**
* Exception for Zend_Uri
*
* @category Zend
* @package Zend_Uri
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface ExceptionInterface
{}
10 changes: 9 additions & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Uri
*/

namespace Zend\Uri\Exception;

class InvalidArgumentException
extends \InvalidArgumentException
implements \Zend\Uri\Exception
implements ExceptionInterface
{}
32 changes: 6 additions & 26 deletions src/Exception/InvalidUriException.php
Original file line number Diff line number Diff line change
@@ -1,42 +1,22 @@
<?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.
* Zend Framework (http://framework.zend.com/)
*
* @category Zend
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Uri
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

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

/**
* Exceptions for Zend_Uri
*
* @uses \Zend\URI\Exception
* @category Zend
* @package Zend_Uri
* @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 InvalidUriException
extends \InvalidArgumentException
implements \Zend\Uri\Exception
{

}
class InvalidUriException extends InvalidArgumentException
{}
21 changes: 17 additions & 4 deletions src/Exception/InvalidUriPartException.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Uri
*/

namespace Zend\Uri\Exception;

class InvalidUriPartException
extends \InvalidArgumentException
implements \Zend\Uri\Exception
/**
* @category Zend
* @package Zend_Uri
* @subpackage Exception
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class InvalidUriPartException extends InvalidArgumentException
{
/**
* Part-specific error codes
Expand All @@ -21,4 +34,4 @@ class InvalidUriPartException
const INVALID_PATH = 32;
const INVALID_QUERY = 64;
const INVALID_FRAGMENT = 128;
}
}
32 changes: 6 additions & 26 deletions src/Exception/InvalidUriTypeException.php
Original file line number Diff line number Diff line change
@@ -1,42 +1,22 @@
<?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.
* Zend Framework (http://framework.zend.com/)
*
* @category Zend
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Uri
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

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

/**
* Exceptions for Zend_Uri
*
* @uses \Zend\URI\Exception
* @category Zend
* @package Zend_Uri
* @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 InvalidUriTypeException
extends \InvalidArgumentException
implements \Zend\Uri\Exception
{

}
class InvalidUriTypeException extends InvalidArgumentException
{}
27 changes: 8 additions & 19 deletions src/File.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Uri
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Uri
*/

/**
* @namespace
*/
namespace Zend\Uri;

/**
Expand Down Expand Up @@ -59,7 +46,8 @@ public function isValid()
* User Info part is not used in file URIs
*
* @see Uri::setUserInfo()
* @throws Exception\InvalidUriPartException
* @param string $userInfo
* @return File
*/
public function setUserInfo($userInfo)
{
Expand All @@ -70,7 +58,8 @@ public function setUserInfo($userInfo)
* Fragment part is not used in file URIs
*
* @see Uri::setFragment()
* @throws Exception\InvalidUriPartException
* @param string $fragment
* @return File
*/
public function setFragment($fragment)
{
Expand Down
28 changes: 9 additions & 19 deletions src/Http.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Uri
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Uri
*/

/**
* @namespace
*/
namespace Zend\Uri;

/**
Expand All @@ -36,7 +23,10 @@ class Http extends Uri
/**
* @see Uri::$validSchemes
*/
protected static $validSchemes = array('http', 'https');
protected static $validSchemes = array(
'http',
'https'
);

/**
* @see Uri::$defaultPorts
Expand All @@ -49,7 +39,7 @@ class Http extends Uri
/**
* @see Uri::$validHostTypes
*/
protected $validHostTypes = self::HOST_DNSORIPV4;
protected $validHostTypes = self::HOST_DNSORIPV6;

/**
* User name as provided in authority of URI
Expand Down
29 changes: 8 additions & 21 deletions src/Mailto.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Uri
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Uri
*/

/**
* @namespace
*/
namespace Zend\Uri;

use Zend\Validator\Validator,
use Zend\Validator\ValidatorInterface,
Zend\Validator\EmailAddress as EmailValidator;

/**
* "Mailto" URI handler
*
* The 'mailto:...' scheme is loosly defined in RFC-1738
* The 'mailto:...' scheme is loosely defined in RFC-1738
*
* @category Zend
* @package Zend_Uri
Expand All @@ -42,7 +29,7 @@ class Mailto extends Uri

/**
* Validator for use when validating email address
* @var Validator
* @var ValidatorInterface
*/
protected $emailValidator;

Expand Down Expand Up @@ -104,7 +91,7 @@ public function getEmail()
* @param Validator $validator
* @return Mailto
*/
public function setValidator(Validator $validator)
public function setValidator(ValidatorInterface $validator)
{
$this->emailValidator = $validator;
return $this;
Expand Down
Loading

0 comments on commit 0110db8

Please sign in to comment.