Puli\Repository\Resource\GenericResource::preSerialize PHP Method

preSerialize() protected method

Override this method if you want to serialize custom data in subclasses.
protected preSerialize ( array &$data )
$data array The data to serialize. Add custom data at the end of the array.
    protected function preSerialize(array &$data)
    {
        $data[] = $this->path;
        $data[] = $this->repoPath;
    }

Usage Example

 protected function preSerialize(array &$data)
 {
     parent::preSerialize($data);
     $data[] = $this->filesystemPath;
 }
All Usage Examples Of Puli\Repository\Resource\GenericResource::preSerialize