forked from GNUsocial/gnu-social
[DOCUMENTATION][TOOL] Small bug fixes and docblock elaboration
This commit is contained in:
parent
87a768ac8d
commit
4efbf9361c
@ -45,8 +45,8 @@ Prerequisites
|
||||
-----
|
||||
|
||||
In order to host your GNU social instance, you'll need a domain, a
|
||||
server with a constant IP and `docker` and `docker-compose` installed
|
||||
on your system.
|
||||
server with a constant IP and both `docker` and `docker-compose`
|
||||
installed on your system.
|
||||
|
||||
Alternatively, for local hosting or development, behind a NAT, use a
|
||||
dynamic DNS solutions. I recommend you go to
|
||||
@ -59,7 +59,7 @@ With TLS/SSL
|
||||
----
|
||||
|
||||
Next, if you want to setup SSL (which you should in most cases,
|
||||
exceptions being wanting to use the Thor network), you'll need a
|
||||
exceptions being wanting to use the Tor network), you'll need a
|
||||
certificate. There are multiple approaches to achieve this, among
|
||||
which are using a proxy server capable of either proxying an HTTP
|
||||
connection to HTTPS or an HTTPS connection to HTTPS, or creating a
|
||||
|
@ -64,7 +64,7 @@ $license_header = '
|
||||
foreach ($classes as $cls) {
|
||||
$ref = new ReflectionClass($cls);
|
||||
|
||||
$class_name = Common::toCamelCase($cls);
|
||||
$class_name = Common::snakeCaseToCamelCase($cls);
|
||||
$file = $ref->getFileName();
|
||||
$class_comment = $ref->getDocComment();
|
||||
$table_name = $ref->getDefaultProperties()['__table'];
|
||||
|
@ -29,20 +29,20 @@ services:
|
||||
done &
|
||||
nginx -g "daemon off;"'
|
||||
|
||||
certbot:
|
||||
image: certbot/certbot
|
||||
depends_on:
|
||||
- nginx
|
||||
# Check for certificate renewal every 12h as
|
||||
# recomnended by Let's Encryot
|
||||
entrypoint: /bin/sh -c 'trap exit TERM;
|
||||
while :; do
|
||||
certbot renew > /dev/null;
|
||||
sleep 12h & wait $${!};
|
||||
done'
|
||||
volumes:
|
||||
- ./docker/certbot/www:/var/www/certbot
|
||||
- ./docker/certbot/files:/etc/letsencrypt
|
||||
#certbot:
|
||||
# image: certbot/certbot
|
||||
# depends_on:
|
||||
# - nginx
|
||||
# # Check for certificate renewal every 12h as
|
||||
# # recomnended by Let's Encryot
|
||||
# entrypoint: /bin/sh -c 'trap exit TERM;
|
||||
# while :; do
|
||||
# certbot renew > /dev/null;
|
||||
# sleep 12h & wait $${!};
|
||||
# done'
|
||||
# volumes:
|
||||
# - ./docker/certbot/www:/var/www/certbot
|
||||
# - ./docker/certbot/files:/etc/letsencrypt
|
||||
|
||||
php:
|
||||
build: docker/php
|
@ -9,6 +9,6 @@ class TestController extends AbstractController
|
||||
{
|
||||
public function __invoke()
|
||||
{
|
||||
return new Response('<div style="background: #333; text: #999"> Test controller </div>');
|
||||
return new Response('<div style="background: #333; text-color: #999"> Test controller </div>');
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@
|
||||
namespace App\Command;
|
||||
|
||||
use Functional as F;
|
||||
use ReflectionFunction;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
@ -72,7 +73,7 @@ class ListEventsCommand extends EventDispatcherDebugCommand
|
||||
foreach ($listeners as $event => $listener) {
|
||||
echo 'Event \'' . $event . "\\' handled by:\n";
|
||||
foreach ($listener as $c) {
|
||||
$r = new \ReflectionFunction($c);
|
||||
$r = new ReflectionFunction($c);
|
||||
echo ' ' . get_class($r->getStaticVariables()['handler'][0]) . "\n";
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Compiler pass which triggers Symgony to tell Doctrine to
|
||||
* Compiler pass which triggers Symfony to tell Doctrine to
|
||||
* use out `SchemaDef` metadata driver
|
||||
*
|
||||
* @package GNUsocial
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for attentions
|
||||
*
|
||||
@ -40,8 +42,8 @@ class Attention
|
||||
private int $notice_id;
|
||||
private int $profile_id;
|
||||
private ?string $reason;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setNoticeId(int $notice_id): self
|
||||
{
|
||||
@ -73,22 +75,22 @@ class Attention
|
||||
return $this->reason;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for user's avatar
|
||||
*
|
||||
@ -43,8 +45,8 @@ class Avatar
|
||||
private int $height;
|
||||
private string $mediatype;
|
||||
private ?string $filename;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setProfileId(int $profile_id): self
|
||||
{
|
||||
@ -106,22 +108,22 @@ class Avatar
|
||||
return $this->filename;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,7 +13,7 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for user's email confimation
|
||||
*
|
||||
@ -42,9 +44,9 @@ class ConfirmAddress
|
||||
private string $address;
|
||||
private ?string $address_extra;
|
||||
private string $address_type;
|
||||
private ?\DateTimeInterface $claimed;
|
||||
private ?\DateTimeInterface $sent;
|
||||
private \DateTimeInterface $modified;
|
||||
private ?DateTimeInterface $claimed;
|
||||
private ?DateTimeInterface $sent;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setCode(string $code): self
|
||||
{
|
||||
@ -96,32 +98,32 @@ class ConfirmAddress
|
||||
return $this->address_type;
|
||||
}
|
||||
|
||||
public function setClaimed(?\DateTimeInterface $claimed): self
|
||||
public function setClaimed(?DateTimeInterface $claimed): self
|
||||
{
|
||||
$this->claimed = $claimed;
|
||||
return $this;
|
||||
}
|
||||
public function getClaimed(): ?\DateTimeInterface
|
||||
public function getClaimed(): ?DateTimeInterface
|
||||
{
|
||||
return $this->claimed;
|
||||
}
|
||||
|
||||
public function setSent(?\DateTimeInterface $sent): self
|
||||
public function setSent(?DateTimeInterface $sent): self
|
||||
{
|
||||
$this->sent = $sent;
|
||||
return $this;
|
||||
}
|
||||
public function getSent(): ?\DateTimeInterface
|
||||
public function getSent(): ?DateTimeInterface
|
||||
{
|
||||
return $this->sent;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for OAuth consumer
|
||||
*
|
||||
@ -40,8 +42,8 @@ class Consumer
|
||||
private string $consumer_key;
|
||||
private string $consumer_secret;
|
||||
private string $seed;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setConsumerKey(string $consumer_key): self
|
||||
{
|
||||
@ -73,22 +75,22 @@ class Consumer
|
||||
return $this->seed;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Data class for Conversations
|
||||
*
|
||||
@ -38,8 +40,8 @@ class Conversation
|
||||
private int $id;
|
||||
private string $uri;
|
||||
private ?string $url;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
@ -71,22 +73,22 @@ class Conversation
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
@ -100,7 +102,7 @@ class Conversation
|
||||
'fields' => [
|
||||
'id' => ['type' => 'serial', 'not null' => true, 'description' => 'Unique identifier, (again) unrelated to notice id since 2016-01-06'],
|
||||
'uri' => ['type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'URI of the conversation'],
|
||||
'url' => ['type' => 'varchar', 'length' => 191, 'description' => 'Resolvable URL, preferrably remote (local can be generated on the fly)'],
|
||||
'url' => ['type' => 'varchar', 'length' => 191, 'description' => 'Resolvable URL, preferably remote (local can be generated on the fly)'],
|
||||
'created' => ['type' => 'datetime', 'not null' => true, 'default' => '0000-00-00 00:00:00', 'description' => 'date this record was created'],
|
||||
'modified' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'],
|
||||
],
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for uploaded files
|
||||
*
|
||||
@ -49,7 +51,7 @@ class File
|
||||
private ?string $filename;
|
||||
private ?int $width;
|
||||
private ?int $height;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
@ -171,12 +173,12 @@ class File
|
||||
return $this->height;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for File redirects
|
||||
*
|
||||
@ -42,7 +44,7 @@ class FileRedirection
|
||||
private ?int $file_id;
|
||||
private ?int $redirections;
|
||||
private ?int $httpcode;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setUrlhash(string $urlhash): self
|
||||
{
|
||||
@ -94,12 +96,12 @@ class FileRedirection
|
||||
return $this->httpcode;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for File thumbnails
|
||||
*
|
||||
@ -43,7 +45,7 @@ class FileThumbnail
|
||||
private ?string $filename;
|
||||
private int $width;
|
||||
private int $height;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setFileId(int $file_id): self
|
||||
{
|
||||
@ -105,12 +107,12 @@ class FileThumbnail
|
||||
return $this->height;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for relating a file to a post
|
||||
*
|
||||
@ -39,7 +41,7 @@ class FileToPost
|
||||
|
||||
private int $file_id;
|
||||
private int $post_id;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setFileId(int $file_id): self
|
||||
{
|
||||
@ -61,12 +63,12 @@ class FileToPost
|
||||
return $this->post_id;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for user's foreign profile
|
||||
*
|
||||
@ -44,10 +46,10 @@ class ForeignLink
|
||||
private int $noticesync;
|
||||
private int $friendsync;
|
||||
private int $profilesync;
|
||||
private ?\DateTimeInterface $last_noticesync;
|
||||
private ?\DateTimeInterface $last_friendsync;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private ?DateTimeInterface $last_noticesync;
|
||||
private ?DateTimeInterface $last_friendsync;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setUserId(int $user_id): self
|
||||
{
|
||||
@ -119,42 +121,42 @@ class ForeignLink
|
||||
return $this->profilesync;
|
||||
}
|
||||
|
||||
public function setLastNoticesync(?\DateTimeInterface $last_noticesync): self
|
||||
public function setLastNoticesync(?DateTimeInterface $last_noticesync): self
|
||||
{
|
||||
$this->last_noticesync = $last_noticesync;
|
||||
return $this;
|
||||
}
|
||||
public function getLastNoticesync(): ?\DateTimeInterface
|
||||
public function getLastNoticesync(): ?DateTimeInterface
|
||||
{
|
||||
return $this->last_noticesync;
|
||||
}
|
||||
|
||||
public function setLastFriendsync(?\DateTimeInterface $last_friendsync): self
|
||||
public function setLastFriendsync(?DateTimeInterface $last_friendsync): self
|
||||
{
|
||||
$this->last_friendsync = $last_friendsync;
|
||||
return $this;
|
||||
}
|
||||
public function getLastFriendsync(): ?\DateTimeInterface
|
||||
public function getLastFriendsync(): ?DateTimeInterface
|
||||
{
|
||||
return $this->last_friendsync;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for foreign services
|
||||
*
|
||||
@ -40,8 +42,8 @@ class ForeignService
|
||||
private int $id;
|
||||
private string $name;
|
||||
private ?string $description;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
@ -73,22 +75,22 @@ class ForeignService
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for user's foreign subscriptions
|
||||
*
|
||||
@ -40,7 +42,7 @@ class ForeignSubscription
|
||||
private int $service;
|
||||
private int $subscriber;
|
||||
private int $subscribed;
|
||||
private \DateTimeInterface $created;
|
||||
private DateTimeInterface $created;
|
||||
|
||||
public function setService(int $service): self
|
||||
{
|
||||
@ -72,12 +74,12 @@ class ForeignSubscription
|
||||
return $this->subscribed;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Foreign Users
|
||||
*
|
||||
@ -41,8 +43,8 @@ class ForeignUser
|
||||
private int $service;
|
||||
private string $uri;
|
||||
private ?string $nickname;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
@ -84,22 +86,22 @@ class ForeignUser
|
||||
return $this->nickname;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Group Alias
|
||||
*
|
||||
@ -39,7 +41,7 @@ class GroupAlias
|
||||
|
||||
private string $alias;
|
||||
private int $group_id;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setAlias(string $alias): self
|
||||
{
|
||||
@ -61,12 +63,12 @@ class GroupAlias
|
||||
return $this->group_id;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Group Block
|
||||
*
|
||||
@ -40,7 +42,7 @@ class GroupBlock
|
||||
private int $group_id;
|
||||
private int $blocked;
|
||||
private int $blocker;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setGroupId(int $group_id): self
|
||||
{
|
||||
@ -72,12 +74,12 @@ class GroupBlock
|
||||
return $this->blocker;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Group's inbox
|
||||
*
|
||||
@ -39,7 +41,7 @@ class GroupInbox
|
||||
|
||||
private int $group_id;
|
||||
private int $notice_id;
|
||||
private \DateTimeInterface $created;
|
||||
private DateTimeInterface $created;
|
||||
|
||||
public function setGroupId(int $group_id): self
|
||||
{
|
||||
@ -61,12 +63,12 @@ class GroupInbox
|
||||
return $this->notice_id;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Queue on joining a group
|
||||
*
|
||||
@ -39,7 +41,7 @@ class GroupJoinQueue
|
||||
|
||||
private int $profile_id;
|
||||
private int $group_id;
|
||||
private \DateTimeInterface $created;
|
||||
private DateTimeInterface $created;
|
||||
|
||||
public function setProfileId(int $profile_id): self
|
||||
{
|
||||
@ -61,12 +63,12 @@ class GroupJoinQueue
|
||||
return $this->group_id;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for a Group Member
|
||||
*
|
||||
@ -41,8 +43,8 @@ class GroupMember
|
||||
private int $profile_id;
|
||||
private ?bool $is_admin;
|
||||
private ?string $uri;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setGroupId(int $group_id): self
|
||||
{
|
||||
@ -84,22 +86,22 @@ class GroupMember
|
||||
return $this->uri;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for user invitations
|
||||
*
|
||||
@ -41,7 +43,7 @@ class Invitation
|
||||
private int $user_id;
|
||||
private string $address;
|
||||
private string $address_type;
|
||||
private \DateTimeInterface $created;
|
||||
private DateTimeInterface $created;
|
||||
private ?int $registered_user_id;
|
||||
|
||||
public function setCode(string $code): self
|
||||
@ -84,12 +86,12 @@ class Invitation
|
||||
return $this->address_type;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for local groups
|
||||
*
|
||||
@ -39,8 +41,8 @@ class LocalGroup
|
||||
|
||||
private int $group_id;
|
||||
private ?string $nickname;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setGroupId(int $group_id): self
|
||||
{
|
||||
@ -62,22 +64,22 @@ class LocalGroup
|
||||
return $this->nickname;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for location namespace
|
||||
*
|
||||
@ -39,8 +41,8 @@ class LocationNamespace
|
||||
|
||||
private int $id;
|
||||
private ?string $description;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
@ -62,22 +64,22 @@ class LocationNamespace
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Login tokens
|
||||
*
|
||||
@ -39,8 +41,8 @@ class LoginToken
|
||||
|
||||
private int $user_id;
|
||||
private string $token;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setUserId(int $user_id): self
|
||||
{
|
||||
@ -62,22 +64,22 @@ class LoginToken
|
||||
return $this->token;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for nonce
|
||||
*
|
||||
@ -40,9 +42,9 @@ class Nonce
|
||||
private string $consumer_key;
|
||||
private ?string $tok;
|
||||
private string $nonce;
|
||||
private \DateTimeInterface $ts;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $ts;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setConsumerKey(string $consumer_key): self
|
||||
{
|
||||
@ -74,32 +76,32 @@ class Nonce
|
||||
return $this->nonce;
|
||||
}
|
||||
|
||||
public function setTs(\DateTimeInterface $ts): self
|
||||
public function setTs(DateTimeInterface $ts): self
|
||||
{
|
||||
$this->ts = $ts;
|
||||
return $this;
|
||||
}
|
||||
public function getTs(): \DateTimeInterface
|
||||
public function getTs(): DateTimeInterface
|
||||
{
|
||||
return $this->ts;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for notices
|
||||
*
|
||||
@ -43,8 +45,8 @@ class Notice
|
||||
private ?string $content;
|
||||
private ?string $rendered;
|
||||
private ?string $url;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
private ?int $reply_to;
|
||||
private ?int $is_local;
|
||||
private ?string $source;
|
||||
@ -114,22 +116,22 @@ class Notice
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
@ -258,7 +260,7 @@ class Notice
|
||||
'notice_object_type_idx' => ['object_type'],
|
||||
'notice_verb_idx' => ['verb'],
|
||||
'notice_profile_id_verb_idx' => ['profile_id', 'verb'],
|
||||
'notice_url_idx' => ['url'], // Qvitter wants this
|
||||
'notice_url_idx' => ['url'],
|
||||
'notice_replyto_idx' => ['reply_to'],
|
||||
],
|
||||
];
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Notice's location
|
||||
*
|
||||
@ -42,7 +44,7 @@ class NoticeLocation
|
||||
private ?float $lon;
|
||||
private ?int $location_id;
|
||||
private ?int $location_ns;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setNoticeId(int $notice_id): self
|
||||
{
|
||||
@ -94,12 +96,12 @@ class NoticeLocation
|
||||
return $this->location_ns;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Notice preferences
|
||||
*
|
||||
@ -43,8 +45,8 @@ class NoticePrefs
|
||||
private string $namespace;
|
||||
private string $topic;
|
||||
private $data;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setNoticeId(int $notice_id): self
|
||||
{
|
||||
@ -86,22 +88,22 @@ class NoticePrefs
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Notices sources
|
||||
*
|
||||
@ -41,8 +43,8 @@ class NoticeSource
|
||||
private string $name;
|
||||
private string $url;
|
||||
private int $notice_id;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setCode(string $code): self
|
||||
{
|
||||
@ -84,22 +86,22 @@ class NoticeSource
|
||||
return $this->notice_id;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Notice Tag
|
||||
*
|
||||
@ -39,7 +41,7 @@ class NoticeTag
|
||||
|
||||
private string $tag;
|
||||
private int $notice_id;
|
||||
private \DateTimeInterface $created;
|
||||
private DateTimeInterface $created;
|
||||
|
||||
public function setTag(string $tag): self
|
||||
{
|
||||
@ -61,12 +63,12 @@ class NoticeTag
|
||||
return $this->notice_id;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for OAuth Application
|
||||
*
|
||||
@ -49,8 +51,8 @@ class OauthApplication
|
||||
private ?string $callback_url;
|
||||
private ?int $type;
|
||||
private ?int $access_type;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
@ -172,22 +174,22 @@ class OauthApplication
|
||||
return $this->access_type;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for OAuth Application User
|
||||
*
|
||||
@ -41,8 +43,8 @@ class OauthApplicationUser
|
||||
private int $application_id;
|
||||
private ?int $access_type;
|
||||
private ?string $token;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setProfileId(int $profile_id): self
|
||||
{
|
||||
@ -84,22 +86,22 @@ class OauthApplicationUser
|
||||
return $this->token;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for association between OAuth and internal token
|
||||
*
|
||||
@ -40,8 +42,8 @@ class OauthTokenAssociation
|
||||
private int $profile_id;
|
||||
private int $application_id;
|
||||
private string $token;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setProfileId(int $profile_id): self
|
||||
{
|
||||
@ -73,22 +75,22 @@ class OauthTokenAssociation
|
||||
return $this->token;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Separate table for storing UI preferences
|
||||
*
|
||||
@ -41,8 +43,8 @@ class OldSchoolPrefs
|
||||
private ?bool $stream_mode_only;
|
||||
private ?bool $conversation_tree;
|
||||
private ?bool $stream_nicknames;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setUserId(int $user_id): self
|
||||
{
|
||||
@ -84,22 +86,22 @@ class OldSchoolPrefs
|
||||
return $this->stream_nicknames;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for user profiles
|
||||
*
|
||||
@ -48,8 +50,8 @@ class Profile
|
||||
private ?float $lon;
|
||||
private ?int $location_id;
|
||||
private ?int $location_ns;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
@ -161,22 +163,22 @@ class Profile
|
||||
return $this->location_ns;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for User's Profile Block
|
||||
*
|
||||
@ -39,7 +41,7 @@ class ProfileBlock
|
||||
|
||||
private int $blocker;
|
||||
private int $blocked;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setBlocker(int $blocker): self
|
||||
{
|
||||
@ -61,12 +63,12 @@ class ProfileBlock
|
||||
return $this->blocked;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for List of profiles
|
||||
*
|
||||
@ -42,8 +44,8 @@ class ProfileList
|
||||
private string $tag;
|
||||
private ?string $description;
|
||||
private ?bool $private;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
private ?string $uri;
|
||||
private ?string $mainpage;
|
||||
private ?int $tagged_count;
|
||||
@ -99,22 +101,22 @@ class ProfileList
|
||||
return $this->private;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Data class for Profile preferences
|
||||
*
|
||||
@ -41,8 +43,8 @@ class ProfilePrefs
|
||||
private string $namespace;
|
||||
private string $topic;
|
||||
private $data;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setProfileId(int $profile_id): self
|
||||
{
|
||||
@ -84,22 +86,22 @@ class ProfilePrefs
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for user profile role
|
||||
*
|
||||
@ -39,7 +41,7 @@ class ProfileRole
|
||||
|
||||
private int $profile_id;
|
||||
private string $role;
|
||||
private \DateTimeInterface $created;
|
||||
private DateTimeInterface $created;
|
||||
|
||||
public function setProfileId(int $profile_id): self
|
||||
{
|
||||
@ -61,12 +63,12 @@ class ProfileRole
|
||||
return $this->role;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Profile Tag
|
||||
*
|
||||
@ -40,7 +42,7 @@ class ProfileTag
|
||||
private int $tagger;
|
||||
private int $tagged;
|
||||
private string $tag;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setTagger(int $tagger): self
|
||||
{
|
||||
@ -72,12 +74,12 @@ class ProfileTag
|
||||
return $this->tag;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Profile Tag Subscription
|
||||
*
|
||||
@ -39,8 +41,8 @@ class ProfileTagSubscription
|
||||
|
||||
private int $profile_tag_id;
|
||||
private int $profile_id;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setProfileTagId(int $profile_tag_id): self
|
||||
{
|
||||
@ -62,22 +64,22 @@ class ProfileTagSubscription
|
||||
return $this->profile_id;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for a Queue Item
|
||||
*
|
||||
@ -40,8 +42,8 @@ class QueueItem
|
||||
private int $id;
|
||||
private $frame;
|
||||
private string $transport;
|
||||
private \DateTimeInterface $created;
|
||||
private ?\DateTimeInterface $claimed;
|
||||
private DateTimeInterface $created;
|
||||
private ?DateTimeInterface $claimed;
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
@ -73,22 +75,22 @@ class QueueItem
|
||||
return $this->transport;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setClaimed(?\DateTimeInterface $claimed): self
|
||||
public function setClaimed(?DateTimeInterface $claimed): self
|
||||
{
|
||||
$this->claimed = $claimed;
|
||||
return $this;
|
||||
}
|
||||
public function getClaimed(): ?\DateTimeInterface
|
||||
public function getClaimed(): ?DateTimeInterface
|
||||
{
|
||||
return $this->claimed;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for related groups
|
||||
*
|
||||
@ -39,7 +41,7 @@ class RelatedGroup
|
||||
|
||||
private int $group_id;
|
||||
private int $related_group_id;
|
||||
private \DateTimeInterface $created;
|
||||
private DateTimeInterface $created;
|
||||
|
||||
public function setGroupId(int $group_id): self
|
||||
{
|
||||
@ -61,12 +63,12 @@ class RelatedGroup
|
||||
return $this->related_group_id;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for user remember me
|
||||
*
|
||||
@ -39,7 +41,7 @@ class RememberMe
|
||||
|
||||
private string $code;
|
||||
private int $user_id;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setCode(string $code): self
|
||||
{
|
||||
@ -61,12 +63,12 @@ class RememberMe
|
||||
return $this->user_id;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Notice reply
|
||||
*
|
||||
@ -39,7 +41,7 @@ class Reply
|
||||
|
||||
private int $notice_id;
|
||||
private int $profile_id;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
private ?int $replied_id;
|
||||
|
||||
public function setNoticeId(int $notice_id): self
|
||||
@ -62,12 +64,12 @@ class Reply
|
||||
return $this->profile_id;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for the Schema Version
|
||||
*
|
||||
@ -39,7 +41,7 @@ class SchemaVersion
|
||||
|
||||
private string $table_name;
|
||||
private string $checksum;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setTableName(string $table_name): self
|
||||
{
|
||||
@ -61,12 +63,12 @@ class SchemaVersion
|
||||
return $this->checksum;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Superclass representing a saved session as it exists in the database.
|
||||
*
|
||||
@ -41,8 +43,8 @@ class Session
|
||||
|
||||
private string $id;
|
||||
private ?string $session_data;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setId(string $id): self
|
||||
{
|
||||
@ -64,22 +66,22 @@ class Session
|
||||
return $this->session_data;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for SMS carriers
|
||||
*
|
||||
@ -40,8 +42,8 @@ class SmsCarrier
|
||||
private int $id;
|
||||
private ?string $name;
|
||||
private string $email_pattern;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
@ -73,22 +75,22 @@ class SmsCarrier
|
||||
return $this->email_pattern;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for subscription
|
||||
*
|
||||
@ -45,8 +47,8 @@ class Subscription
|
||||
private ?string $token;
|
||||
private ?string $secret;
|
||||
private ?string $uri;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setSubscriber(int $subscriber): self
|
||||
{
|
||||
@ -118,22 +120,22 @@ class Subscription
|
||||
return $this->uri;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for Subscription queue
|
||||
*
|
||||
@ -39,7 +41,7 @@ class SubscriptionQueue
|
||||
|
||||
private int $subscriber;
|
||||
private int $subscribed;
|
||||
private \DateTimeInterface $created;
|
||||
private DateTimeInterface $created;
|
||||
|
||||
public function setSubscriber(int $subscriber): self
|
||||
{
|
||||
@ -61,12 +63,12 @@ class SubscriptionQueue
|
||||
return $this->subscribed;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for User token
|
||||
*
|
||||
@ -44,8 +46,8 @@ class Token
|
||||
private ?int $state;
|
||||
private ?string $verifier;
|
||||
private ?string $verified_callback;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setConsumerKey(string $consumer_key): self
|
||||
{
|
||||
@ -117,22 +119,22 @@ class Token
|
||||
return $this->verified_callback;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity that Keeps a list of unavailable status network names
|
||||
*
|
||||
@ -38,7 +40,7 @@ class UnavailableStatusNetwork
|
||||
// {{{ Autocode
|
||||
|
||||
private string $nickname;
|
||||
private \DateTimeInterface $created;
|
||||
private DateTimeInterface $created;
|
||||
|
||||
public function setNickname(string $nickname): self
|
||||
{
|
||||
@ -50,12 +52,12 @@ class UnavailableStatusNetwork
|
||||
return $this->nickname;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for users
|
||||
*
|
||||
@ -60,8 +62,8 @@ class User
|
||||
private ?int $subscribe_policy;
|
||||
private ?string $urlshorteningservice;
|
||||
private ?bool $private_stream;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
@ -293,22 +295,22 @@ class User
|
||||
return $this->private_stream;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for groups a user is in
|
||||
*
|
||||
@ -48,8 +50,8 @@ class UserGroup
|
||||
private ?string $homepage_logo;
|
||||
private ?string $stream_logo;
|
||||
private ?string $mini_logo;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
private ?string $uri;
|
||||
private ?string $mainpage;
|
||||
private ?int $join_policy;
|
||||
@ -165,22 +167,22 @@ class UserGroup
|
||||
return $this->mini_logo;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for user IM preferences
|
||||
*
|
||||
@ -41,8 +43,8 @@ class UserImPrefs
|
||||
private bool $notify;
|
||||
private bool $replies;
|
||||
private bool $updatefrompresence;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setUserId(int $user_id): self
|
||||
{
|
||||
@ -104,22 +106,22 @@ class UserImPrefs
|
||||
return $this->updatefrompresence;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for user location preferences
|
||||
*
|
||||
@ -37,8 +39,8 @@ class UserLocationPrefs
|
||||
|
||||
private int $user_id;
|
||||
private ?bool $share_location;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setUserId(int $user_id): self
|
||||
{
|
||||
@ -60,22 +62,22 @@ class UserLocationPrefs
|
||||
return $this->share_location;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for user's url shortener preferences
|
||||
*
|
||||
@ -41,8 +43,8 @@ class UserUrlshortenerPrefs
|
||||
private ?string $urlshorteningservice;
|
||||
private int $maxurllength;
|
||||
private int $maxnoticelength;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setUserId(int $user_id): self
|
||||
{
|
||||
@ -84,22 +86,22 @@ class UserUrlshortenerPrefs
|
||||
return $this->maxnoticelength;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -13,12 +13,14 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Entity for association between user and username
|
||||
*
|
||||
@ -40,8 +42,8 @@ class UserUsername
|
||||
private string $provider_name;
|
||||
private string $username;
|
||||
private int $user_id;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
private DateTimeInterface $created;
|
||||
private DateTimeInterface $modified;
|
||||
|
||||
public function setProviderName(string $provider_name): self
|
||||
{
|
||||
@ -73,22 +75,22 @@ class UserUsername
|
||||
return $this->user_id;
|
||||
}
|
||||
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
public function setCreated(DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): \DateTimeInterface
|
||||
public function getCreated(): DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
public function setModified(DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): \DateTimeInterface
|
||||
public function getModified(): DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
@ -115,6 +115,6 @@ class Kernel extends BaseKernel
|
||||
{
|
||||
parent::build($container);
|
||||
|
||||
$container->addCompilerPass(new SchemaDefPass($container));
|
||||
$container->addCompilerPass(new SchemaDefPass());
|
||||
}
|
||||
}
|
||||
|
@ -30,12 +30,13 @@
|
||||
|
||||
namespace App\Routes;
|
||||
|
||||
use App\Controller\NetworkPublic;
|
||||
use App\Util\RouteLoader;
|
||||
|
||||
abstract class Main
|
||||
{
|
||||
public static function load(RouteLoader $r): void
|
||||
{
|
||||
$r->connect('main_all', '/main/all', \App\Controller\NetworkPublic::class);
|
||||
$r->connect('main_all', '/main/all', NetworkPublic::class);
|
||||
}
|
||||
}
|
||||
|
@ -31,20 +31,33 @@
|
||||
namespace App\Util;
|
||||
|
||||
use Functional as F;
|
||||
use InvalidArgumentException;
|
||||
use Symfony\Component\Config\Definition\Exception\Exception;
|
||||
use const DIRECTORY_SEPARATOR;
|
||||
|
||||
abstract class Common
|
||||
{
|
||||
/**
|
||||
* Access sysadmin's configuration preferences for GNU social
|
||||
*
|
||||
* @param string $section
|
||||
* @param string $field
|
||||
* @return mixed
|
||||
*/
|
||||
public static function config(string $section, string $field)
|
||||
{
|
||||
// TODO: implement it x)
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize path by converting \ to /
|
||||
* @param string $path
|
||||
* @return string
|
||||
*/
|
||||
public static function normalizePath(string $path): string
|
||||
{
|
||||
if (\DIRECTORY_SEPARATOR !== '/') {
|
||||
if (DIRECTORY_SEPARATOR !== '/') {
|
||||
$path = strtr($path, DIRECTORY_SEPARATOR, '/');
|
||||
}
|
||||
return $path;
|
||||
@ -52,6 +65,8 @@ abstract class Common
|
||||
|
||||
/**
|
||||
* Get plugin name from it's path, or null if not a plugin
|
||||
* @param string $path
|
||||
* @return string|null
|
||||
*/
|
||||
public static function pluginFromPath(string $path): ?string
|
||||
{
|
||||
@ -75,6 +90,8 @@ abstract class Common
|
||||
* Check whether $haystack starts with $needle
|
||||
*
|
||||
* @param array|string $haystack if array, check that all strings start with $needle
|
||||
* @param string $needle
|
||||
* @return bool
|
||||
*/
|
||||
public static function startsWith($haystack, string $needle): bool
|
||||
{
|
||||
@ -92,6 +109,8 @@ abstract class Common
|
||||
* Check whether $haystack ends with $needle
|
||||
*
|
||||
* @param array|string $haystack if array, check that all strings end with $needle
|
||||
* @param string $needle
|
||||
* @return bool
|
||||
*/
|
||||
public static function endsWith($haystack, string $needle)
|
||||
{
|
||||
@ -111,6 +130,9 @@ abstract class Common
|
||||
/**
|
||||
* Call $func with only abs($count) arguments, taken either from the
|
||||
* left or right depending on the sign
|
||||
* @param callable $func
|
||||
* @param int $count
|
||||
* @return callable
|
||||
*/
|
||||
public static function arity(callable $func, int $count): callable
|
||||
{
|
||||
@ -122,12 +144,20 @@ abstract class Common
|
||||
};
|
||||
}
|
||||
|
||||
public static function toSnakeCase(string $str): string
|
||||
/**
|
||||
* @param string $str
|
||||
* @return string
|
||||
*/
|
||||
public static function camelCaseToSnakeCase(string $str): string
|
||||
{
|
||||
return strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $str));
|
||||
}
|
||||
|
||||
public static function toCamelCase(string $str): string
|
||||
/**
|
||||
* @param string $str
|
||||
* @return string
|
||||
*/
|
||||
public static function snakeCaseToCamelCase(string $str): string
|
||||
{
|
||||
return implode('', F\map(preg_split('/[\b_]/', $str), self::arity('ucfirst', 1)));
|
||||
}
|
||||
@ -136,6 +166,9 @@ abstract class Common
|
||||
* Indent $in, a string or array, $level levels
|
||||
*
|
||||
* @param array|string $in
|
||||
* @param int $level
|
||||
* @param int $count
|
||||
* @return string
|
||||
*/
|
||||
public static function indent($in, int $level = 1, int $count = 2): string
|
||||
{
|
||||
@ -149,5 +182,6 @@ abstract class Common
|
||||
return F\concat($indent . $val);
|
||||
}));
|
||||
}
|
||||
throw new InvalidArgumentException('Common:indent first parameter must be either an array or a string. Input was: '.$in);
|
||||
}
|
||||
}
|
||||
|
@ -57,6 +57,9 @@ class GNUsocial implements EventSubscriberInterface
|
||||
|
||||
/**
|
||||
* Symfony dependency injection gives us access to these services
|
||||
* @param ContainerInterface $container
|
||||
* @param LoggerInterface $logger
|
||||
* @param TranslatorInterface $translator
|
||||
*/
|
||||
public function __construct(ContainerInterface $container,
|
||||
LoggerInterface $logger,
|
||||
@ -69,6 +72,7 @@ class GNUsocial implements EventSubscriberInterface
|
||||
|
||||
/**
|
||||
* Store these services to be accessed statically and load modules
|
||||
* @param EventDispatcherInterface $event_dispatcher
|
||||
*/
|
||||
public function register(EventDispatcherInterface $event_dispatcher): void
|
||||
{
|
||||
@ -81,6 +85,10 @@ class GNUsocial implements EventSubscriberInterface
|
||||
/**
|
||||
* Event very early on in the Symfony HTTP lifecycle, but after everyting is registered
|
||||
* where we get access to the event dispatcher
|
||||
* @param RequestEvent $event
|
||||
* @param string $event_name
|
||||
* @param EventDispatcherInterface $event_dispatcher
|
||||
* @return RequestEvent
|
||||
*/
|
||||
public function onKernelRequest(RequestEvent $event,
|
||||
string $event_name,
|
||||
@ -92,6 +100,10 @@ class GNUsocial implements EventSubscriberInterface
|
||||
|
||||
/**
|
||||
* Event after everything is initialized when using the `bin/console` command
|
||||
* @param ConsoleCommandEvent $event
|
||||
* @param string $event_name
|
||||
* @param EventDispatcherInterface $event_dispatcher
|
||||
* @return ConsoleCommandEvent
|
||||
*/
|
||||
public function onCommand(ConsoleCommandEvent $event,
|
||||
string $event_name,
|
||||
|
@ -69,10 +69,11 @@ abstract class GSEvent
|
||||
* Handlers can also abort processing by throwing an exception; these will
|
||||
* be caught by the closest code and displayed as errors.
|
||||
*
|
||||
* @param string $name Name of the event
|
||||
* @param callable $handler Code to run
|
||||
* @param int $priority Higher runs first
|
||||
* @param string $name Name of the event
|
||||
* @param callable $handler Code to run
|
||||
* @param int $priority Higher runs first
|
||||
*
|
||||
* @param string $ns
|
||||
* @return void
|
||||
*/
|
||||
public static function addHandler(string $name,
|
||||
@ -139,7 +140,7 @@ abstract class GSEvent
|
||||
$listeners = self::$dispatcher->getListeners($name);
|
||||
if (isset($plugin)) {
|
||||
foreach ($listeners as $handler) {
|
||||
if (\get_class($handler[0]) == $plugin) {
|
||||
if (get_class($handler[0]) == $plugin) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
// This file is part of GNU social - https://www.gnu.org/software/soci
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as publ
|
||||
// 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.
|
||||
//
|
||||
@ -12,7 +12,7 @@
|
||||
// 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 Affero General Public Li
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
// }}}
|
||||
|
||||
@ -32,7 +32,10 @@ abstract class HTML
|
||||
/**
|
||||
* Creates an HTML tag without attributes
|
||||
*
|
||||
* @param string $tag
|
||||
* @param array|string $content
|
||||
* @param bool $empty_tag
|
||||
* @return array
|
||||
*/
|
||||
private static function tag(string $tag, $content = '', bool $empty_tag = false): array
|
||||
{
|
||||
@ -42,8 +45,11 @@ abstract class HTML
|
||||
/**
|
||||
* Create tag, possibly with attributes and indentation
|
||||
*
|
||||
* @param array|string $attrs - element attributes
|
||||
* @param string $tag
|
||||
* @param array|string $attrs - element attributes
|
||||
* @param array|string $content - what goes inside the tag
|
||||
* @param bool $empty_tag
|
||||
* @return array
|
||||
*/
|
||||
private static function attr_tag(string $tag, $attrs, $content = '', bool $empty_tag = false): array
|
||||
{
|
||||
@ -59,13 +65,18 @@ abstract class HTML
|
||||
/**
|
||||
* Attribute with given optional value
|
||||
*
|
||||
* @param array $attr
|
||||
* @param array $attrs
|
||||
* @return string
|
||||
*/
|
||||
private static function attr(array $attrs): string
|
||||
{
|
||||
return ' ' . implode(' ', F\map($attrs, function ($val, $key, $_) { return "{$key} = '{$val}'"; }));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $html
|
||||
* @return string
|
||||
*/
|
||||
public static function html($html): string
|
||||
{
|
||||
if (is_string($html)) {
|
||||
|
@ -46,11 +46,12 @@ $LC_CATEGORIES = [
|
||||
'LC_ALL',
|
||||
];
|
||||
foreach ($LC_CATEGORIES as $key => $name) {
|
||||
if (!\defined($name)) {
|
||||
if (!defined($name)) {
|
||||
define($name, $key);
|
||||
}
|
||||
}
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
abstract class I18n
|
||||
@ -105,21 +106,21 @@ abstract class I18n
|
||||
*
|
||||
* _m($msg) -- simple message
|
||||
* _m($ctx, $msg) -- message with context
|
||||
* _m($msg1, $msg2, $n) -- message that cann be singular or plural
|
||||
* _m($msg1, $msg2, $n) -- message that can be singular or plural
|
||||
* _m($ctx, $msg1, $msg2, $n) -- combination of the previous two
|
||||
*
|
||||
* @param string $msg
|
||||
* @param extra params as described above
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function _m(string $msg /*, ...*/): string
|
||||
{
|
||||
$domain = I18n::_mdomain(\debug_backtrace());
|
||||
$domain = I18n::_mdomain(debug_backtrace());
|
||||
$args = func_get_args();
|
||||
switch (\count($args)) {
|
||||
switch (count($args)) {
|
||||
case 1:
|
||||
// Empty parameters
|
||||
return I18n::$translator->trans($msg, [], $domain);
|
||||
@ -143,7 +144,7 @@ function _m(string $msg /*, ...*/): string
|
||||
return I18n::$translator->trans($context . '\004' . $msg_single . '|' . $msg_plural,
|
||||
['%d' => $n], $domain);
|
||||
default:
|
||||
throw new Exception('Bad parameter count to _m()');
|
||||
throw new InvalidArgumentException('Bad parameter count to _m()');
|
||||
}
|
||||
}
|
||||
|
||||
@ -191,7 +192,7 @@ function client_preferred_language(string $http_accept_lang_header): string
|
||||
function get_nice_language_list(): array
|
||||
{
|
||||
$nice_lang = [];
|
||||
$all_languages = common_config('site', 'languages');
|
||||
$all_languages = Common::config('site', 'languages');
|
||||
|
||||
foreach ($all_languages as $lang) {
|
||||
$nice_lang[$lang['lang']] = $lang['name'];
|
||||
@ -202,17 +203,18 @@ function get_nice_language_list(): array
|
||||
/**
|
||||
* Check whether a language is right-to-left
|
||||
*
|
||||
* @param string $lang language code of the language to check
|
||||
* @param string $lang_value language code of the language to check
|
||||
*
|
||||
* @return bool true if language is rtl
|
||||
*/
|
||||
function is_rtl(string $lang_value): bool
|
||||
{
|
||||
foreach (common_config('site', 'languages') as $code => $info) {
|
||||
foreach (Common::config('site', 'languages') as $code => $info) {
|
||||
if ($lang_value == $info['lang']) {
|
||||
return $info['direction'] == 'rtl';
|
||||
}
|
||||
}
|
||||
throw new InvalidArgumentException('is_rtl function received an invalid lang to test. Lang was: '.$lang_value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,44 +44,66 @@ class Log
|
||||
|
||||
/**
|
||||
* Simple static wrappers around Monolog's functions
|
||||
* @param string $msg
|
||||
*/
|
||||
public static function emergency(string $msg): void
|
||||
{
|
||||
self::$logger->emergency($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
*/
|
||||
public static function alert(string $msg): void
|
||||
{
|
||||
self::$logger->alert($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
*/
|
||||
public static function critical(string $msg): void
|
||||
{
|
||||
self::$logger->critical($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
*/
|
||||
public static function error(string $msg): void
|
||||
{
|
||||
self::$logger->error($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
*/
|
||||
public static function warning(string $msg): void
|
||||
{
|
||||
self::$logger->warning($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
*/
|
||||
public static function notice(string $msg): void
|
||||
{
|
||||
self::$logger->notice($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
*/
|
||||
public static function info(string $msg): void
|
||||
{
|
||||
self::$logger->info($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
*/
|
||||
public static function debug(string $msg): void
|
||||
{
|
||||
$logger->debug($msg);
|
||||
self::$logger->debug($msg);
|
||||
}
|
||||
}
|
||||
|
@ -43,10 +43,12 @@ class RouteLoader extends Loader
|
||||
/**
|
||||
* Route loading entry point, called from `config/routes.php`
|
||||
*
|
||||
* Must comform to symfony's interface, but the $resource is unused
|
||||
* Must conform to symfony's interface, but the $resource is unused
|
||||
* and $type must not be null
|
||||
*
|
||||
* @param mixed $resource
|
||||
* @param string|null $type
|
||||
* @return RouteCollection
|
||||
*/
|
||||
public function load($resource, string $type = null): RouteCollection
|
||||
{
|
||||
@ -65,8 +67,11 @@ class RouteLoader extends Loader
|
||||
/**
|
||||
* Connect a route to a controller
|
||||
*
|
||||
* @param mixed $target Some kind of callable, typically [object, method]
|
||||
* @param ?array $options Possible keys are ['condition', 'defaults', 'format',
|
||||
* @param string $id
|
||||
* @param string $uri_path
|
||||
* @param mixed $target Some kind of callable, typically [object, method]
|
||||
* @param array|null $param_reqs
|
||||
* @param array|null $options Possible keys are ['condition', 'defaults', 'format',
|
||||
* 'fragment', 'http-methods', 'locale', 'methods', 'schemes']
|
||||
* 'http-methods' and 'methods' are aliases
|
||||
*/
|
||||
@ -112,6 +117,8 @@ class RouteLoader extends Loader
|
||||
* `config/routes.php`
|
||||
*
|
||||
* @param mixed $resource Unused
|
||||
* @param string|null $type
|
||||
* @return bool
|
||||
*/
|
||||
public function supports($resource, string $type = null)
|
||||
{
|
||||
|
@ -146,6 +146,7 @@ class SchemaDefDriver extends StaticPHPDriver
|
||||
* instead of `loadMetadata`.
|
||||
*
|
||||
* @param string $class_name
|
||||
* @return bool
|
||||
*/
|
||||
public function isTransient($class_name)
|
||||
{
|
||||
@ -154,6 +155,8 @@ class SchemaDefDriver extends StaticPHPDriver
|
||||
|
||||
/**
|
||||
* Convert [$key => $val] to ['name' => $key, 'columns' => $val]
|
||||
* @param array $arr
|
||||
* @return array
|
||||
*/
|
||||
private static function kv_to_name_col(array $arr): array
|
||||
{
|
||||
|
@ -4,8 +4,8 @@ use Symfony\Component\Dotenv\Dotenv;
|
||||
|
||||
require dirname(__DIR__) . '/vendor/autoload.php';
|
||||
|
||||
if (\file_exists(\dirname(__DIR__) . '/config/bootstrap.php')) {
|
||||
if (file_exists(dirname(__DIR__) . '/config/bootstrap.php')) {
|
||||
require dirname(__DIR__) . '/config/bootstrap.php';
|
||||
} elseif (\method_exists(Dotenv::class, 'bootEnv')) {
|
||||
(new Dotenv())->bootEnv(\dirname(__DIR__) . '/.env');
|
||||
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
|
||||
(new Dotenv())->bootEnv(dirname(__DIR__) . '/.env');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user