Re: cvs: php4 /pear/PHPDoc/core Phpdoc.php PhpdocSetupHandler.php /pear/PHPDoc/renderer PhpdocRendererObject.php /pear/PHPDoc/renderer/html
PhpdocHTMLClassRenderer.php PhpdocHTMLDocumentRenderer.php PhpdocHTMLIndexRenderer.php PhpdocHTMLModuleRenderer.php PhpdocHTMLRenderer.php
PhpdocHTMLRendererManager.php PhpdocHTMLWarningRenderer.php

From: Date: Sun, 15 Oct 2000 15:57:14 +0000
Subject: Re: cvs: php4 /pear/PHPDoc/core Phpdoc.php PhpdocSetupHandler.php /pear/PHPDoc/renderer PhpdocRendererObject.php /pear/PHPDoc/renderer/html
PhpdocHTMLClassRenderer.php PhpdocHTMLDocumentRenderer.php PhpdocHTMLIndexRenderer.php PhpdocHTMLModuleRenderer.php PhpdocHTMLRenderer.php
PhpdocHTMLRendererManager.php PhpdocHTMLWarningRenderer.php
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2063@lists.php.net to get a copy of this message
Jan Lehnardt wrote: > + /** > + * Sets the name of your application. > + * > + * The application name gets used on many places in the default templates. > + * > + * @param string $application name of the application > + * @return bool $ok > + * @throws PhpdocError > + * @access public > + */ > + function setApplication($application) { > + if (""==$application) { > + $this->err[] = new PhpdocError("No application name > given.", __FILE__, __LINE__); > + return false; > + } > + > + $this->application = $application; > + return true; > + } // end func setApplication > + > + /** > + * Suffix for all rendered files in the application (not for the xml files) > + * By default the the suffix is set to ".html". > + * > + * @param string $suffix string with the suffix > + * @return bool $ok > + * @access private > + * @see targetFileSuffix > + * @author Thomas Weinert <subjective@subjective.de> > + */ > + > + function setTargetFileSuffix($suffix) { > + if (ereg("^\.[a-zA-Z0-9]+$",$suffix)) { > + $this->targetFileSuffix = $suffix; > + $ok = true; > + } else { > + if (ereg("^[a-zA-Z0-9]+$",$suffix)) { > + $this->targetFileSuffix = ".".$suffix; > + $ok = true; > + } else { > + $ok = false; > + } > + } > + return $ok; > + } I don't think we need a RegExp here to test the given string. ".php.phpdoc" is a valid file extension and should be allowed, even an empty string might be what people need... Check your changes with this in mind. Whenever there is a critical situation PHPDoc should "throw" a warning using something like $this->err[] = new PHPDocError( string message, int file_number (__FILE__), int line_number (__LINE__) ) and try to return a value that indicates that there was some trouble. Ulf

« previous php.cvs (#2063) next »