Page Menu
Home
GitPull.it
Search
Configure Global Search
Log In
Files
F2444648
D107.1729707134.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D107.1729707134.diff
View Options
diff --git a/include/wb/SnakLocalMedia.php b/include/wb/SnakLocalMedia.php
new file mode 100644
--- /dev/null
+++ b/include/wb/SnakLocalMedia.php
@@ -0,0 +1,39 @@
+<?php
+# Boz-MW - Another MediaWiki API handler in PHP
+# Copyright (C) 2017-2023 Valerio Bozzolan
+# Copyright (C) 2023 Valerio Bozzolan, Luca Mauri
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Wikibase
+namespace wb;
+
+/**
+ * A Snak for a string representing localMedia datatype.
+ */
+class SnakLocalMedia extends Snak {
+
+ /**
+ * @param $property string Wikidata property as 'P123'
+ * @param $value string
+ */
+ public function __construct( $property, $value ) {
+ return parent::__construct(
+ 'value',
+ $property,
+ DataType::LOCALMEDIA,
+ new DataValueString( $value )
+ );
+ }
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 23, 20:12 (10 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
641828
Default Alt Text
D107.1729707134.diff (1 KB)
Attached To
Mode
D107: Snak: add SnakLocalMedia
Attached
Detach File
Event Timeline
Log In to Comment