示例#1
0
 /**
  * @param Cell           $cell
  * @param                $value
  * @param ReferenceTable $table
  *
  * @return mixed
  */
 public function parse(Cell $cell, $value, ReferenceTable &$table)
 {
     if ($value == 'italic') {
         $cell->font()->italic();
     } elseif ($value == 'normal') {
         $cell->font()->italic(false);
     }
 }
示例#2
0
 /**
  * @param Cell           $cell
  * @param                $value
  * @param ReferenceTable $table
  *
  * @return mixed
  */
 public function parse(Cell $cell, $value, ReferenceTable &$table)
 {
     if ($value == 'bold' || $value >= 500) {
         $cell->font()->bold();
     } elseif ($value == 'normal' || $value < 500) {
         $cell->font()->bold(false);
     }
 }
示例#3
0
 /**
  * @param Cell           $cell
  * @param                $value
  * @param ReferenceTable $table
  *
  * @return mixed
  */
 public function parse(Cell $cell, $value, ReferenceTable &$table)
 {
     switch ($value) {
         case 'underline':
             $cell->font()->underline();
         case 'line-through':
             $cell->font()->strikethrough();
     }
 }
示例#4
0
 /**
  * @param Cell           $cell
  * @param                $value
  * @param ReferenceTable $table
  *
  * @return mixed
  */
 public function parse(Cell $cell, $value, ReferenceTable &$table)
 {
     $cell->font()->family($value);
 }