Xpressengine\Storage\FilesystemHandler::store PHP Method

store() public method

file content to disk storage
public store ( string $content, string $pathname, string $disk ) : boolean
$content string file content
$pathname string be saved path and file name
$disk string be saved disk name
return boolean
    public function store($content, $pathname, $disk)
    {
        return $this->getDisk($disk)->put($pathname, $content);
    }

Usage Example

 public function testStore()
 {
     list($filesystem) = $this->getMocks();
     $instance = new FilesystemHandler($filesystem);
     $mockFilesystem = m::mock('Illuminate\\Contracts\\Filesystem\\Filesystem');
     $mockFilesystem->shouldReceive('put')->once()->with('attached/filenamestring', 'content')->andReturn(true);
     $filesystem->shouldReceive('disk')->once()->with('local')->andReturn($mockFilesystem);
     $instance->store('content', 'attached/filenamestring', 'local');
 }
All Usage Examples Of Xpressengine\Storage\FilesystemHandler::store