本文整理汇总了PHP中Rectangle::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Rectangle::__construct方法的具体用法?PHP Rectangle::__construct怎么用?PHP Rectangle::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rectangle
的用法示例。
在下文中一共展示了Rectangle::__construct方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($size, $image)
{
parent::__construct($size, $size, $image);
}
示例2: __construct
public function __construct($width)
{
parent::__construct($width, $width);
}
示例3: __construct
public function __construct($height)
{
parent::__construct($height, $height);
}
示例4: __construct
public function __construct($x, $y, $size)
{
parent::__construct($x, $y, $size, $size);
$this->size = $size;
//Expose size to reflection
}
示例5: __construct
public function __construct($side)
{
parent::__construct($side, $side);
}
示例6: __construct
public function __construct($x1, $y1, $x2, $y2)
{
parent::__construct($x1, $y1, $x2, $y2);
}
示例7:
function __construct($h, $w, $r, $s1)
{
parent::__construct($h, $w, $r);
//Square heights = square widths
$this->height = $s1;
$this->width = $s1;
$this->numSides = 4;
$this->sideLengths[0] = $s1;
$this->sideLengths[1] = $s1;
$this->sideLengths[2] = $s1;
$this->sideLengths[3] = $s1;
$this->cPerim();
$this->cArea();
}
示例8:
function __construct($bound, $bgcolor = NULL, $fgcolor = NULL, $surfaces = 63, $depth = 15)
{
parent::__construct($bound, $bgcolor, $fgcolor);
$this->surfaces($surfaces);
$this->depth($depth);
}
示例9: __construct
public function __construct($width, $height, $margin = 0)
{
parent::__construct($width, $height);
$this->margin = $margin;
}
示例10: __construct
public function __construct($size, $image)
{
parent::__construct($size, $size, $image);
$this->name = 'Square';
}