当前位置: 首页>>代码示例>>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;未经允许,请勿转载。