@@ 1262-1317 (lines=56) @@ | ||
1259 | } |
|
1260 | } |
|
1261 | ||
1262 | public function get_contributors() |
|
1263 | { |
|
1264 | $contributors = array(); |
|
1265 | foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor) |
|
1266 | { |
|
1267 | $name = null; |
|
1268 | $uri = null; |
|
1269 | $email = null; |
|
1270 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) |
|
1271 | { |
|
1272 | $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
1273 | } |
|
1274 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) |
|
1275 | { |
|
1276 | $uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); |
|
1277 | } |
|
1278 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) |
|
1279 | { |
|
1280 | $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
1281 | } |
|
1282 | if ($name !== null || $email !== null || $uri !== null) |
|
1283 | { |
|
1284 | $contributors[] = $this->registry->create('Author', array($name, $uri, $email)); |
|
1285 | } |
|
1286 | } |
|
1287 | foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor) |
|
1288 | { |
|
1289 | $name = null; |
|
1290 | $url = null; |
|
1291 | $email = null; |
|
1292 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) |
|
1293 | { |
|
1294 | $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
1295 | } |
|
1296 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) |
|
1297 | { |
|
1298 | $url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); |
|
1299 | } |
|
1300 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) |
|
1301 | { |
|
1302 | $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
1303 | } |
|
1304 | if ($name !== null || $email !== null || $url !== null) |
|
1305 | { |
|
1306 | $contributors[] = $this->registry->create('Author', array($name, $url, $email)); |
|
1307 | } |
|
1308 | } |
|
1309 | if (!empty($contributors)) |
|
1310 | { |
|
1311 | return array_unique($contributors); |
|
1312 | } |
|
1313 | else |
|
1314 | { |
|
1315 | return null; |
|
1316 | } |
|
1317 | } |
|
1318 | ||
1319 | public function get_link($key = 0, $rel = 'alternate') |
|
1320 | { |
|
@@ 6418-6473 (lines=56) @@ | ||
6415 | } |
|
6416 | } |
|
6417 | ||
6418 | public function get_contributors() |
|
6419 | { |
|
6420 | $contributors = array(); |
|
6421 | foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor) |
|
6422 | { |
|
6423 | $name = null; |
|
6424 | $uri = null; |
|
6425 | $email = null; |
|
6426 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) |
|
6427 | { |
|
6428 | $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
6429 | } |
|
6430 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) |
|
6431 | { |
|
6432 | $uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); |
|
6433 | } |
|
6434 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) |
|
6435 | { |
|
6436 | $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
6437 | } |
|
6438 | if ($name !== null || $email !== null || $uri !== null) |
|
6439 | { |
|
6440 | $contributors[] = $this->registry->create('Author', array($name, $uri, $email)); |
|
6441 | } |
|
6442 | } |
|
6443 | foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor) |
|
6444 | { |
|
6445 | $name = null; |
|
6446 | $url = null; |
|
6447 | $email = null; |
|
6448 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) |
|
6449 | { |
|
6450 | $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
6451 | } |
|
6452 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) |
|
6453 | { |
|
6454 | $url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); |
|
6455 | } |
|
6456 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) |
|
6457 | { |
|
6458 | $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
6459 | } |
|
6460 | if ($name !== null || $email !== null || $url !== null) |
|
6461 | { |
|
6462 | $contributors[] = $this->registry->create('Author', array($name, $url, $email)); |
|
6463 | } |
|
6464 | } |
|
6465 | if (!empty($contributors)) |
|
6466 | { |
|
6467 | return array_unique($contributors); |
|
6468 | } |
|
6469 | else |
|
6470 | { |
|
6471 | return null; |
|
6472 | } |
|
6473 | } |
|
6474 | ||
6475 | public function get_authors() |
|
6476 | { |
|
@@ 12864-12919 (lines=56) @@ | ||
12861 | return null; |
|
12862 | } |
|
12863 | } |
|
12864 | public function get_contributors() |
|
12865 | { |
|
12866 | $contributors = array(); |
|
12867 | foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor) |
|
12868 | { |
|
12869 | $name = null; |
|
12870 | $uri = null; |
|
12871 | $email = null; |
|
12872 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) |
|
12873 | { |
|
12874 | $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
12875 | } |
|
12876 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) |
|
12877 | { |
|
12878 | $uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); |
|
12879 | } |
|
12880 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) |
|
12881 | { |
|
12882 | $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
12883 | } |
|
12884 | if ($name !== null || $email !== null || $uri !== null) |
|
12885 | { |
|
12886 | $contributors[] = $this->registry->create('Author', array($name, $uri, $email)); |
|
12887 | } |
|
12888 | } |
|
12889 | foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor) |
|
12890 | { |
|
12891 | $name = null; |
|
12892 | $url = null; |
|
12893 | $email = null; |
|
12894 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) |
|
12895 | { |
|
12896 | $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
12897 | } |
|
12898 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) |
|
12899 | { |
|
12900 | $url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); |
|
12901 | } |
|
12902 | if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) |
|
12903 | { |
|
12904 | $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
12905 | } |
|
12906 | if ($name !== null || $email !== null || $url !== null) |
|
12907 | { |
|
12908 | $contributors[] = $this->registry->create('Author', array($name, $url, $email)); |
|
12909 | } |
|
12910 | } |
|
12911 | if (!empty($contributors)) |
|
12912 | { |
|
12913 | return array_unique($contributors); |
|
12914 | } |
|
12915 | else |
|
12916 | { |
|
12917 | return null; |
|
12918 | } |
|
12919 | } |
|
12920 | public function get_link($key = 0, $rel = 'alternate') |
|
12921 | { |
|
12922 | $links = $this->get_links($rel); |