Permalink
Browse files

Merge branch 'issue/lsb-inheritance-fix' of git://github.com/lisachen…

…ko/zf2 into hotfix/3307

Conflicts:
	library/Zend/Ldap/Node/RootDse.php
  • Loading branch information...
2 parents 7753ee1 + 364a714 commit 1bbb9f1d007421fe86e2e7389a5ec87278dbd59c @weierophinney weierophinney committed Jan 4, 2013
@@ -70,7 +70,7 @@ public static function fromReflection(ReflectionDocBlockTag $reflectionTag)
{
$tagName = $reflectionTag->getName();
- $codeGenDocBlockTag = new self();
+ $codeGenDocBlockTag = new static();
$codeGenDocBlockTag->setName($tagName);
// transport any properties via accessors and mutators from reflection to codegen object
@@ -48,7 +48,7 @@ public function __construct(array $options = array())
*/
public static function fromReflection(ReflectionDocBlockTag $reflectionTagLicense)
{
- $returnTag = new self();
+ $returnTag = new static();
$returnTag->setName('license');
$returnTag->setUrl($reflectionTagLicense->getUrl());
@@ -38,7 +38,7 @@ class ParamTag extends Tag
*/
public static function fromReflection(ReflectionDocBlockTag $reflectionTagParam)
{
- $paramTag = new self();
+ $paramTag = new static();
$paramTag->setName('param');
$paramTag->setDatatype($reflectionTagParam->getType()); // @todo rename
@@ -33,7 +33,7 @@ class ReturnTag extends Tag
*/
public static function fromReflection(ReflectionDocBlockTag $reflectionTagReturn)
{
- $returnTag = new self();
+ $returnTag = new static();
$returnTag->setName('return');
$returnTag->setDatatype($reflectionTagReturn->getType()); // @todo rename
@@ -104,7 +104,7 @@ public static function fromReflectedFileName($filePath, $includeIfNotAlreadyIncl
*/
public static function fromReflection(FileReflection $fileReflection)
{
- $file = new self();
+ $file = new static();
$file->setSourceContent($fileReflection->getContents());
$file->setSourceDirty(false);
@@ -44,7 +44,7 @@ class MethodGenerator extends AbstractMemberGenerator
*/
public static function fromReflection(MethodReflection $reflectionMethod)
{
- $method = new self();
+ $method = new static();
$method->setSourceContent($reflectionMethod->getContents(false));
$method->setSourceDirty(false);
@@ -39,7 +39,7 @@ class PropertyGenerator extends AbstractMemberGenerator
*/
public static function fromReflection(PropertyReflection $reflectionProperty)
{
- $property = new self();
+ $property = new static();
$property->setName($reflectionProperty->getName());
@@ -71,7 +71,7 @@ public function __construct(array $array, $allowModifications = false)
foreach ($array as $key => $value) {
if (is_array($value)) {
- $this->data[$key] = new self($value, $this->allowModifications);
+ $this->data[$key] = new static($value, $this->allowModifications);
} else {
$this->data[$key] = $value;
}
@@ -123,7 +123,7 @@ public function __set($name, $value)
if ($this->allowModifications) {
if (is_array($value)) {
- $value = new self($value, true);
+ $value = new static($value, true);
}
if (null === $name) {
@@ -354,14 +354,14 @@ public function merge(self $merge)
$this->data[$key]->merge($value);
} else {
if ($value instanceof self) {
- $this->data[$key] = new self($value->toArray(), $this->allowModifications);
+ $this->data[$key] = new static($value->toArray(), $this->allowModifications);
} else {
$this->data[$key] = $value;
}
}
} else {
if ($value instanceof self) {
- $this->data[$key] = new self($value->toArray(), $this->allowModifications);
+ $this->data[$key] = new static($value->toArray(), $this->allowModifications);
} else {
$this->data[$key] = $value;
}
@@ -96,7 +96,7 @@ public static function factory($adapter, $options = array())
{
$plugins = static::getSymmetricPluginManager();
$adapter = $plugins->get($adapter, (array) $options);
- return new self($adapter);
+ return new static($adapter);
}
/**
@@ -57,7 +57,7 @@ public function addLinks(DOMNodeList $links, $uri)
} elseif (!isset($this->rdf) && $link->getAttribute('type') == 'application/rdf+xml') {
$this->rdf = $this->absolutiseUri(trim($link->getAttribute('href')), $uri);
}
- $this[] = new self(array(
+ $this[] = new static(array(
'rel' => 'alternate',
'type' => $link->getAttribute('type'),
'href' => $this->absolutiseUri(trim($link->getAttribute('href')), $uri),
@@ -340,7 +340,7 @@ protected function _matchPath($domains, $path)
*/
public static function fromResponse(Response $response, $ref_uri)
{
- $jar = new self();
+ $jar = new static();
$jar->addCookiesFromResponse($response, $ref_uri);
return $jar;
}
@@ -317,7 +317,7 @@ protected function _matchPath($domains, $path)
*/
public static function fromResponse(Response $response, $ref_uri)
{
- $jar = new self();
+ $jar = new static();
$jar->addCookiesFromResponse($response, $ref_uri);
return $jar;
}
@@ -205,7 +205,7 @@ public static function fromString($string)
$tree = static::$parser->parse($match['plural']);
$ast = static::createAst($tree);
- return new self($numPlurals, $ast);
+ return new static($numPlurals, $ast);
}
/**
@@ -137,7 +137,7 @@ protected function __construct($source, $decodeType)
*/
public static function decode($source, $objectDecodeType = Json::TYPE_OBJECT)
{
- $decoder = new self($source, $objectDecodeType);
+ $decoder = new static($source, $objectDecodeType);
return $decoder->_decodeValue();
}
@@ -68,7 +68,7 @@ protected function __construct($cycleCheck = false, $options = array())
*/
public static function encode($value, $cycleCheck = false, $options = array())
{
- $encoder = new self(($cycleCheck) ? true : false, $options);
+ $encoder = new static(($cycleCheck) ? true : false, $options);
return $encoder->_encodeValue($value);
}
View
@@ -77,7 +77,7 @@ public static function fromString($dn, $caseFold = null)
} else {
$dnArray = static::explodeDn((string) $dn);
}
- return new self($dnArray, $caseFold);
+ return new static($dnArray, $caseFold);
}
/**
@@ -90,7 +90,7 @@ public static function fromString($dn, $caseFold = null)
*/
public static function fromArray(array $dn, $caseFold = null)
{
- return new self($dn, $caseFold);
+ return new static($dn, $caseFold);
}
/**
@@ -145,7 +145,7 @@ public function getParentDn($levelUp = 1)
throw new Exception\LdapException(null, 'Cannot retrieve parent DN with given $levelUp');
}
$newDn = array_slice($this->dn, $levelUp);
- return new self($newDn, $this->caseFold);
+ return new static($newDn, $this->caseFold);
}
/**
@@ -36,7 +36,7 @@ class Filter extends Filter\StringFilter
*/
public static function equals($attr, $value)
{
- return new self($attr, $value, self::TYPE_EQUALS, null, null);
+ return new static($attr, $value, self::TYPE_EQUALS, null, null);
}
/**
@@ -49,7 +49,7 @@ public static function equals($attr, $value)
*/
public static function begins($attr, $value)
{
- return new self($attr, $value, self::TYPE_EQUALS, null, '*');
+ return new static($attr, $value, self::TYPE_EQUALS, null, '*');
}
/**
@@ -62,7 +62,7 @@ public static function begins($attr, $value)
*/
public static function ends($attr, $value)
{
- return new self($attr, $value, self::TYPE_EQUALS, '*', null);
+ return new static($attr, $value, self::TYPE_EQUALS, '*', null);
}
/**
@@ -75,7 +75,7 @@ public static function ends($attr, $value)
*/
public static function contains($attr, $value)
{
- return new self($attr, $value, self::TYPE_EQUALS, '*', '*');
+ return new static($attr, $value, self::TYPE_EQUALS, '*', '*');
}
/**
@@ -88,7 +88,7 @@ public static function contains($attr, $value)
*/
public static function greater($attr, $value)
{
- return new self($attr, $value, self::TYPE_GREATER, null, null);
+ return new static($attr, $value, self::TYPE_GREATER, null, null);
}
/**
@@ -101,7 +101,7 @@ public static function greater($attr, $value)
*/
public static function greaterOrEqual($attr, $value)
{
- return new self($attr, $value, self::TYPE_GREATEROREQUAL, null, null);
+ return new static($attr, $value, self::TYPE_GREATEROREQUAL, null, null);
}
/**
@@ -114,7 +114,7 @@ public static function greaterOrEqual($attr, $value)
*/
public static function less($attr, $value)
{
- return new self($attr, $value, self::TYPE_LESS, null, null);
+ return new static($attr, $value, self::TYPE_LESS, null, null);
}
/**
@@ -127,7 +127,7 @@ public static function less($attr, $value)
*/
public static function lessOrEqual($attr, $value)
{
- return new self($attr, $value, self::TYPE_LESSOREQUAL, null, null);
+ return new static($attr, $value, self::TYPE_LESSOREQUAL, null, null);
}
/**
@@ -140,7 +140,7 @@ public static function lessOrEqual($attr, $value)
*/
public static function approx($attr, $value)
{
- return new self($attr, $value, self::TYPE_APPROX, null, null);
+ return new static($attr, $value, self::TYPE_APPROX, null, null);
}
/**
@@ -152,7 +152,7 @@ public static function approx($attr, $value)
*/
public static function any($attr)
{
- return new self($attr, '', self::TYPE_EQUALS, '*', null);
+ return new static($attr, '', self::TYPE_EQUALS, '*', null);
}
/**
@@ -55,7 +55,7 @@ protected function __construct(array $options = array())
*/
public static function decode($string)
{
- $encoder = new self(array());
+ $encoder = new static(array());
return $encoder->_decode($string);
}
@@ -136,7 +136,7 @@ protected function pushAttribute(array $attribute, array &$entry)
*/
public static function encode($value, array $options = array())
{
- $encoder = new self($options);
+ $encoder = new static($options);
return $encoder->_encode($value);
}
@@ -245,7 +245,7 @@ public static function create($dn, array $objectClass = array())
} else {
throw new Exception\LdapException(null, '$dn is of a wrong data type.');
}
- $new = new self($dn, array(), false, null);
+ $new = new static($dn, array(), false, null);
$new->ensureRdnAttributeValues();
$new->setAttribute('objectClass', $objectClass);
@@ -273,7 +273,7 @@ public static function fromLdap($dn, Ldap $ldap)
if ($data === null) {
return null;
}
- $entry = new self($dn, $data, true, $ldap);
+ $entry = new static($dn, $data, true, $ldap);
return $entry;
}
@@ -299,7 +299,7 @@ public static function fromArray(array $data, $fromDataSource = false)
throw new Exception\LdapException(null, '\'dn\' key is of a wrong data type.');
}
$fromDataSource = ($fromDataSource === true) ? true : false;
- $new = new self($dn, $data, $fromDataSource, null);
+ $new = new static($dn, $data, $fromDataSource, null);
$new->ensureRdnAttributeValues();
return $new;
@@ -46,7 +46,7 @@ public static function create(Ldap\Ldap $ldap)
return new RootDse\OpenLdap($dn, $data);
}
- return new self($dn, $data);
+ return new static($dn, $data);
}
/**
@@ -43,7 +43,7 @@ public static function create(Ldap\Ldap $ldap)
return new Schema\OpenLdap($dn, $data, $ldap);
case RootDse::SERVER_TYPE_EDIRECTORY:
default:
- return new self($dn, $data, $ldap);
+ return new static($dn, $data, $ldap);
}
}
@@ -198,7 +198,7 @@ protected function _cacheContent()
}
$counter = 1;
foreach ($parts as $part) {
- $this->parts[$counter++] = new self(array('headers' => $part['header'], 'content' => $part['body']));
+ $this->parts[$counter++] = new static(array('headers' => $part['header'], 'content' => $part['body']));
}
}
@@ -155,7 +155,7 @@ public function getPart($num)
throw new Exception\RuntimeException('part not found');
}
- return new self(array('file' => $this->fh, 'startPos' => $this->partPos[$num][0],
+ return new static(array('file' => $this->fh, 'startPos' => $this->partPos[$num][0],
'endPos' => $this->partPos[$num][1]));
}
}
@@ -225,7 +225,7 @@ public static function createFromMessage($message, $boundary, $EOL = Mime::LINEE
{
$parts = Decode::splitMessageStruct($message, $boundary, $EOL);
- $res = new self();
+ $res = new static();
foreach ($parts as $part) {
// now we build a new MimePart for the current Message Part:
$newPart = new Part($part['body']);
@@ -81,7 +81,7 @@ public function setParent(Node $node, $new = false)
*/
public function createChild($value)
{
- $child = new self($value, $this);
+ $child = new static($value, $this);
return $child;
}
@@ -72,7 +72,7 @@ public function setFragment($fragment)
*/
public static function fromUnixPath($path)
{
- $url = new self('file:');
+ $url = new static('file:');
if (substr($path, 0, 1) == '/') {
$url->setHost('');
}
@@ -89,7 +89,7 @@ public static function fromUnixPath($path)
*/
public static function fromWindowsPath($path)
{
- $url = new self('file:');
+ $url = new static('file:');
// Convert directory separators
$path = str_replace(array('/', '\\'), array('%2F', '/'), $path);
Oops, something went wrong.

0 comments on commit 1bbb9f1

Please sign in to comment.