本文整理汇总了PHP中Frame::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Frame::__construct方法的具体用法?PHP Frame::__construct怎么用?PHP Frame::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frame
的用法示例。
在下文中一共展示了Frame::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($options = array())
{
parent::__construct($options);
if ($this->_reader === null) {
return;
}
fread($this->_reader, $this->_size);
}
示例2: __construct
/**
* Constructor
*
* @param Frame|string $msg
* @param array $headers
*/
public function __construct($msg, array $headers = [])
{
if ($msg instanceof Frame) {
parent::__construct($msg->command, $msg->headers, $msg->body);
$this->map = json_decode($msg->body, true);
} else {
parent::__construct('SEND', $headers, $msg);
$this['transformation'] = 'jms-map-json';
$this->body = json_encode($msg);
}
}
示例3: __construct
/**
* Create new instance
*/
public function __construct()
{
parent::__construct();
$this->setUnit('px');
// Backward compatilibity setting
// @todo Remove on 1.0.0
$this->setWrap(self::WRAPPING_STYLE_INLINE);
$this->setHPos(self::POSITION_HORIZONTAL_LEFT);
$this->setHPosRelTo(self::POSITION_RELATIVE_TO_CHAR);
$this->setVPos(self::POSITION_VERTICAL_TOP);
$this->setVPosRelTo(self::POSITION_RELATIVE_TO_LINE);
}
示例4: __construct
public function __construct($options = array())
{
// TODO : Constructeur avec un source en paramètre
parent::__construct($options);
if ($this->_reader === null) {
return;
}
$this->_encoding = ord(fread($this->_reader, 1));
$this->_size--;
$this->extractMimeType();
$this->extractType();
$this->extractDescription();
$this->extractData();
}
示例5: __construct
public function __construct($options = array())
{
parent::__construct($options);
if ($this->_reader === null) {
return;
}
/**
* Si la taille de la frame dépasse la taille des header,
* On ajuste à la taille restante à lire
*/
if ($options['size'] - ftell($this->_reader) < $this->_size) {
$this->_size = $options['size'] - ftell($this->_reader);
}
$this->_text = hexdec(bin2hex(fread($this->_reader, $this->_size)));
}
示例6: __construct
public function __construct($options = array())
{
parent::__construct($options);
if ($this->_reader === null) {
return;
}
/**
* Si la taille de la frame dépasse la taille des header,
* On ajuste à la taille restante à lire
*/
if ($options['size'] - ftell($this->_reader) < $this->_size) {
$this->_size = $options['size'] - ftell($this->_reader);
}
$this->_text = fread($this->_reader, $this->_size);
$this->_text = iconv($this->_translateEncoding($this->_encoding), 'utf-8', $this->_text);
$this->_text = preg_replace('/[^[:print:]]/', '', $this->_text);
}
示例7: __construct
public function __construct($options = array())
{
parent::__construct($options);
if ($this->_reader === null) {
return;
}
/**
* Si la taille de la frame dépasse la taille des header,
* On ajuste à la taille restante à lire
*/
if ($options['size'] - ftell($this->_reader) < $this->_size) {
$this->_size = $options['size'] - ftell($this->_reader);
}
$this->_encoding = ord(fread($this->_reader, 1));
$this->_text = fread($this->_reader, $this->_size - 1);
//iconv(mb_detect_encoding($text, mb_detect_order(), true), "UTF-8", $text);
//if (($this->_translateEncoding($this->_encoding) != 'iso-8859-1'))
$this->_text = iconv($this->_translateEncoding($this->_encoding), 'utf-8', $this->_text);
}
示例8: __construct
public function __construct($body, array $headers = array())
{
parent::__construct('SEND', $headers, $body);
}
示例9:
function __construct()
{
parent::__construct(0, 0);
$this->frame3dStyle = new Frame3dStyles();
$this->children[] = $this->frame3dStyle;
}