lithium\tests\mocks\console\command\MockLibraryService::_data PHP Method

_data() protected method

protected _data ( $type, $key = null )
    protected function _data($type, $key = null)
    {
        $resources = Libraries::get(true, 'resources');
        $plugins = array(array('name' => 'li3_lab', 'version' => '1.0', 'summary' => 'the li3 plugin client/server', 'maintainers' => array(array('name' => 'gwoo', 'email' => '[email protected]', 'website' => 'li3.rad-dev.org')), 'created' => '2009-11-30', 'updated' => '2009-11-30', 'rating' => '9.9', 'downloads' => '1000', 'sources' => array('git' => 'git://rad-dev.org/li3_lab.git', 'phar' => 'http://downloads.rad-dev.org/li3_lab.phar.gz'), 'requires' => array()), array('id' => 'b22a2f0dfc873fd0e1a7655f4895872ae4b94ef4', 'name' => 'library_test_plugin', 'version' => '1.0', 'summary' => 'an li3 plugin example', 'maintainers' => array(array('name' => 'gwoo', 'email' => '[email protected]', 'website' => 'li3.rad-dev.org')), 'created' => '2009-11-30', 'updated' => '2009-11-30', 'rating' => '9.9', 'downloads' => '1000', 'sources' => array('phar' => "{$resources}/tmp/tests/library_test_plugin.phar.gz"), 'requires' => array('li3_lab' => array('version' => '<=1.0'))), array('name' => 'li3_docs', 'version' => '1.0', 'summary' => 'the li3 plugin client/server', 'maintainers' => array(array('name' => 'gwoo', 'email' => '[email protected]', 'website' => 'li3.rad-dev.org')), 'created' => '2009-11-30', 'updated' => '2009-11-30', 'rating' => '9.9', 'downloads' => '1000', 'sources' => array('git' => 'git://rad-dev.org/li3_docs.git', 'phar' => 'http://downloads.rad-dev.org/li3_docs.phar.gz'), 'requires' => array()));
        $extensions = array(array('class' => 'Example', 'namespace' => 'app\\extensions\\adapter\\cache', 'summary' => 'the example adapter', 'maintainers' => array(array('name' => 'gwoo', 'email' => '[email protected]', 'website' => 'li3.rad-dev.org')), 'created' => '2009-11-30', 'updated' => '2009-11-30', 'rating' => '9.9', 'downloads' => '1000'), array('class' => 'Paginator', 'namespace' => 'app\\extensions\\helpes', 'summary' => 'a paginator helper', 'maintainers' => array(array('name' => 'gwoo', 'email' => '[email protected]', 'website' => 'li3.rad-dev.org')), 'created' => '2009-11-30', 'updated' => '2009-11-30', 'rating' => '9.9', 'downloads' => '1000'));
        $data = compact('plugins', 'extensions');
        if (isset($data[$type][$key])) {
            return $data[$type][$key];
        }
        if (isset($data[$type])) {
            return $data[$type];
        }
        if ($key !== null) {
            return null;
        }
        return $data;
    }
MockLibraryService