CoreFiles by mySites.guru
SerializerInterface.php71 lines, 1,266 bytes, from Joomla_4.3.3-Stable-Full_Package.zip
Raw History Compare with 4.3.2
md5
16d439c870e8a963ffc2643bdc1e2506
sha1
368660313e6515938e5db2b634c488aad49be3c6
sha256
d4a54d03894455f2ec7c80b712ce7c3b47e055e61ac97772a132e5eaeb048855
<?php

/*
 * This file is part of JSON-API.
 *
 * (c) Toby Zerner <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Tobscure\JsonApi;

interface SerializerInterface
{
    /**
     * Get the type.
     *
     * @param mixed $model
     *
     * @return string
     */
    public function getType($model);

    /**
     * Get the id.
     *
     * @param mixed $model
     *
     * @return string
     */
    public function getId($model);

    /**
     * Get the attributes array.
     *
     * @param mixed $model
     * @param array|null $fields
     *
     * @return array
     */
    public function getAttributes($model, array $fields = null);

    /**
     * Get the links array.
     *
     * @param mixed $model
     *
     * @return array
     */
    public function getLinks($model);

    /**
     * Get the meta.
     *
     * @param mixed $model
     *
     * @return array
     */
    public function getMeta($model);

    /**
     * Get a relationship.
     *
     * @param mixed $model
     * @param string $name
     *
     * @return \Tobscure\JsonApi\Relationship|null
     */
    public function getRelationship($model, $name);
}

The same content is in 201 releases, Joomla 4.0.0-alpha7 to 5.3.0-beta3. See them all, or every version of this file.