setEncoding() public method

Sets the encoding type to be used.
public setEncoding ( stringEncode\Encode $encode )
$encode stringEncode\Encode
コード例 #1
0
 /** 
  * Sets the encoding class to this node and propagates it
  * to all its children.
  *
  * @param Encode $encode
  */
 public function propagateEncoding(Encode $encode)
 {
     $this->encode = $encode;
     $this->tag->setEncoding($encode);
     // check children
     foreach ($this->children as $id => $child) {
         $child['node']->propagateEncoding($encode);
     }
 }
コード例 #2
0
 /**
  * Sets the encoding class to this node and propagates it
  * to all its children.
  *
  * @param Encode $encode
  */
 public function propagateEncoding(Encode $encode)
 {
     $this->encode = $encode;
     $this->tag->setEncoding($encode);
     // check children
     foreach ($this->children as $id => $child) {
         /** @var AbstractNode $node */
         $node = $child['node'];
         $node->propagateEncoding($encode);
     }
 }
コード例 #3
0
 /**
  * Sets the encoding class to this node.
  *
  * @param Encode $encode
  * @return void
  */
 public function propagateEncoding(Encode $encode)
 {
     $this->encode = $encode;
     $this->tag->setEncoding($encode);
 }