Move Mastodon API entities to src/Object

This commit is contained in:
Hypolite Petovan 2020-01-27 20:01:32 -05:00
parent 74a25eb670
commit 0de8e4db08
13 changed files with 24 additions and 25 deletions

View file

@ -1,6 +1,6 @@
<?php
namespace Friendica\Api;
namespace Friendica;
/**
* The API entity classes are meant as data transfer objects. As such, their member should be protected.

View file

@ -24,7 +24,7 @@ class Account extends BaseFactory
/**
* @param int $contactId
* @param int $uid User Id
* @return \Friendica\Api\Entity\Mastodon\Account
* @return \Friendica\Object\Api\Mastodon\Account
* @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
@ -41,6 +41,6 @@ class Account extends BaseFactory
$apcontact = APContact::getByURL($publicContact['url'], false);
return new \Friendica\Api\Entity\Mastodon\Account($this->baseUrl, $publicContact, $apcontact, $userContact);
return new \Friendica\Object\Api\Mastodon\Account($this->baseUrl, $publicContact, $apcontact, $userContact);
}
}

View file

@ -24,7 +24,7 @@ class FollowRequest extends BaseFactory
/**
* @param Introduction $introduction
* @return \Friendica\Api\Entity\Mastodon\FollowRequest
* @return \Friendica\Object\Api\Mastodon\FollowRequest
* @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
@ -42,6 +42,6 @@ class FollowRequest extends BaseFactory
$apcontact = APContact::getByURL($publicContact['url'], false);
return new \Friendica\Api\Entity\Mastodon\FollowRequest($this->baseUrl, $introduction->id, $publicContact, $apcontact, $userContact);
return new \Friendica\Object\Api\Mastodon\FollowRequest($this->baseUrl, $introduction->id, $publicContact, $apcontact, $userContact);
}
}

View file

@ -2,7 +2,7 @@
namespace Friendica\Factory\Mastodon;
use Friendica\Api\Entity\Mastodon\Relationship as RelationshipEntity;
use Friendica\Object\Api\Mastodon\Relationship as RelationshipEntity;
use Friendica\BaseFactory;
use Friendica\Model\Contact;

View file

@ -2,8 +2,8 @@
namespace Friendica\Module\Api\Mastodon;
use Friendica\Api\Entity\Mastodon;
use Friendica\Api\Entity\Mastodon\Relationship;
use Friendica\Object\Api\Mastodon;
use Friendica\Object\Api\Mastodon\Relationship;
use Friendica\Core\System;
use Friendica\DI;
use Friendica\Model\Contact;

View file

@ -2,7 +2,7 @@
namespace Friendica\Module\Api\Mastodon;
use Friendica\Api\Entity\Mastodon\Instance as InstanceEntity;
use Friendica\Object\Api\Mastodon\Instance as InstanceEntity;
use Friendica\Core\System;
use Friendica\Module\Base\Api;

View file

@ -1,9 +1,9 @@
<?php
namespace Friendica\Api\Entity\Mastodon;
namespace Friendica\Object\Api\Mastodon;
use Friendica\Api\BaseEntity;
use Friendica\App\BaseURL;
use Friendica\BaseEntity;
use Friendica\Content\Text\BBCode;
use Friendica\Database\DBA;
use Friendica\Model\Contact;

View file

@ -1,8 +1,8 @@
<?php
namespace Friendica\Api\Entity\Mastodon;
namespace Friendica\Object\Api\Mastodon;
use Friendica\Api\BaseEntity;
use Friendica\BaseEntity;
/**
* Class Emoji
@ -13,9 +13,9 @@ class Emoji extends BaseEntity
{
/** @var string */
protected $shortcode;
/** @var string (URL)*/
/** @var string (URL) */
protected $static_url;
/** @var string (URL)*/
/** @var string (URL) */
protected $url;
/** @var bool */
protected $visible_in_picker;

View file

@ -1,8 +1,8 @@
<?php
namespace Friendica\Api\Entity\Mastodon;
namespace Friendica\Object\Api\Mastodon;
use Friendica\Api\BaseEntity;
use Friendica\BaseEntity;
/**
* Class Field

View file

@ -1,9 +1,8 @@
<?php
namespace Friendica\Api\Entity\Mastodon;
namespace Friendica\Object\Api\Mastodon;
use Friendica\App\BaseURL;
use Friendica\Model\Introduction;
/**
* Virtual entity to separate Accounts from Follow Requests.

View file

@ -1,8 +1,8 @@
<?php
namespace Friendica\Api\Entity\Mastodon;
namespace Friendica\Object\Api\Mastodon;
use Friendica\Api\BaseEntity;
use Friendica\BaseEntity;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\User;

View file

@ -1,8 +1,8 @@
<?php
namespace Friendica\Api\Entity\Mastodon;
namespace Friendica\Object\Api\Mastodon;
use Friendica\Api\BaseEntity;
use Friendica\BaseEntity;
use Friendica\Model\Contact;
use Friendica\Util\Network;

View file

@ -1,8 +1,8 @@
<?php
namespace Friendica\Api\Entity\Mastodon;
namespace Friendica\Object\Api\Mastodon;
use Friendica\Api\BaseEntity;
use Friendica\BaseEntity;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
use Friendica\DI;