lithium\console\command\g11n\Extract::_extract PHP Method

_extract() protected method

Extracts translatable strings from multiple files.
protected _extract ( ) : array
return array Returns the catalog specified. Returns boolean `false` when an error occurs.
    protected function _extract()
    {
        $message = array();
        $message[] = 'A `Catalog` class configuration with an adapter that is capable of';
        $message[] = 'handling read requests for the `messageTemplate` category is needed';
        $message[] = 'in order to proceed. This may also be referred to as `extractor`.';
        $this->out($message);
        $this->out();
        $name = $this->_configuration(array('adapter' => 'Code', 'path' => $this->source, 'scope' => $this->scope));
        $configs = Catalog::config();
        try {
            return Catalog::read($name, 'messageTemplate', 'root', array('scope' => $configs[$name]['scope'], 'lossy' => false));
        } catch (Exception $e) {
            return false;
        }
    }