svn: /phd/trunk/phpdotnet/phd/Package/PHP/ Functions.php

From: Date: Sun, 25 Apr 2010 11:43:12 +0000
Subject: svn: /phd/trunk/phpdotnet/phd/Package/PHP/ Functions.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-6447@lists.php.net to get a copy of this message
bjori Sun, 25 Apr 2010 11:43:12 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=298492 Log: - Fix CS Changed paths: U phd/trunk/phpdotnet/phd/Package/PHP/Functions.php Modified: phd/trunk/phpdotnet/phd/Package/PHP/Functions.php =================================================================== --- phd/trunk/phpdotnet/phd/Package/PHP/Functions.php 2010-04-25 11:23:35 UTC (rev 298491) +++ phd/trunk/phpdotnet/phd/Package/PHP/Functions.php 2010-04-25 11:43:12 UTC (rev 298492) @@ -43,6 +43,7 @@ public function __construct() { parent::__construct(); + $this->registerFormatName("PHP-Functions"); $this->setTitle("PHP Manual"); $this->setExt("3.gz"); @@ -93,8 +94,10 @@ } public function writeChunk($stream) { - if (!isset($this->cchunk["funcname"][0])) + if (!isset($this->cchunk["funcname"][0])) { return; + } + $index = 0; rewind($stream); @@ -130,8 +133,10 @@ } public function appendData($data) { - if (!$this->isFunctionRefSet) + if (!$this->isFunctionRefSet) { return 0; + } + switch($this->isChunk) { case self::CLOSE_CHUNK: $stream = $this->popFileStream(); @@ -141,6 +146,7 @@ $this->isChunk = null; $this->cchunk = array(); + return $retval; break; @@ -148,10 +154,13 @@ $this->pushFileStream(fopen("php://temp/maxmemory", "r+")); $this->isChunk = self::OPENED_CHUNK; + /* Break intentionally missing */ + case self::OPENED_CHUNK: $stream = $this->getFileStream(); // Remove whitespace nodes $retval = ($data != "\n" && trim($data) === "") ? false : fwrite(end($stream), $data); + return $retval; default: return 0; @@ -172,12 +181,15 @@ if (isset($attrs[Reader::XMLNS_XML]["id"]) && $attrs[Reader::XMLNS_XML]["id"] == "funcref") { $this->isFunctionRefSet = $open; } + return false; } public function format_refentry($open, $name, $attrs, $props) { - if (!$this->isFunctionRefSet) + if (!$this->isFunctionRefSet) { return false; + } + if ($open) { $this->notify(Render::CHUNK, self::OPEN_CHUNK); $this->newChunk(); @@ -186,23 +198,26 @@ $this->notify(Render::CHUNK, self::CLOSE_CHUNK); $this->closeChunk(); } + return false; } public function format_refname($open, $name, $attrs, $props) { if ($open) { return (isset($this->cchunk["firstrefname"]) && $this->cchunk["firstrefname"]) ? false : ""; - } else { - if (isset($this->cchunk["firstrefname"]) && $this->cchunk["firstrefname"]) { - $this->cchunk["firstrefname"] = false; - return false; - } - return ""; } + + if (isset($this->cchunk["firstrefname"]) && $this->cchunk["firstrefname"]) { + $this->cchunk["firstrefname"] = false; + return false; + } + + return ""; } public function format_refname_text($value, $tag) { $this->cchunk["funcname"][] = $this->toValidName(trim($value)); + if (isset($this->cchunk["firstrefname"]) && $this->cchunk["firstrefname"]) { return false; }

« previous php.doc.cvs (#6447) next »