-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added description to landing page examples (#1185)
* Added description to landing page examples * Added missing headlines to example page
- Loading branch information
1 parent
f4c1d9b
commit deede5a
Showing
16 changed files
with
167 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Read data directly from a php associative array. Relays on `array_to_rows` DSL function. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Read data from a csv file. | ||
|
||
```php | ||
function from_csv( | ||
string|Path|array $path, | ||
bool $with_header = true, | ||
bool $empty_to_null = true, | ||
?string $delimiter = null, | ||
?string $enclosure = null, | ||
?string $escape = null, | ||
int $characters_read_in_line = 1000, | ||
?Schema $schema = null | ||
): | ||
``` | ||
|
||
* `with_header` - default true, if false, the first row will be treated as data | ||
* `empty_to_null` - default false, if true, empty string will be treated as null | ||
* `delimiter` - the delimiter of the csv file, when not set, it will be auto detected | ||
* `enclosure` - the enclosure of the csv file, when not set, it will be auto detected | ||
* `escape` - default `\`, the escape character of the csv file | ||
* `characters_in_line` - default `1000`, size of chunk used to read lines from the file | ||
* `schema` - the schema of the csv file, when not set, it will be auto detected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Read data from a json file. | ||
|
||
```php | ||
function from_json( | ||
string|Path|array $path, | ||
?string $pointer = null, | ||
?Schema $schema = null, | ||
); | ||
``` | ||
|
||
* `pointer` - default null, used to iterate only results of a subtree, read more about [pointers](https://github.com/halaxa/json-machine#parsing-a-subtree) | ||
* `schema` - the schema of the csv file, when not set, it will be auto detected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Read data from a json file. | ||
|
||
```php | ||
function from_parquet( | ||
string|Path|array $uri, | ||
array $columns = [], | ||
Options $options = new Options(), | ||
ByteOrder $byte_order = ByteOrder::LITTLE_ENDIAN, | ||
?int $offset = null, | ||
); | ||
``` | ||
|
||
* `columns` - default [], list of columns to read, when empty, all columns will be read | ||
* `options` - custom Parquet Reader [Options](https://github.com/flow-php/flow/blob/1.x/src/lib/parquet/src/Flow/Parquet/Options.php) | ||
* `byte_order` - default `ByteOrder::LITTLE_ENDIAN`, the byte order of the parquet file | ||
* `offset` - default null, rows to skip from the beginning of the file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Read data from a json file. | ||
|
||
```php | ||
function from_xml( | ||
string|Path|array $path, | ||
string $xml_node_path = '' | ||
); | ||
``` | ||
|
||
* `xml_node_path` - default '', the path to the node to read, when empty, the root node will be read. It's not xpath, it is just a sequence of node names separated with slash. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Schema inferring is a process of generating a schema from a whole or part of the dataset. | ||
Once schema is inferred, it can be saved and used to speed up next dataset processing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
web/landing/assets/controllers/all_links_external_controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {Controller} from '@hotwired/stimulus'; | ||
|
||
/* stimulusFetch: 'lazy' */ | ||
export default class extends Controller | ||
{ | ||
connect() | ||
{ | ||
this.element.querySelectorAll('a').forEach(link => { | ||
link.target = '_blank'; | ||
link.rel = 'noopener'; | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
web/landing/src/Flow/Website/Controller/HomeController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Flow\Website\Controller; | ||
|
||
use Flow\Website\Service\{Examples}; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\Routing\Attribute\Route; | ||
|
||
final class HomeController extends AbstractController | ||
{ | ||
public function __construct( | ||
private readonly Examples $examples, | ||
) { | ||
} | ||
|
||
#[Route('/', name: 'home')] | ||
public function home() : Response | ||
{ | ||
return $this->render('main/index.html.twig', [ | ||
'topics' => $this->examples->topics(), | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters