ヤミRoot VoidGate
User / IP
:
216.73.216.211
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
api
/
vendor
/
jms
/
serializer
/
tests
/
Fixtures
/
Viewing: IndexedCommentsBlogPost.php
<?php namespace JMS\Serializer\Tests\Fixtures; use JMS\Serializer\Annotation\Accessor; use JMS\Serializer\Annotation\XmlAttribute; use JMS\Serializer\Annotation\XmlList; use JMS\Serializer\Annotation\XmlMap; use JMS\Serializer\Annotation\XmlRoot; /** @XmlRoot("post") */ class IndexedCommentsBlogPost { /** * @XmlMap(keyAttribute="author-name", inline=true, entry="comments") * @Accessor(getter="getCommentsIndexedByAuthor") */ private $comments = array(); public function __construct() { $author = new Author('Foo'); $this->comments[] = new Comment($author, 'foo'); $this->comments[] = new Comment($author, 'bar'); } public function getCommentsIndexedByAuthor() { $indexedComments = array(); foreach ($this->comments as $comment) { $authorName = $comment->getAuthor()->getName(); if (!isset($indexedComments[$authorName])) { $indexedComments[$authorName] = new IndexedCommentsList(); } $indexedComments[$authorName]->addComment($comment); } return $indexedComments; } } class IndexedCommentsList { /** @XmlList(inline=true, entry="comment") */ private $comments = array(); /** @XmlAttribute */ private $count = 0; public function addComment(Comment $comment) { $this->comments[] = $comment; $this->count += 1; } }
Coded With 💗 by
0x6ick