1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 
<?php declare(strict_types = 1);
/**
 * This file is part of the Tmdb package.
 *
 * (c) Vincent Faliès <vincent@vfac.fr>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @author Vincent Faliès <vincent@vfac.fr>
 * @copyright Copyright (c) 2017
 */


namespace VfacTmdb\Results;

use VfacTmdb\Abstracts\Results;
use VfacTmdb\Interfaces\Results\CompanyResultsInterface;
use VfacTmdb\Interfaces\TmdbInterface;

/**
 * Class to manipulate a company result
 * @package Tmdb
 * @author Vincent Faliès <vincent@vfac.fr>
 * @copyright Copyright (c) 2017
 */
class Company extends Results implements CompanyResultsInterface
{
    /**
     * Collection name
     * @var string
     */
    protected $name = null;
    /**
     * Collection image logo path
     * @var string
     */
    protected $logo_path = null;
    /**
     * Collection Id
     * @var int
     */
    protected $id = null;

    /**
     * Constructor
     * @param TmdbInterface $tmdb
     * @param \stdClass $result
     */
    public function __construct(TmdbInterface $tmdb, \stdClass $result)
    {
        parent::__construct($tmdb, $result);

        // Populate data
        $this->id        = $this->data->id;
        $this->name      = $this->data->name;
        $this->logo_path = $this->data->logo_path;
    }

    /**
     * Collection id
     * @return int
     */
    public function getId() : int
    {
        return $this->id;
    }

    /**
     * Image logo path
     * @return string|null
     */
    public function getLogoPath() : ?string
    {
        return $this->logo_path;
    }

    /**
     * Collection name
     * @return string
     */
    public function getName() : string
    {
        return $this->name;
    }
}