示例#1
0
 /**
  * Function: encode
  *
  * Convert from internal encoding to the given encoding
  */
 function encode($encoding, $errors = false, $normalize = true)
 {
     // TODO: Normalize the encoding name
     if (0 === strcasecmp($encoding, $this->encoding)) {
         // No change was requested. Just return the object unchanged
         return $this;
     }
     return Codec::encode($this, $encoding, $errors);
 }
示例#2
0
 /**
  * {@inheritDoc}
  */
 public function encode($value)
 {
     return $this->codec->encode($value);
 }
示例#3
0
 /**
  * このオブジェクトに指定された Codec を使って指定された値をエンコードします.
  * 
  * @param  mixed $var エンコード対象の値
  * @return mixed      変換結果
  */
 public function encode($var)
 {
     return $this->second->encode($this->first->encode($var));
 }
示例#4
0
文件: Bytes.php 项目: iHunt101/phlite
 function encode($encoding, $errors = false)
 {
     return Codec::encode($this, $encoding, $errors);
 }