當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Shape::__construct方法代碼示例

本文整理匯總了PHP中Shape::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Shape::__construct方法的具體用法?PHP Shape::__construct怎麽用?PHP Shape::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Shape的用法示例。


在下文中一共展示了Shape::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct($x, $y, $radius, $drawAPI)
 {
     Shape::__construct($drawAPI);
     $this->x = $x;
     $this->y = $y;
     $this->radius = $radius;
 }
開發者ID:possientis,項目名稱:Prog,代碼行數:7,代碼來源:bridge.php

示例2: __construct

 public function __construct($dp, $x, $y, $r)
 {
     parent::__construct($dp);
     $this->_x = $x;
     $this->_y = $y;
     $this->_r = $r;
 }
開發者ID:nouka,項目名稱:DesignPatternsExplained,代碼行數:7,代碼來源:10-3.php

示例3: __construct

 public function __construct($x, $y, $radius, IDrawer $drawer)
 {
     parent::__construct($drawer);
     $this->x = $x;
     $this->y = $y;
     $this->radius = $radius;
 }
開發者ID:manachyn,項目名稱:trainings,代碼行數:7,代碼來源:BridgeWiki.php

示例4: __construct

 public function __construct($dX, $dY, $dRadius, DrawingAPI $oDrawingAPI)
 {
     parent::__construct($oDrawingAPI);
     $this->dX = $dX;
     $this->dY = $dY;
     $this->dRadius = $dRadius;
 }
開發者ID:ymnl007,項目名稱:designpatterns,代碼行數:7,代碼來源:draw.php

示例5: __construct

 public function __construct($x, $y, $radius, DrawingAPI $api)
 {
     parent::__construct($api);
     $this->x = $x;
     $this->y = $y;
     $this->radius = $radius;
 }
開發者ID:boiler256,項目名稱:PHP-design-patterns-1,代碼行數:7,代碼來源:Bridge.php

示例6: __construct

 public function __construct(array $definition, ShapeMap $shapeMap)
 {
     $definition['type'] = 'structure';
     if (!isset($definition['members'])) {
         $definition['members'] = [];
     }
     parent::__construct($definition, $shapeMap);
 }
開發者ID:ossistyle,項目名稱:http-client-description,代碼行數:8,代碼來源:StructureShape.php

示例7: __construct

 public function __construct($x, $y, $color, $radius)
 {
     parent::__construct($x, $y, $color);
     $this->radius = is_numeric($radius) ? $radius : 0;
     echo "<br>Tworzę obiekt koło <br>";
     echo 'położenie x = ' . $this->getX() . '<br>';
     echo 'położenie y = ' . $this->getY() . '<br>';
     echo 'kolor  ' . $this->getColor() . '<br>';
     echo 'promień r = ' . $this->getRadius() . '<br>';
     echo '<hr>';
 }
開發者ID:glinskiwieslaw,項目名稱:objectOrientedExercises,代碼行數:11,代碼來源:Zadanie4Dziedziczenie–ksztalty3D.php

示例8: __construct

 public function __construct(array $definition, ShapeMap $shapeMap)
 {
     $definition['type'] = 'timestamp';
     parent::__construct($definition, $shapeMap);
 }
開發者ID:Air-Craft,項目名稱:air-craft-www,代碼行數:5,代碼來源:TimestampShape.php

示例9: __construct

 public function __construct($x = 0, $y = 0, $radius = 0, $label = null)
 {
     parent::__construct($x, $y, $label);
     $this->setRadius($radius);
 }
開發者ID:venril,項目名稱:painter,代碼行數:5,代碼來源:Circle.php

示例10: __construct

 public function __construct($x, $y, $width, $height)
 {
     parent::__construct($x, $y);
     $this->width = $width;
     $this->height = $height;
 }
開發者ID:echmaster,項目名稱:data,代碼行數:6,代碼來源:3-8+Абстрактные+классы.php

示例11: __construct

 public function __construct($a, $r)
 {
     $this->name = "Куля";
     parent::__construct($a, $r, 0);
 }
開發者ID:nikulinn,項目名稱:php-2,代碼行數:5,代碼來源:index.php

示例12: __construct

 public function __construct($x = 0, $y = 0, $label = null, $width = 0, $heigth = 0)
 {
     parent::__construct($x, $y, $label);
     $this->setHeigth($heigth)->setWidth($width);
 }
開發者ID:venril,項目名稱:painter,代碼行數:5,代碼來源:Rectangle.php

示例13:

 function __construct($h, $w, $r, $s1, $s2, $s3)
 {
     //I'm counting on the user to make a triangle that makes sense. Probably a mistake.
     parent::__construct($h, $w, $r);
     //Triangles only have 3 sides.
     $this->numSides = 3;
     $this->sideLengths[0] = $s1;
     $this->sideLengths[1] = $s2;
     $this->sideLengths[2] = $s3;
     $this->cPerim();
     $this->cArea();
 }
開發者ID:antrachtman,項目名稱:PHP,代碼行數:12,代碼來源:shapes.php

示例14:

 function __construct($x, $y, $radius)
 {
     parent::__construct($x, $y);
     $this->radius = $radius;
 }
開發者ID:GeorgiLambov,項目名稱:SoftwareUniversity,代碼行數:5,代碼來源:Circle.class.php

示例15:

 function __construct($radius)
 {
     parent::__construct($length = null, $width = null);
     $this->radius = $radius;
 }
開發者ID:kmcmurtrey,項目名稱:php-exercise-oop,代碼行數:5,代碼來源:Circle.php


注:本文中的Shape::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。