Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite3513a2

Browse files
Merge pull request#142 from TheDragonCode/1.x
Added `split files` documentation
2 parents4228d4c +40dd6f3 commite3513a2

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespaceApp\Feeds;
6+
7+
useApp\Models\User;
8+
useDragonCode\LaravelFeed\Feeds\Feed;
9+
useIlluminate\Database\Eloquent\Builder;
10+
11+
class AttributeFeedextends Feed
12+
{
13+
publicfunctionbuilder():Builder
14+
{
15+
return User::query();
16+
}
17+
18+
publicfunctionperFile():int
19+
{
20+
return100;
21+
}
22+
23+
publicfunctionmaxFiles():int
24+
{
25+
return10;
26+
}
27+
}

‎docs/topics/elements.topic‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,33 @@
113113

114114
<code-blocklang="xml"src="advanced-element-attribute.xml" />
115115
</chapter>
116+
117+
<chaptertitle="Split files"id="split_files">
118+
<secondary-labelref="format-xml" />
119+
<secondary-labelref="format-rss" />
120+
<secondary-labelref="format-json" />
121+
<secondary-labelref="format-jsonl" />
122+
<secondary-labelref="format-csv" />
123+
124+
<p>
125+
If necessary, you can limit the number of lines output to a file, as well as the number of files themselves.
126+
To do this, use the perFile and maxFiles functions.
127+
</p>
128+
129+
<code-blocklang="php"src="advanced-element-split.php"include-lines="5-" />
130+
131+
<p>
132+
The methods work independently of each other.
133+
</p>
134+
135+
<p>
136+
When splitting, a sequential number will be added to the file names. For example:
137+
</p>
138+
139+
<list>
140+
<li>attribute-1.xml</li>
141+
<li>attribute-2.xml</li>
142+
<li>attribute-3.xml</li>
143+
</list>
144+
</chapter>
116145
</topic>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp