serialize() public method

The ID is excluded from the comparison, as we only care about actual style properties.
public serialize ( ) : string
return string The serialized style
Exemplo n.º 1
0
 /**
  * Returns whether the given style has already been registered.
  *
  * @param \Box\Spout\Writer\Style\Style $style
  * @return bool
  */
 protected function hasStyleAlreadyBeenRegistered($style)
 {
     $serializedStyle = $style->serialize();
     // Using isset here because it is way faster than array_key_exists...
     return isset($this->serializedStyleToStyleIdMappingTable[$serializedStyle]);
 }
Exemplo n.º 2
0
 /**
  * Returns whether the given style has already been registered.
  *
  * @param \Box\Spout\Writer\Style\Style $style
  * @return bool
  */
 protected function hasStyleAlreadyBeenRegistered($style)
 {
     $serializedStyle = $style->serialize();
     return array_key_exists($serializedStyle, $this->serializedStyleToStyleIdMappingTable);
 }