<?php namespace Aedart\Scaffold\Collections\Utility;

use Aedart\Scaffold\Containers\IoC;
use Aedart\Scaffold\Contracts\Collections\TemplateProperties;

/**
 * Properties Collection Parser Trait
 *
 * Utility that is able to parse an array into a
 * template properties collection
 *
 * @author Alin Eugen Deac <aedart@gmail.com>
 * @package Aedart\Scaffold\Collections\Utility
 */
trait PropertiesCollectionParser
{
    /**
     * Parse the given properties list and return a collection
     *
     * @param array $properties
     *
     * @return TemplateProperties
     */
    public function parsePropertiesCollection(array $properties = [])
    {
        $ioc = IoC::getInstance();

        return $ioc->make(TemplateProperties::class, $properties);
    }
}
Add template properties collection parser utility
Add template properties collection parser utility

Method is needed across multiple tasks, which is why this trait has
been created.
