cvs: pear /Image_3D/Image/3D Point.php Renderer.php /Image_3D/Image/3D/Paintable Polygon.php /Image_3D/Image/3D/Paintable/Object Map.php Pie.php
| From: | Kore Nordmann | Date: | Mon, 07 Nov 2005 13:43:24 +0000 |
| Subject: | cvs: pear /Image_3D/Image/3D Point.php Renderer.php /Image_3D/Image/3D/Paintable Polygon.php /Image_3D/Image/3D/Paintable/Object Map.php Pie.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-36130@lists.php.net to get a copy of this message | ||
kore Mon Nov 7 08:43:24 2005 EDT
Modified files:
/pear/Image_3D/Image/3D Point.php Renderer.php
/pear/Image_3D/Image/3D/Paintable Polygon.php
/pear/Image_3D/Image/3D/Paintable/Object Map.php Pie.php
Log:
- Fixed E_STRICT issues (using instanceof instead of is_a)
http://cvs.php.net/diff.php/pear/Image_3D/Image/3D/Point.php?r1=1.3&r2=1.4&ty=u
Index: pear/Image_3D/Image/3D/Point.php
diff -u pear/Image_3D/Image/3D/Point.php:1.3 pear/Image_3D/Image/3D/Point.php:1.4
--- pear/Image_3D/Image/3D/Point.php:1.3 Sun Nov 6 15:32:43 2005
+++ pear/Image_3D/Image/3D/Point.php Mon Nov 7 08:43:24 2005
@@ -27,7 +27,7 @@
* @author Kore Nordmann <3d@kore-nordmann.de>
* @copyright 1997-2005 Kore Nordmann
* @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version CVS: $Id: Point.php,v 1.3 2005/11/06 20:32:43 kore Exp $
+ * @version CVS: $Id: Point.php,v 1.4 2005/11/07 13:43:24 kore Exp $
* @link http://pear.php.net/package/PackageName
* @since File available since Release 0.1.0
*/
@@ -96,7 +96,7 @@
}
public function getNormale() {
- if (!is_a($this->_normale, 'Image_3D_Vector')) $this->_calcNormale();
+ if (!($this->_normale instanceof Image_3D_Vector)) $this->_calcNormale();
return $this->_normale;
}
http://cvs.php.net/diff.php/pear/Image_3D/Image/3D/Renderer.php?r1=1.5&r2=1.6&ty=u
Index: pear/Image_3D/Image/3D/Renderer.php
diff -u pear/Image_3D/Image/3D/Renderer.php:1.5 pear/Image_3D/Image/3D/Renderer.php:1.6
--- pear/Image_3D/Image/3D/Renderer.php:1.5 Sun Nov 6 15:32:43 2005
+++ pear/Image_3D/Image/3D/Renderer.php Mon Nov 7 08:43:24 2005
@@ -27,7 +27,7 @@
* @author Kore Nordmann <3d@kore-nordmann.de>
* @copyright 1997-2005 Kore Nordmann
* @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version CVS: $Id: Renderer.php,v 1.5 2005/11/06 20:32:43 kore Exp $
+ * @version CVS: $Id: Renderer.php,v 1.6 2005/11/07 13:43:24 kore Exp $
* @link http://pear.php.net/package/PackageName
* @since File available since Release 0.1.0
*/
@@ -227,11 +227,11 @@
public function addObjects($objects) {
if (is_array($objects)) {
foreach ($objects as $object) {
- if (is_a($object, 'Image_3D_Object')) {
+ if ($object instanceof Image_3D_Object) {
$this->_getPolygones($object);
}
}
- } elseif (is_a($objects, 'Image_3D_Object')) {
+ } elseif ($objects instanceof Image_3D_Object) {
$this->_getPolygones($objects);
}
}
http://cvs.php.net/diff.php/pear/Image_3D/Image/3D/Paintable/Polygon.php?r1=1.3&r2=1.4&ty=u
Index: pear/Image_3D/Image/3D/Paintable/Polygon.php
diff -u pear/Image_3D/Image/3D/Paintable/Polygon.php:1.3
pear/Image_3D/Image/3D/Paintable/Polygon.php:1.4
--- pear/Image_3D/Image/3D/Paintable/Polygon.php:1.3 Sun Nov 6 15:40:56 2005
+++ pear/Image_3D/Image/3D/Paintable/Polygon.php Mon Nov 7 08:43:24 2005
@@ -27,7 +27,7 @@
* @author Kore Nordmann <3d@kore-nordmann.de>
* @copyright 1997-2005 Kore Nordmann
* @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version CVS: $Id: Polygon.php,v 1.3 2005/11/06 20:40:56 kore Exp $
+ * @version CVS: $Id: Polygon.php,v 1.4 2005/11/07 13:43:24 kore Exp $
* @link http://pear.php.net/package/PackageName
* @since File available since Release 0.1.0
*/
@@ -72,7 +72,7 @@
if (func_num_args()) {
$args = func_get_args();
for ($i = 0; $i < func_num_args(); $i++) {
- if (is_object($args[$i]) && is_a($args[$i], 'Image_3D_Point')) {
+ if (is_object($args[$i]) && ($args[$i] instanceof Image_3D_Point)) {
$this->addPoint($args[$i]);
}
}
@@ -103,11 +103,11 @@
$this->_normale = new Image_3D_Vector($a2 * $b3 - $a3 * $b2, $a3 * $b1 - $a1 * $b3, $a1 * $b2
- $a2 * $b1);
// Backface Culling
- if (($this->_normale->getZ() <= 0) &&
($this->_option[Image_3D::IMAGE_3D_OPTION_BF_CULLING])) $this->setInvisible();
+ if (($this->_normale->getZ() <= 0) &&
(@$this->_option[Image_3D::IMAGE_3D_OPTION_BF_CULLING])) $this->setInvisible();
}
public function getNormale() {
- if (!is_a($this->_normale, 'Image_3D_Vector')) $this->_calcNormale();
+ if (!($this->_normale instanceof Image_3D_Vector)) $this->_calcNormale();
return $this->_normale;
}
@@ -123,7 +123,7 @@
}
public function getPosition() {
- if (!is_a($this->_position, 'Image_3D_Vector')) $this->_calcPosition();
+ if (!($this->_position instanceof Image_3D_Vector)) $this->_calcPosition();
return $this->_position;
}
@@ -175,4 +175,4 @@
}
}
-?>
\ No newline at end of file
+?>
http://cvs.php.net/diff.php/pear/Image_3D/Image/3D/Paintable/Object/Map.php?r1=1.3&r2=1.4&ty=u
Index: pear/Image_3D/Image/3D/Paintable/Object/Map.php
diff -u pear/Image_3D/Image/3D/Paintable/Object/Map.php:1.3
pear/Image_3D/Image/3D/Paintable/Object/Map.php:1.4
--- pear/Image_3D/Image/3D/Paintable/Object/Map.php:1.3 Sun Nov 6 15:40:56 2005
+++ pear/Image_3D/Image/3D/Paintable/Object/Map.php Mon Nov 7 08:43:24 2005
@@ -27,7 +27,7 @@
* @author Kore Nordmann <3d@kore-nordmann.de>
* @copyright 1997-2005 Kore Nordmann
* @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version CVS: $Id: Map.php,v 1.3 2005/11/06 20:40:56 kore Exp $
+ * @version CVS: $Id: Map.php,v 1.4 2005/11/07 13:43:24 kore Exp $
* @link http://pear.php.net/package/PackageName
* @since File available since Release 0.1.0
*/
@@ -68,7 +68,7 @@
public function addRow($row) {
$rowNbr = array_push($this->_points, array()) - 1;
foreach ($row as $point) {
- if (is_object($point) && is_a($point, 'Image_3D_Point'))
$this->_points[$rowNbr][] = $point;
+ if (is_object($point) && ($point instanceof Image_3D_Point))
$this->_points[$rowNbr][] = $point;
}
if (!count($this->_points[$rowNbr])) {
@@ -124,4 +124,4 @@
// if ($option === Image_3D::IMAGE_3D_OPTION_BF_CULLING) $value = false;
parent::setOption($option, $value);
}
-}
\ No newline at end of file
+}
http://cvs.php.net/diff.php/pear/Image_3D/Image/3D/Paintable/Object/Pie.php?r1=1.3&r2=1.4&ty=u
Index: pear/Image_3D/Image/3D/Paintable/Object/Pie.php
diff -u pear/Image_3D/Image/3D/Paintable/Object/Pie.php:1.3
pear/Image_3D/Image/3D/Paintable/Object/Pie.php:1.4
--- pear/Image_3D/Image/3D/Paintable/Object/Pie.php:1.3 Sun Nov 6 15:40:56 2005
+++ pear/Image_3D/Image/3D/Paintable/Object/Pie.php Mon Nov 7 08:43:24 2005
@@ -27,7 +27,7 @@
* @author Kore Nordmann <3d@kore-nordmann.de>
* @copyright 1997-2005 Kore Nordmann
* @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version CVS: $Id: Pie.php,v 1.3 2005/11/06 20:40:56 kore Exp $
+ * @version CVS: $Id: Pie.php,v 1.4 2005/11/07 13:43:24 kore Exp $
* @link http://pear.php.net/package/PackageName
* @since File available since Release 0.1.0
*/
@@ -100,12 +100,12 @@
}
protected function _checkParameter($array) {
- $array['detail'] = max(1, (int) $array['detail']);
- $array['outside'] = max(0, (int) $array['outside']);
- $array['inside'] = min(max(0, (int) $array['inside']),
$array['outside']);
- $array['start'] = max(0, ((int) $array['start']) * pi() / 180);
- $array['end'] = max(0, ((int) $array['end']) * pi() / 180);
+ $array['detail'] = max(1, (int) @$array['detail']);
+ $array['outside'] = max(0, (int) @$array['outside']);
+ $array['inside'] = min(max(0, (int) @$array['inside']),
@$array['outside']);
+ $array['start'] = max(0, ((int) @$array['start']) * pi() / 180);
+ $array['end'] = max(0, ((int) @$array['end']) * pi() / 180);
return ($array);
}
-}
\ No newline at end of file
+}