<commit_before><commit_msg>Added simplified generic resource provider<commit_after><?php


namespace Ems\Contracts\Core;

/**
 * This is a generic provider to provide a minimal implementation to provdide
 * Identifiable objects. A good example is a Template Provider. All you want to do is
 * show a list of Templates and its names in an admin interface. So you have an
 * id and a name.
 **/
interface ResourceProvider
{

    /**
     * Get a named object by its id
     *
     * @param mixed $id
     * @return \Ems\Contracts\Core\Identifiable|null
     **/
    public function get($id);

    /**
     * Get a named object by its id or throw an exception if it cant be found
     *
     * @param mixed $id
     * @return \Ems\Contracts\Core\Identifiable
     * @throws \Ems\Contracts\NotFound
     **/
    public function getOrFail($id);

    /**
     * Return an iterable of all known named objects of this provider
     *
     * @return array|\Traversable<\Ems\Contracts\Core\Identifiable>
     **/
    public function all();

}
{'fraction_non_alphanumeric': 0.09302325581395349, 'fraction_numerical': 0.0, 'mean_word_length': 2.6892857142857145, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3737955', 'n_tokens_mistral': 299, 'n_tokens_neox': 293, 'n_words': 113}