diff --git a/library/Zend/Code/Generator/DocBlock/Tag.php b/library/Zend/Code/Generator/DocBlock/Tag.php index 071de619760..a3c9d2600ce 100644 --- a/library/Zend/Code/Generator/DocBlock/Tag.php +++ b/library/Zend/Code/Generator/DocBlock/Tag.php @@ -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 diff --git a/library/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php b/library/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php index 36500b234b2..486c1cf1a9d 100644 --- a/library/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php +++ b/library/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php @@ -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()); diff --git a/library/Zend/Code/Generator/DocBlock/Tag/ParamTag.php b/library/Zend/Code/Generator/DocBlock/Tag/ParamTag.php index 9b040180d60..da7866fefe5 100644 --- a/library/Zend/Code/Generator/DocBlock/Tag/ParamTag.php +++ b/library/Zend/Code/Generator/DocBlock/Tag/ParamTag.php @@ -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 diff --git a/library/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php b/library/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php index ecb3d66a813..fa547cb01aa 100644 --- a/library/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php +++ b/library/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php @@ -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 diff --git a/library/Zend/Code/Generator/FileGenerator.php b/library/Zend/Code/Generator/FileGenerator.php index 66f86f72ed2..962c33efadf 100644 --- a/library/Zend/Code/Generator/FileGenerator.php +++ b/library/Zend/Code/Generator/FileGenerator.php @@ -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); diff --git a/library/Zend/Code/Generator/MethodGenerator.php b/library/Zend/Code/Generator/MethodGenerator.php index 4a2dd3002af..5c819ec9546 100644 --- a/library/Zend/Code/Generator/MethodGenerator.php +++ b/library/Zend/Code/Generator/MethodGenerator.php @@ -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); diff --git a/library/Zend/Code/Generator/PropertyGenerator.php b/library/Zend/Code/Generator/PropertyGenerator.php index 7a07b76b238..ad516f49751 100644 --- a/library/Zend/Code/Generator/PropertyGenerator.php +++ b/library/Zend/Code/Generator/PropertyGenerator.php @@ -39,7 +39,7 @@ class PropertyGenerator extends AbstractMemberGenerator */ public static function fromReflection(PropertyReflection $reflectionProperty) { - $property = new self(); + $property = new static(); $property->setName($reflectionProperty->getName()); diff --git a/library/Zend/Config/Config.php b/library/Zend/Config/Config.php index 9456ca774fd..ee1c1ce51b5 100644 --- a/library/Zend/Config/Config.php +++ b/library/Zend/Config/Config.php @@ -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; } diff --git a/library/Zend/Crypt/BlockCipher.php b/library/Zend/Crypt/BlockCipher.php index f2b4667575b..e7e35e5cf79 100644 --- a/library/Zend/Crypt/BlockCipher.php +++ b/library/Zend/Crypt/BlockCipher.php @@ -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); } /** diff --git a/library/Zend/Feed/Reader/FeedSet.php b/library/Zend/Feed/Reader/FeedSet.php index d72173ba6be..8a20810edb1 100644 --- a/library/Zend/Feed/Reader/FeedSet.php +++ b/library/Zend/Feed/Reader/FeedSet.php @@ -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), diff --git a/library/Zend/Http/Client/Cookies.php b/library/Zend/Http/Client/Cookies.php index 8b22c14e5cd..0c947c0456c 100644 --- a/library/Zend/Http/Client/Cookies.php +++ b/library/Zend/Http/Client/Cookies.php @@ -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; } diff --git a/library/Zend/Http/Cookies.php b/library/Zend/Http/Cookies.php index 1b8a54103b7..9b4524c6090 100644 --- a/library/Zend/Http/Cookies.php +++ b/library/Zend/Http/Cookies.php @@ -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; } diff --git a/library/Zend/I18n/Translator/Plural/Rule.php b/library/Zend/I18n/Translator/Plural/Rule.php index a0660d24f42..ebe5fa9b79b 100644 --- a/library/Zend/I18n/Translator/Plural/Rule.php +++ b/library/Zend/I18n/Translator/Plural/Rule.php @@ -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); } /** diff --git a/library/Zend/Json/Decoder.php b/library/Zend/Json/Decoder.php index dda551c9b6c..0bd18eef4c1 100644 --- a/library/Zend/Json/Decoder.php +++ b/library/Zend/Json/Decoder.php @@ -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(); } diff --git a/library/Zend/Json/Encoder.php b/library/Zend/Json/Encoder.php index 3d8b5025742..5aa4829b07d 100644 --- a/library/Zend/Json/Encoder.php +++ b/library/Zend/Json/Encoder.php @@ -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); } diff --git a/library/Zend/Ldap/Dn.php b/library/Zend/Ldap/Dn.php index 70a73543e81..12293206c8d 100644 --- a/library/Zend/Ldap/Dn.php +++ b/library/Zend/Ldap/Dn.php @@ -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); } /** diff --git a/library/Zend/Ldap/Filter.php b/library/Zend/Ldap/Filter.php index e8ae6effdd0..2dc93643070 100644 --- a/library/Zend/Ldap/Filter.php +++ b/library/Zend/Ldap/Filter.php @@ -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); } /** diff --git a/library/Zend/Ldap/Ldif/Encoder.php b/library/Zend/Ldap/Ldif/Encoder.php index b36800cb103..a12d50d2134 100644 --- a/library/Zend/Ldap/Ldif/Encoder.php +++ b/library/Zend/Ldap/Ldif/Encoder.php @@ -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); } diff --git a/library/Zend/Ldap/Node.php b/library/Zend/Ldap/Node.php index 92305b037e6..d92e719b286 100644 --- a/library/Zend/Ldap/Node.php +++ b/library/Zend/Ldap/Node.php @@ -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; diff --git a/library/Zend/Ldap/Node/RootDse.php b/library/Zend/Ldap/Node/RootDse.php index e1e94c7ec12..7389ad489bd 100644 --- a/library/Zend/Ldap/Node/RootDse.php +++ b/library/Zend/Ldap/Node/RootDse.php @@ -45,7 +45,7 @@ public static function create(Ldap\Ldap $ldap) ) { return new RootDse\OpenLdap($dn, $data); } else { - return new self($dn, $data); + return new static($dn, $data); } } diff --git a/library/Zend/Ldap/Node/Schema.php b/library/Zend/Ldap/Node/Schema.php index b75d9719307..8377b7e2623 100644 --- a/library/Zend/Ldap/Node/Schema.php +++ b/library/Zend/Ldap/Node/Schema.php @@ -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); } } diff --git a/library/Zend/Mail/Storage/Part.php b/library/Zend/Mail/Storage/Part.php index 2afe47bca44..8cab1e34745 100644 --- a/library/Zend/Mail/Storage/Part.php +++ b/library/Zend/Mail/Storage/Part.php @@ -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'])); } } diff --git a/library/Zend/Mail/Storage/Part/File.php b/library/Zend/Mail/Storage/Part/File.php index a251a3fb976..c9271f7abc1 100644 --- a/library/Zend/Mail/Storage/Part/File.php +++ b/library/Zend/Mail/Storage/Part/File.php @@ -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])); } } diff --git a/library/Zend/Mime/Message.php b/library/Zend/Mime/Message.php index 65d733caf76..5215d00a9ce 100644 --- a/library/Zend/Mime/Message.php +++ b/library/Zend/Mime/Message.php @@ -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']); diff --git a/library/Zend/Server/Reflection/Node.php b/library/Zend/Server/Reflection/Node.php index f8038f15f62..810c5de5321 100644 --- a/library/Zend/Server/Reflection/Node.php +++ b/library/Zend/Server/Reflection/Node.php @@ -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; } diff --git a/library/Zend/Uri/File.php b/library/Zend/Uri/File.php index 2427c65f618..606be04b97d 100644 --- a/library/Zend/Uri/File.php +++ b/library/Zend/Uri/File.php @@ -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); diff --git a/library/Zend/XmlRpc/Fault.php b/library/Zend/XmlRpc/Fault.php index 109dc9c879d..8dc103a82ac 100644 --- a/library/Zend/XmlRpc/Fault.php +++ b/library/Zend/XmlRpc/Fault.php @@ -239,7 +239,7 @@ public function loadXml($fault) */ public static function isFault($xml) { - $fault = new self(); + $fault = new static(); try { $isFault = $fault->loadXml($xml); } catch (Exception\ExceptionInterface $e) { diff --git a/library/Zend/XmlRpc/Server/Fault.php b/library/Zend/XmlRpc/Server/Fault.php index 5c9b37dc1b9..2b2f358f6e9 100644 --- a/library/Zend/XmlRpc/Server/Fault.php +++ b/library/Zend/XmlRpc/Server/Fault.php @@ -84,7 +84,7 @@ public function __construct(\Exception $e) */ public static function getInstance(\Exception $e) { - return new self($e); + return new static($e); } /**