1
0
Fork 0

Move redundant System::baseUrl() to DI::baseUrl() calls

This commit is contained in:
Philipp Holzer 2019-12-30 23:00:08 +01:00
commit 3f34229752
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
81 changed files with 418 additions and 465 deletions

View file

@ -60,7 +60,7 @@ class Transmitter
$count = DBA::count('contact', $condition);
$data = ['@context' => ActivityPub::CONTEXT];
$data['id'] = System::baseUrl() . '/followers/' . $owner['nickname'];
$data['id'] = DI::baseUrl() . '/followers/' . $owner['nickname'];
$data['type'] = 'OrderedCollection';
$data['totalItems'] = $count;
@ -71,7 +71,7 @@ class Transmitter
}
if (empty($page)) {
$data['first'] = System::baseUrl() . '/followers/' . $owner['nickname'] . '?page=1';
$data['first'] = DI::baseUrl() . '/followers/' . $owner['nickname'] . '?page=1';
} else {
$data['type'] = 'OrderedCollectionPage';
$list = [];
@ -82,10 +82,10 @@ class Transmitter
}
if (!empty($list)) {
$data['next'] = System::baseUrl() . '/followers/' . $owner['nickname'] . '?page=' . ($page + 1);
$data['next'] = DI::baseUrl() . '/followers/' . $owner['nickname'] . '?page=' . ($page + 1);
}
$data['partOf'] = System::baseUrl() . '/followers/' . $owner['nickname'];
$data['partOf'] = DI::baseUrl() . '/followers/' . $owner['nickname'];
$data['orderedItems'] = $list;
}
@ -109,7 +109,7 @@ class Transmitter
$count = DBA::count('contact', $condition);
$data = ['@context' => ActivityPub::CONTEXT];
$data['id'] = System::baseUrl() . '/following/' . $owner['nickname'];
$data['id'] = DI::baseUrl() . '/following/' . $owner['nickname'];
$data['type'] = 'OrderedCollection';
$data['totalItems'] = $count;
@ -120,7 +120,7 @@ class Transmitter
}
if (empty($page)) {
$data['first'] = System::baseUrl() . '/following/' . $owner['nickname'] . '?page=1';
$data['first'] = DI::baseUrl() . '/following/' . $owner['nickname'] . '?page=1';
} else {
$data['type'] = 'OrderedCollectionPage';
$list = [];
@ -131,10 +131,10 @@ class Transmitter
}
if (!empty($list)) {
$data['next'] = System::baseUrl() . '/following/' . $owner['nickname'] . '?page=' . ($page + 1);
$data['next'] = DI::baseUrl() . '/following/' . $owner['nickname'] . '?page=' . ($page + 1);
}
$data['partOf'] = System::baseUrl() . '/following/' . $owner['nickname'];
$data['partOf'] = DI::baseUrl() . '/following/' . $owner['nickname'];
$data['orderedItems'] = $list;
}
@ -162,12 +162,12 @@ class Transmitter
$count = DBA::count('item', $condition);
$data = ['@context' => ActivityPub::CONTEXT];
$data['id'] = System::baseUrl() . '/outbox/' . $owner['nickname'];
$data['id'] = DI::baseUrl() . '/outbox/' . $owner['nickname'];
$data['type'] = 'OrderedCollection';
$data['totalItems'] = $count;
if (empty($page)) {
$data['first'] = System::baseUrl() . '/outbox/' . $owner['nickname'] . '?page=1';
$data['first'] = DI::baseUrl() . '/outbox/' . $owner['nickname'] . '?page=1';
} else {
$data['type'] = 'OrderedCollectionPage';
$list = [];
@ -184,10 +184,10 @@ class Transmitter
}
if (!empty($list)) {
$data['next'] = System::baseUrl() . '/outbox/' . $owner['nickname'] . '?page=' . ($page + 1);
$data['next'] = DI::baseUrl() . '/outbox/' . $owner['nickname'] . '?page=' . ($page + 1);
}
$data['partOf'] = System::baseUrl() . '/outbox/' . $owner['nickname'];
$data['partOf'] = DI::baseUrl() . '/outbox/' . $owner['nickname'];
$data['orderedItems'] = $list;
}
@ -240,10 +240,10 @@ class Transmitter
$data['id'] = $contact['url'];
$data['diaspora:guid'] = $user['guid'];
$data['type'] = ActivityPub::ACCOUNT_TYPES[$user['account-type']];
$data['following'] = System::baseUrl() . '/following/' . $user['nickname'];
$data['followers'] = System::baseUrl() . '/followers/' . $user['nickname'];
$data['inbox'] = System::baseUrl() . '/inbox/' . $user['nickname'];
$data['outbox'] = System::baseUrl() . '/outbox/' . $user['nickname'];
$data['following'] = DI::baseUrl() . '/following/' . $user['nickname'];
$data['followers'] = DI::baseUrl() . '/followers/' . $user['nickname'];
$data['inbox'] = DI::baseUrl() . '/inbox/' . $user['nickname'];
$data['outbox'] = DI::baseUrl() . '/outbox/' . $user['nickname'];
$data['preferredUsername'] = $user['nickname'];
$data['name'] = $contact['name'];
$data['vcard:hasAddress'] = ['@type' => 'vcard:Home', 'vcard:country-name' => $profile['country-name'],
@ -254,7 +254,7 @@ class Transmitter
$data['publicKey'] = ['id' => $contact['url'] . '#main-key',
'owner' => $contact['url'],
'publicKeyPem' => $user['pubkey']];
$data['endpoints'] = ['sharedInbox' => System::baseUrl() . '/inbox'];
$data['endpoints'] = ['sharedInbox' => DI::baseUrl() . '/inbox'];
$data['icon'] = ['type' => 'Image',
'url' => $contact['photo']];
@ -273,7 +273,7 @@ class Transmitter
{
return [
'@context' => ActivityPub::CONTEXT,
'id' => System::baseUrl() . '/profile/' . $username,
'id' => DI::baseUrl() . '/profile/' . $username,
'type' => 'Tombstone',
'published' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
'updated' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
@ -983,7 +983,7 @@ class Transmitter
$terms = Term::tagArrayFromItemId($item['id'], [Term::HASHTAG, Term::MENTION, Term::IMPLICIT_MENTION]);
foreach ($terms as $term) {
if ($term['type'] == Term::HASHTAG) {
$url = System::baseUrl() . '/search?tag=' . urlencode($term['term']);
$url = DI::baseUrl() . '/search?tag=' . urlencode($term['term']);
$tags[] = ['type' => 'Hashtag', 'href' => $url, 'name' => '#' . $term['term']];
} elseif ($term['type'] == Term::MENTION || $term['type'] == Term::IMPLICIT_MENTION) {
$contact = Contact::getDetailsByURL($term['url']);
@ -1460,7 +1460,7 @@ class Transmitter
$hash = hash('ripemd128', $contact['uid'].'-'.$contact['id'].'-'.$contact['created']);
$uuid = substr($hash, 0, 8). '-' . substr($hash, 8, 4) . '-' . substr($hash, 12, 4) . '-' . substr($hash, 16, 4) . '-' . substr($hash, 20, 12);
return System::baseUrl() . '/activity/' . $uuid;
return DI::baseUrl() . '/activity/' . $uuid;
}
/**
@ -1480,7 +1480,7 @@ class Transmitter
$suggestion = DBA::selectFirst('fsuggest', ['url', 'note', 'created'], ['id' => $suggestion_id]);
$data = ['@context' => ActivityPub::CONTEXT,
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
'id' => DI::baseUrl() . '/activity/' . System::createGUID(),
'type' => 'Announce',
'actor' => $owner['url'],
'object' => $suggestion['url'],
@ -1509,7 +1509,7 @@ class Transmitter
$owner = User::getOwnerDataById($uid);
$data = ['@context' => ActivityPub::CONTEXT,
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
'id' => DI::baseUrl() . '/activity/' . System::createGUID(),
'type' => 'dfrn:relocate',
'actor' => $owner['url'],
'object' => $owner['url'],
@ -1548,7 +1548,7 @@ class Transmitter
}
$data = ['@context' => ActivityPub::CONTEXT,
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
'id' => DI::baseUrl() . '/activity/' . System::createGUID(),
'type' => 'Delete',
'actor' => $owner['url'],
'object' => $owner['url'],
@ -1579,7 +1579,7 @@ class Transmitter
$profile = APContact::getByURL($owner['url']);
$data = ['@context' => ActivityPub::CONTEXT,
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
'id' => DI::baseUrl() . '/activity/' . System::createGUID(),
'type' => 'Update',
'actor' => $owner['url'],
'object' => self::getProfile($uid),
@ -1616,7 +1616,7 @@ class Transmitter
$owner = User::getOwnerDataById($uid);
if (empty($id)) {
$id = System::baseUrl() . '/activity/' . System::createGUID();
$id = DI::baseUrl() . '/activity/' . System::createGUID();
}
$data = ['@context' => ActivityPub::CONTEXT,
@ -1673,7 +1673,7 @@ class Transmitter
$owner = User::getOwnerDataById($uid);
$data = ['@context' => ActivityPub::CONTEXT,
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
'id' => DI::baseUrl() . '/activity/' . System::createGUID(),
'type' => 'Follow',
'actor' => $owner['url'],
'object' => $object,
@ -1705,7 +1705,7 @@ class Transmitter
$owner = User::getOwnerDataById($uid);
$data = ['@context' => ActivityPub::CONTEXT,
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
'id' => DI::baseUrl() . '/activity/' . System::createGUID(),
'type' => 'Accept',
'actor' => $owner['url'],
'object' => [
@ -1742,7 +1742,7 @@ class Transmitter
$owner = User::getOwnerDataById($uid);
$data = ['@context' => ActivityPub::CONTEXT,
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
'id' => DI::baseUrl() . '/activity/' . System::createGUID(),
'type' => 'Reject',
'actor' => $owner['url'],
'object' => [
@ -1782,7 +1782,7 @@ class Transmitter
return;
}
$id = System::baseUrl() . '/activity/' . System::createGUID();
$id = DI::baseUrl() . '/activity/' . System::createGUID();
$owner = User::getOwnerDataById($uid);
$data = ['@context' => ActivityPub::CONTEXT,

View file

@ -18,7 +18,6 @@ use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
@ -506,7 +505,7 @@ class DFRN
$ext = Images::supportedTypes();
foreach ($rp as $p) {
$photos[$p['scale']] = System::baseUrl().'/photo/'.$p['resource-id'].'-'.$p['scale'].'.'.$ext[$p['type']];
$photos[$p['scale']] = DI::baseUrl().'/photo/'.$p['resource-id'].'-'.$p['scale'].'.'.$ext[$p['type']];
}
@ -568,7 +567,7 @@ class DFRN
$root->setAttribute("xmlns:ostatus", ActivityNamespace::OSTATUS);
$root->setAttribute("xmlns:statusnet", ActivityNamespace::STATUSNET);
XML::addElement($doc, $root, "id", System::baseUrl()."/profile/".$owner["nick"]);
XML::addElement($doc, $root, "id", DI::baseUrl()."/profile/".$owner["nick"]);
XML::addElement($doc, $root, "title", $owner["name"]);
$attributes = ["uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION."-".DB_UPDATE_VERSION];
@ -585,13 +584,13 @@ class DFRN
// DFRN itself doesn't uses this. But maybe someone else wants to subscribe to the public feed.
OStatus::hublinks($doc, $root, $owner["nick"]);
$attributes = ["rel" => "salmon", "href" => System::baseUrl()."/salmon/".$owner["nick"]];
$attributes = ["rel" => "salmon", "href" => DI::baseUrl()."/salmon/".$owner["nick"]];
XML::addElement($doc, $root, "link", "", $attributes);
$attributes = ["rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => System::baseUrl()."/salmon/".$owner["nick"]];
$attributes = ["rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => DI::baseUrl()."/salmon/".$owner["nick"]];
XML::addElement($doc, $root, "link", "", $attributes);
$attributes = ["rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => System::baseUrl()."/salmon/".$owner["nick"]];
$attributes = ["rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => DI::baseUrl()."/salmon/".$owner["nick"]];
XML::addElement($doc, $root, "link", "", $attributes);
}
@ -652,7 +651,7 @@ class DFRN
}
XML::addElement($doc, $author, "name", $owner["name"], $attributes);
XML::addElement($doc, $author, "uri", System::baseUrl().'/profile/'.$owner["nickname"], $attributes);
XML::addElement($doc, $author, "uri", DI::baseUrl().'/profile/'.$owner["nickname"], $attributes);
XML::addElement($doc, $author, "dfrn:handle", $owner["addr"], $attributes);
$attributes = ["rel" => "photo", "type" => "image/jpeg",
@ -989,7 +988,7 @@ class DFRN
}
// Add conversation data. This is used for OStatus
$conversation_href = System::baseUrl()."/display/".$item["parent-guid"];
$conversation_href = DI::baseUrl()."/display/".$item["parent-guid"];
$conversation_uri = $conversation_href;
if (isset($parent_item)) {
@ -1030,7 +1029,7 @@ class DFRN
"link",
"",
["rel" => "alternate", "type" => "text/html",
"href" => System::baseUrl() . "/display/" . $item["guid"]]
"href" => DI::baseUrl() . "/display/" . $item["guid"]]
);
// "comment-allow" is some old fashioned stuff for old Friendica versions.
@ -1901,7 +1900,7 @@ class DFRN
'to_email' => $importer['email'],
'uid' => $importer['importer_uid'],
'item' => $suggest,
'link' => System::baseUrl().'/notifications/intros',
'link' => DI::baseUrl().'/notifications/intros',
'source_name' => $importer['name'],
'source_link' => $importer['url'],
'source_photo' => $importer['photo'],
@ -2129,7 +2128,7 @@ class DFRN
}
}
if ($Blink && Strings::compareLink($Blink, System::baseUrl() . "/profile/" . $importer["nickname"])) {
if ($Blink && Strings::compareLink($Blink, DI::baseUrl() . "/profile/" . $importer["nickname"])) {
$author = DBA::selectFirst('contact', ['name', 'thumb', 'url'], ['id' => $item['author-id']]);
$parent = Item::selectFirst(['id'], ['uri' => $item['parent-uri'], 'uid' => $importer["importer_uid"]]);
@ -2145,7 +2144,7 @@ class DFRN
"to_email" => $importer["email"],
"uid" => $importer["importer_uid"],
"item" => $item,
"link" => System::baseUrl()."/display/".urlencode($item['guid']),
"link" => DI::baseUrl()."/display/".urlencode($item['guid']),
"source_name" => $author["name"],
"source_link" => $author["url"],
"source_photo" => $author["thumb"],
@ -2886,13 +2885,13 @@ class DFRN
$community_page = ($user['page-flags'] == User::PAGE_FLAGS_COMMUNITY);
$prvgroup = ($user['page-flags'] == User::PAGE_FLAGS_PRVGROUP);
$link = Strings::normaliseLink(System::baseUrl() . '/profile/' . $user['nickname']);
$link = Strings::normaliseLink(DI::baseUrl() . '/profile/' . $user['nickname']);
/*
* Diaspora uses their own hardwired link URL in @-tags
* instead of the one we supply with webfinger
*/
$dlink = Strings::normaliseLink(System::baseUrl() . '/u/' . $user['nickname']);
$dlink = Strings::normaliseLink(DI::baseUrl() . '/u/' . $user['nickname']);
$cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches, PREG_SET_ORDER);
if ($cnt) {

View file

@ -22,17 +22,16 @@ use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Conversation;
use Friendica\Model\GContact;
use Friendica\Model\Group;
use Friendica\Model\Item;
use Friendica\Model\ItemDeliveryData;
use Friendica\Model\Mail;
use Friendica\Model\Profile;
use Friendica\Model\User;
use Friendica\Network\Probe;
use Friendica\Protocol\ActivityNamespace;
use Friendica\Util\Crypto;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Map;
@ -145,7 +144,7 @@ class Diaspora
// Now we are collecting all relay contacts
foreach ($serverlist as $server_url) {
// We don't send messages to ourselves
if (Strings::compareLink($server_url, System::baseUrl())) {
if (Strings::compareLink($server_url, DI::baseUrl())) {
continue;
}
$contact = self::getRelayContact($server_url);
@ -2670,7 +2669,7 @@ class Diaspora
return false;
}
$orig_url = System::baseUrl()."/display/".$original_item["guid"];
$orig_url = DI::baseUrl()."/display/".$original_item["guid"];
$datarray = [];
@ -2996,7 +2995,7 @@ class Diaspora
$nick = $contact["nick"];
}
return $nick . "@" . substr(System::baseUrl(), strpos(System::baseUrl(), "://") + 3);
return $nick . "@" . substr(DI::baseUrl(), strpos(DI::baseUrl(), "://") + 3);
}
@ -4117,9 +4116,9 @@ class Diaspora
$first = $split_name['first'];
$last = $split_name['last'];
$large = System::baseUrl().'/photo/custom/300/'.$profile['uid'].'.jpg';
$medium = System::baseUrl().'/photo/custom/100/'.$profile['uid'].'.jpg';
$small = System::baseUrl().'/photo/custom/50/' .$profile['uid'].'.jpg';
$large = DI::baseUrl().'/photo/custom/300/'.$profile['uid'].'.jpg';
$medium = DI::baseUrl().'/photo/custom/100/'.$profile['uid'].'.jpg';
$small = DI::baseUrl().'/photo/custom/50/' .$profile['uid'].'.jpg';
$searchable = (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false');
$dob = null;

View file

@ -11,11 +11,9 @@ use DOMXPath;
use Friendica\Content\Text\HTML;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Item;
use Friendica\Protocol\ActivityNamespace;
use Friendica\Util\ParseUrl;
use Friendica\Util\Network;
use Friendica\Util\XML;
@ -353,7 +351,7 @@ class Feed {
$tags .= ', ';
}
$taglink = "#[url=" . System::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url]";
$taglink = "#[url=" . DI::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url]";
$tags .= $taglink;
}

View file

@ -15,7 +15,6 @@ use Friendica\Core\Lock;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\APContact;
@ -25,8 +24,6 @@ use Friendica\Model\GContact;
use Friendica\Model\Item;
use Friendica\Model\User;
use Friendica\Network\Probe;
use Friendica\Object\Image;
use Friendica\Protocol\ActivityNamespace;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Images;
use Friendica\Util\Network;
@ -649,7 +646,7 @@ class OStatus
$item['tag'] = '';
}
$item['tag'] .= '#[url=' . System::baseUrl() . '/search?tag=' . $term . ']' . $term . '[/url]';
$item['tag'] .= '#[url=' . DI::baseUrl() . '/search?tag=' . $term . ']' . $term . '[/url]';
}
}
}
@ -1293,7 +1290,7 @@ class OStatus
$attributes = ["uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION . "-" . DB_UPDATE_VERSION];
XML::addElement($doc, $root, "generator", FRIENDICA_PLATFORM, $attributes);
XML::addElement($doc, $root, "id", System::baseUrl() . "/profile/" . $owner["nick"]);
XML::addElement($doc, $root, "id", DI::baseUrl() . "/profile/" . $owner["nick"]);
XML::addElement($doc, $root, "title", $title);
XML::addElement($doc, $root, "subtitle", sprintf("Updates from %s on %s", $owner["name"], Config::get('config', 'sitename')));
XML::addElement($doc, $root, "logo", $owner["photo"]);
@ -1313,16 +1310,16 @@ class OStatus
self::hublinks($doc, $root, $owner["nick"]);
$attributes = ["href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "salmon"];
$attributes = ["href" => DI::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "salmon"];
XML::addElement($doc, $root, "link", "", $attributes);
$attributes = ["href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-replies"];
$attributes = ["href" => DI::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-replies"];
XML::addElement($doc, $root, "link", "", $attributes);
$attributes = ["href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-mention"];
$attributes = ["href" => DI::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-mention"];
XML::addElement($doc, $root, "link", "", $attributes);
$attributes = ["href" => System::baseUrl() . $selfUri, "rel" => "self", "type" => "application/atom+xml"];
$attributes = ["href" => DI::baseUrl() . $selfUri, "rel" => "self", "type" => "application/atom+xml"];
XML::addElement($doc, $root, "link", "", $attributes);
if ($owner['account-type'] == Contact::TYPE_COMMUNITY) {
@ -1346,7 +1343,7 @@ class OStatus
*/
public static function hublinks(DOMDocument $doc, $root, $nick)
{
$h = System::baseUrl() . '/pubsubhubbub/'.$nick;
$h = DI::baseUrl() . '/pubsubhubbub/'.$nick;
XML::addElement($doc, $root, "link", "", ["href" => $h, "rel" => "hub"]);
}
@ -1492,7 +1489,7 @@ class OStatus
$author->appendChild($urls);
}
XML::addElement($doc, $author, "followers", "", ["url" => System::baseUrl() . "/profile/" . $owner["nick"] . "/contacts/followers"]);
XML::addElement($doc, $author, "followers", "", ["url" => DI::baseUrl() . "/profile/" . $owner["nick"] . "/contacts/followers"]);
XML::addElement($doc, $author, "statusnet:profile_info", "", ["local_id" => $owner["uid"]]);
if ($profile["publish"]) {
@ -1980,7 +1977,7 @@ class OStatus
XML::addElement($doc, $entry, "content", $body, ["type" => "html"]);
XML::addElement($doc, $entry, "link", "", ["rel" => "alternate", "type" => "text/html",
"href" => System::baseUrl()."/display/".$item["guid"]]
"href" => DI::baseUrl()."/display/".$item["guid"]]
);
if (!$feed_mode && $complete && ($item["id"] > 0)) {
@ -2024,7 +2021,7 @@ class OStatus
} else {
$mentioned[$parent["author-link"]] = $parent["author-link"];
$mentioned[$parent["owner-link"]] = $parent["owner-link"];
$parent_plink = System::baseUrl()."/display/".$parent["guid"];
$parent_plink = DI::baseUrl()."/display/".$parent["guid"];
}
$attributes = [