public Extension::serialize()
Implements Serializable::serialize().
Serializes the Extension object in the most optimized way.
File
- core/lib/Drupal/Core/Extension/Extension.php, line 163
Class
- Extension
- Defines an extension (file) object.
Namespace
Drupal\Core\Extension
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | public function serialize() { // Don't serialize the app root, since this could change if the install is // moved. $data = array ( 'type' => $this ->type, 'pathname' => $this ->pathname, 'filename' => $this ->filename, ); // @todo ThemeHandler::listInfo(), ThemeHandler::rebuildThemeData(), and // system_list() are adding custom properties to the Extension object. $info = new \ReflectionObject( $this ); foreach ( $info ->getProperties(\ReflectionProperty::IS_PUBLIC) as $property ) { $data [ $property ->getName()] = $property ->getValue( $this ); } return serialize( $data ); } |
Please login to continue.