PMA\libraries\PDF::SetAlias PHP Method

SetAlias() public method

Function to set alias which will be expanded on page rendering.
public SetAlias ( string $name, string $value ) : void
$name string name of the alias
$value string value of the alias
return void
    public function SetAlias($name, $value)
    {
        $name = TCPDF_FONTS::UTF8ToUTF16BE($name, false, true, $this->CurrentFont);
        $this->Alias[$name] = TCPDF_FONTS::UTF8ToUTF16BE($value, false, true, $this->CurrentFont);
    }

Usage Example

Example #1
0
 /**
  * Test for PDF::getPDFData
  *
  * @group large
  * @return void
  */
 public function testAlias()
 {
     $arr = new PDF();
     $arr->SetAlias('{00}', '32');
     $this->assertContains('PDF', $arr->getPDFData());
 }