import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
* @package Zend_Reflection
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Tag.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Tag.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/** Zend_Loader */
|
||||
@ -42,7 +42,7 @@ class Zend_Reflection_Docblock_Tag implements Reflector
|
||||
* @var string
|
||||
*/
|
||||
protected $_name = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@ -57,8 +57,8 @@ class Zend_Reflection_Docblock_Tag implements Reflector
|
||||
public static function factory($tagDocblockLine)
|
||||
{
|
||||
$matches = array();
|
||||
|
||||
if (!preg_match('#^@(\w+)\s#', $tagDocblockLine, $matches)) {
|
||||
|
||||
if (!preg_match('#^@(\w+)(\s|$)#', $tagDocblockLine, $matches)) {
|
||||
require_once 'Zend/Reflection/Exception.php';
|
||||
throw new Zend_Reflection_Exception('No valid tag name found within provided docblock line.');
|
||||
}
|
||||
@ -73,7 +73,7 @@ class Zend_Reflection_Docblock_Tag implements Reflector
|
||||
}
|
||||
return new self($tagDocblockLine);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Export reflection
|
||||
*
|
||||
@ -85,7 +85,7 @@ class Zend_Reflection_Docblock_Tag implements Reflector
|
||||
public static function export()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Serialize to string
|
||||
*
|
||||
@ -96,8 +96,11 @@ class Zend_Reflection_Docblock_Tag implements Reflector
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
$str = "Docblock Tag [ * @".$this->_name." ]".PHP_EOL;
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -109,17 +112,17 @@ class Zend_Reflection_Docblock_Tag implements Reflector
|
||||
$matches = array();
|
||||
|
||||
// find the line
|
||||
if (!preg_match('#^@(\w+)\s(.*)?#', $tagDocblockLine, $matches)) {
|
||||
if (!preg_match('#^@(\w+)(?:\s+([^\s].*)|$)?#', $tagDocblockLine, $matches)) {
|
||||
require_once 'Zend/Reflection/Exception.php';
|
||||
throw new Zend_Reflection_Exception('Provided docblock line does not contain a valid tag');
|
||||
}
|
||||
|
||||
$this->_name = $matches[1];
|
||||
if ($matches[2]) {
|
||||
if (isset($matches[2]) && $matches[2]) {
|
||||
$this->_description = $matches[2];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get annotation tag name
|
||||
*
|
||||
@ -129,7 +132,7 @@ class Zend_Reflection_Docblock_Tag implements Reflector
|
||||
{
|
||||
return $this->_name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get annotation tag description
|
||||
*
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Reflection
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Param.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Param.php 19062 2009-11-19 21:04:08Z beberlei $
|
||||
*/
|
||||
|
||||
/** Zend_Reflection_Docblock_Tag */
|
||||
@ -34,12 +34,12 @@ class Zend_Reflection_Docblock_Tag_Param extends Zend_Reflection_Docblock_Tag
|
||||
* @var string
|
||||
*/
|
||||
protected $_type = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_variableName = null;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -48,29 +48,29 @@ class Zend_Reflection_Docblock_Tag_Param extends Zend_Reflection_Docblock_Tag
|
||||
public function __construct($tagDocblockLine)
|
||||
{
|
||||
$matches = array();
|
||||
|
||||
if (!preg_match('#^@(\w+)\s(\w+)(?:\s(\$\S+))?(?:\s(.*))?#s', $tagDocblockLine, $matches)) {
|
||||
|
||||
if (!preg_match('#^@(\w+)\s+([\w|\\\]+)(?:\s+(\$\S+))?(?:\s+(.*))?#s', $tagDocblockLine, $matches)) {
|
||||
require_once 'Zend/Reflection/Exception.php';
|
||||
throw new Zend_Reflection_Exception('Provided docblock line is does not contain a valid tag');
|
||||
}
|
||||
|
||||
|
||||
if ($matches[1] != 'param') {
|
||||
require_once 'Zend/Reflection/Exception.php';
|
||||
throw new Zend_Reflection_Exception('Provided docblock line is does not contain a valid @param tag');
|
||||
}
|
||||
|
||||
|
||||
$this->_name = 'param';
|
||||
$this->_type = $matches[2];
|
||||
|
||||
|
||||
if (isset($matches[3])) {
|
||||
$this->_variableName = $matches[3];
|
||||
}
|
||||
|
||||
|
||||
if (isset($matches[4])) {
|
||||
$this->_description = preg_replace('#\s+#', ' ', $matches[4]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get parameter variable type
|
||||
*
|
||||
@ -80,7 +80,7 @@ class Zend_Reflection_Docblock_Tag_Param extends Zend_Reflection_Docblock_Tag
|
||||
{
|
||||
return $this->_type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get parameter name
|
||||
*
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Reflection
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Return.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Return.php 19062 2009-11-19 21:04:08Z beberlei $
|
||||
*/
|
||||
|
||||
/** Zend_Reflection_Docblock_Tag */
|
||||
@ -34,7 +34,7 @@ class Zend_Reflection_Docblock_Tag_Return extends Zend_Reflection_Docblock_Tag
|
||||
* @var string
|
||||
*/
|
||||
protected $_type = null;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -43,23 +43,23 @@ class Zend_Reflection_Docblock_Tag_Return extends Zend_Reflection_Docblock_Tag
|
||||
*/
|
||||
public function __construct($tagDocblockLine)
|
||||
{
|
||||
if (!preg_match('#^@(\w+)\s(\w+)(?:\s(.*))?#', $tagDocblockLine, $matches)) {
|
||||
if (!preg_match('#^@(\w+)\s+([\w|\\\]+)(?:\s+(.*))?#', $tagDocblockLine, $matches)) {
|
||||
require_once 'Zend/Reflection/Exception.php';
|
||||
throw new Zend_Reflection_Exception('Provided docblock line is does not contain a valid tag');
|
||||
}
|
||||
|
||||
|
||||
if ($matches[1] != 'return') {
|
||||
require_once 'Zend/Reflection/Exception.php';
|
||||
throw new Zend_Reflection_Exception('Provided docblock line is does not contain a valid @return tag');
|
||||
}
|
||||
|
||||
|
||||
$this->_name = 'return';
|
||||
$this->_type = $matches[2];
|
||||
if (isset($matches[3])) {
|
||||
$this->_description = $matches[3];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get return variable type
|
||||
*
|
||||
|
Reference in New Issue
Block a user