Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_ICo..

Decoded Output download

<?php
 class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable { const UNDERLINE_NONE = "none"; const UNDERLINE_DOUBLE = "double"; const UNDERLINE_DOUBLEACCOUNTING = "doubleAccounting"; const UNDERLINE_SINGLE = "single"; const UNDERLINE_SINGLEACCOUNTING = "singleAccounting"; protected $name = "Calibri"; protected $size = 11; protected $bold = false; protected $italic = false; protected $superScript = false; protected $subScript = false; protected $underline = self::UNDERLINE_NONE; protected $strikethrough = false; protected $color; public function __construct($isSupervisor = false, $isConditional = false) { parent::__construct($isSupervisor); if ($isConditional) { $this->name = null; $this->size = null; $this->bold = null; $this->italic = null; $this->superScript = null; $this->subScript = null; $this->underline = null; $this->strikethrough = null; $this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor, $isConditional); } else { $this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor); } if ($isSupervisor) { $this->color->bindParent($this, "color"); } } public function getSharedComponent() { return $this->parent->getSharedComponent()->getFont(); } public function getStyleArray($array) { return array("font" => $array); } public function applyFromArray($pStyles = null) { if (is_array($pStyles)) { if ($this->isSupervisor) { $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); } else { if (array_key_exists("name", $pStyles)) { $this->setName($pStyles["name"]); } if (array_key_exists("bold", $pStyles)) { $this->setBold($pStyles["bold"]); } if (array_key_exists("italic", $pStyles)) { $this->setItalic($pStyles["italic"]); } if (array_key_exists("superScript", $pStyles)) { $this->setSuperScript($pStyles["superScript"]); } if (array_key_exists("subScript", $pStyles)) { $this->setSubScript($pStyles["subScript"]); } if (array_key_exists("underline", $pStyles)) { $this->setUnderline($pStyles["underline"]); } if (array_key_exists("strike", $pStyles)) { $this->setStrikethrough($pStyles["strike"]); } if (array_key_exists("color", $pStyles)) { $this->getColor()->applyFromArray($pStyles["color"]); } if (array_key_exists("size", $pStyles)) { $this->setSize($pStyles["size"]); } } } else { throw new PHPExcel_Exception("Invalid style array passed."); } return $this; } public function getName() { if ($this->isSupervisor) { return $this->getSharedComponent()->getName(); } return $this->name; } public function setName($pValue = "Calibri") { if ($pValue == '') { $pValue = "Calibri"; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("name" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->name = $pValue; } return $this; } public function getSize() { if ($this->isSupervisor) { return $this->getSharedComponent()->getSize(); } return $this->size; } public function setSize($pValue = 10) { if ($pValue == '') { $pValue = 10; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("size" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->size = $pValue; } return $this; } public function getBold() { if ($this->isSupervisor) { return $this->getSharedComponent()->getBold(); } return $this->bold; } public function setBold($pValue = false) { if ($pValue == '') { $pValue = false; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("bold" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->bold = $pValue; } return $this; } public function getItalic() { if ($this->isSupervisor) { return $this->getSharedComponent()->getItalic(); } return $this->italic; } public function setItalic($pValue = false) { if ($pValue == '') { $pValue = false; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("italic" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->italic = $pValue; } return $this; } public function getSuperScript() { if ($this->isSupervisor) { return $this->getSharedComponent()->getSuperScript(); } return $this->superScript; } public function setSuperScript($pValue = false) { if ($pValue == '') { $pValue = false; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("superScript" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->superScript = $pValue; $this->subScript = !$pValue; } return $this; } public function getSubScript() { if ($this->isSupervisor) { return $this->getSharedComponent()->getSubScript(); } return $this->subScript; } public function setSubScript($pValue = false) { if ($pValue == '') { $pValue = false; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("subScript" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->subScript = $pValue; $this->superScript = !$pValue; } return $this; } public function getUnderline() { if ($this->isSupervisor) { return $this->getSharedComponent()->getUnderline(); } return $this->underline; } public function setUnderline($pValue = self::UNDERLINE_NONE) { if (is_bool($pValue)) { $pValue = $pValue ? self::UNDERLINE_SINGLE : self::UNDERLINE_NONE; } elseif ($pValue == '') { $pValue = self::UNDERLINE_NONE; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("underline" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->underline = $pValue; } return $this; } public function getStrikethrough() { if ($this->isSupervisor) { return $this->getSharedComponent()->getStrikethrough(); } return $this->strikethrough; } public function setStrikethrough($pValue = false) { if ($pValue == '') { $pValue = false; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("strike" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->strikethrough = $pValue; } return $this; } public function getColor() { return $this->color; } public function setColor(PHPExcel_Style_Color $pValue = null) { $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; if ($this->isSupervisor) { $styleArray = $this->getColor()->getStyleArray(array("argb" => $color->getARGB())); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->color = $color; } return $this; } public function getHashCode() { if ($this->isSupervisor) { return $this->getSharedComponent()->getHashCode(); } return md5($this->name . $this->size . ($this->bold ? "t" : "f") . ($this->italic ? "t" : "f") . ($this->superScript ? "t" : "f") . ($this->subScript ? "t" : "f") . $this->underline . ($this->strikethrough ? "t" : "f") . $this->color->getHashCode() . __CLASS__); } } ?>

Did this file decode correctly?

Original Code

<?php
 class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable { const UNDERLINE_NONE = "\x6e\157\156\x65"; const UNDERLINE_DOUBLE = "\x64\x6f\x75\x62\x6c\x65"; const UNDERLINE_DOUBLEACCOUNTING = "\x64\157\165\142\x6c\x65\x41\143\143\x6f\x75\156\x74\x69\x6e\x67"; const UNDERLINE_SINGLE = "\x73\x69\x6e\x67\x6c\x65"; const UNDERLINE_SINGLEACCOUNTING = "\163\151\x6e\x67\154\145\101\x63\x63\157\x75\156\x74\x69\156\x67"; protected $name = "\x43\141\x6c\151\x62\162\151"; protected $size = 11; protected $bold = false; protected $italic = false; protected $superScript = false; protected $subScript = false; protected $underline = self::UNDERLINE_NONE; protected $strikethrough = false; protected $color; public function __construct($isSupervisor = false, $isConditional = false) { parent::__construct($isSupervisor); if ($isConditional) { $this->name = null; $this->size = null; $this->bold = null; $this->italic = null; $this->superScript = null; $this->subScript = null; $this->underline = null; $this->strikethrough = null; $this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor, $isConditional); } else { $this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor); } if ($isSupervisor) { $this->color->bindParent($this, "\x63\157\154\157\162"); } } public function getSharedComponent() { return $this->parent->getSharedComponent()->getFont(); } public function getStyleArray($array) { return array("\146\x6f\x6e\x74" => $array); } public function applyFromArray($pStyles = null) { if (is_array($pStyles)) { if ($this->isSupervisor) { $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); } else { if (array_key_exists("\x6e\141\155\x65", $pStyles)) { $this->setName($pStyles["\156\141\x6d\145"]); } if (array_key_exists("\142\x6f\x6c\x64", $pStyles)) { $this->setBold($pStyles["\142\157\x6c\144"]); } if (array_key_exists("\151\x74\x61\154\x69\x63", $pStyles)) { $this->setItalic($pStyles["\x69\164\x61\154\x69\143"]); } if (array_key_exists("\x73\x75\160\145\x72\x53\143\x72\151\x70\164", $pStyles)) { $this->setSuperScript($pStyles["\163\165\160\x65\162\x53\x63\162\151\x70\x74"]); } if (array_key_exists("\x73\165\142\x53\143\x72\151\x70\x74", $pStyles)) { $this->setSubScript($pStyles["\x73\165\142\123\143\162\x69\x70\x74"]); } if (array_key_exists("\x75\x6e\x64\145\162\x6c\151\x6e\145", $pStyles)) { $this->setUnderline($pStyles["\165\x6e\x64\145\x72\x6c\151\156\x65"]); } if (array_key_exists("\163\164\x72\x69\x6b\145", $pStyles)) { $this->setStrikethrough($pStyles["\163\x74\162\151\x6b\x65"]); } if (array_key_exists("\x63\x6f\x6c\x6f\162", $pStyles)) { $this->getColor()->applyFromArray($pStyles["\x63\157\154\x6f\x72"]); } if (array_key_exists("\x73\151\172\x65", $pStyles)) { $this->setSize($pStyles["\x73\x69\x7a\x65"]); } } } else { throw new PHPExcel_Exception("\111\x6e\166\141\154\x69\144\x20\163\x74\x79\x6c\x65\x20\141\162\x72\x61\x79\x20\160\x61\x73\163\x65\144\56"); } return $this; } public function getName() { if ($this->isSupervisor) { return $this->getSharedComponent()->getName(); } return $this->name; } public function setName($pValue = "\x43\141\x6c\151\x62\162\151") { if ($pValue == '') { $pValue = "\x43\x61\x6c\151\142\162\151"; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("\156\x61\155\x65" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->name = $pValue; } return $this; } public function getSize() { if ($this->isSupervisor) { return $this->getSharedComponent()->getSize(); } return $this->size; } public function setSize($pValue = 10) { if ($pValue == '') { $pValue = 10; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("\x73\151\x7a\145" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->size = $pValue; } return $this; } public function getBold() { if ($this->isSupervisor) { return $this->getSharedComponent()->getBold(); } return $this->bold; } public function setBold($pValue = false) { if ($pValue == '') { $pValue = false; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("\x62\x6f\x6c\144" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->bold = $pValue; } return $this; } public function getItalic() { if ($this->isSupervisor) { return $this->getSharedComponent()->getItalic(); } return $this->italic; } public function setItalic($pValue = false) { if ($pValue == '') { $pValue = false; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("\151\164\141\154\151\x63" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->italic = $pValue; } return $this; } public function getSuperScript() { if ($this->isSupervisor) { return $this->getSharedComponent()->getSuperScript(); } return $this->superScript; } public function setSuperScript($pValue = false) { if ($pValue == '') { $pValue = false; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("\x73\165\x70\x65\162\123\x63\162\x69\160\164" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->superScript = $pValue; $this->subScript = !$pValue; } return $this; } public function getSubScript() { if ($this->isSupervisor) { return $this->getSharedComponent()->getSubScript(); } return $this->subScript; } public function setSubScript($pValue = false) { if ($pValue == '') { $pValue = false; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("\163\x75\x62\123\x63\162\151\160\x74" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->subScript = $pValue; $this->superScript = !$pValue; } return $this; } public function getUnderline() { if ($this->isSupervisor) { return $this->getSharedComponent()->getUnderline(); } return $this->underline; } public function setUnderline($pValue = self::UNDERLINE_NONE) { if (is_bool($pValue)) { $pValue = $pValue ? self::UNDERLINE_SINGLE : self::UNDERLINE_NONE; } elseif ($pValue == '') { $pValue = self::UNDERLINE_NONE; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("\x75\156\x64\x65\162\x6c\151\x6e\x65" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->underline = $pValue; } return $this; } public function getStrikethrough() { if ($this->isSupervisor) { return $this->getSharedComponent()->getStrikethrough(); } return $this->strikethrough; } public function setStrikethrough($pValue = false) { if ($pValue == '') { $pValue = false; } if ($this->isSupervisor) { $styleArray = $this->getStyleArray(array("\x73\x74\162\151\153\x65" => $pValue)); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->strikethrough = $pValue; } return $this; } public function getColor() { return $this->color; } public function setColor(PHPExcel_Style_Color $pValue = null) { $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; if ($this->isSupervisor) { $styleArray = $this->getColor()->getStyleArray(array("\141\x72\147\142" => $color->getARGB())); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); } else { $this->color = $color; } return $this; } public function getHashCode() { if ($this->isSupervisor) { return $this->getSharedComponent()->getHashCode(); } return md5($this->name . $this->size . ($this->bold ? "\164" : "\x66") . ($this->italic ? "\x74" : "\146") . ($this->superScript ? "\x74" : "\146") . ($this->subScript ? "\x74" : "\146") . $this->underline . ($this->strikethrough ? "\x74" : "\x66") . $this->color->getHashCode() . __CLASS__); } }

Function Calls

None

Variables

None

Stats

MD5 b7e9f30443a5bda88346adc603f8ef65
Eval Count 0
Decode Time 89 ms