本文整理汇总了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;
}
示例2: __construct
public function __construct($dp, $x, $y, $r)
{
parent::__construct($dp);
$this->_x = $x;
$this->_y = $y;
$this->_r = $r;
}
示例3: __construct
public function __construct($x, $y, $radius, IDrawer $drawer)
{
parent::__construct($drawer);
$this->x = $x;
$this->y = $y;
$this->radius = $radius;
}
示例4: __construct
public function __construct($dX, $dY, $dRadius, DrawingAPI $oDrawingAPI)
{
parent::__construct($oDrawingAPI);
$this->dX = $dX;
$this->dY = $dY;
$this->dRadius = $dRadius;
}
示例5: __construct
public function __construct($x, $y, $radius, DrawingAPI $api)
{
parent::__construct($api);
$this->x = $x;
$this->y = $y;
$this->radius = $radius;
}
示例6: __construct
public function __construct(array $definition, ShapeMap $shapeMap)
{
$definition['type'] = 'structure';
if (!isset($definition['members'])) {
$definition['members'] = [];
}
parent::__construct($definition, $shapeMap);
}
示例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>';
}
示例8: __construct
public function __construct(array $definition, ShapeMap $shapeMap)
{
$definition['type'] = 'timestamp';
parent::__construct($definition, $shapeMap);
}
示例9: __construct
public function __construct($x = 0, $y = 0, $radius = 0, $label = null)
{
parent::__construct($x, $y, $label);
$this->setRadius($radius);
}
示例10: __construct
public function __construct($x, $y, $width, $height)
{
parent::__construct($x, $y);
$this->width = $width;
$this->height = $height;
}
示例11: __construct
public function __construct($a, $r)
{
$this->name = "Куля";
parent::__construct($a, $r, 0);
}
示例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);
}
示例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();
}
示例14:
function __construct($x, $y, $radius)
{
parent::__construct($x, $y);
$this->radius = $radius;
}
示例15:
function __construct($radius)
{
parent::__construct($length = null, $width = null);
$this->radius = $radius;
}