<tfoot id='9wbE3'></tfoot>
    <legend id='9wbE3'><style id='9wbE3'><dir id='9wbE3'><q id='9wbE3'></q></dir></style></legend>

      <small id='9wbE3'></small><noframes id='9wbE3'>

        <bdo id='9wbE3'></bdo><ul id='9wbE3'></ul>

        <i id='9wbE3'><tr id='9wbE3'><dt id='9wbE3'><q id='9wbE3'><span id='9wbE3'><b id='9wbE3'><form id='9wbE3'><ins id='9wbE3'></ins><ul id='9wbE3'></ul><sub id='9wbE3'></sub></form><legend id='9wbE3'></legend><bdo id='9wbE3'><pre id='9wbE3'><center id='9wbE3'></center></pre></bdo></b><th id='9wbE3'></th></span></q></dt></tr></i><div id='9wbE3'><tfoot id='9wbE3'></tfoot><dl id='9wbE3'><fieldset id='9wbE3'></fieldset></dl></div>

      1. 我可以在我的项目中使用 Zend translate、date 和 cache 作为独立类吗?

        Can I use zend translate, date and cache as standalone class in my project?(我可以在我的项目中使用 Zend translate、date 和 cache 作为独立类吗?)
      2. <small id='EFlau'></small><noframes id='EFlau'>

          <bdo id='EFlau'></bdo><ul id='EFlau'></ul>

            <i id='EFlau'><tr id='EFlau'><dt id='EFlau'><q id='EFlau'><span id='EFlau'><b id='EFlau'><form id='EFlau'><ins id='EFlau'></ins><ul id='EFlau'></ul><sub id='EFlau'></sub></form><legend id='EFlau'></legend><bdo id='EFlau'><pre id='EFlau'><center id='EFlau'></center></pre></bdo></b><th id='EFlau'></th></span></q></dt></tr></i><div id='EFlau'><tfoot id='EFlau'></tfoot><dl id='EFlau'><fieldset id='EFlau'></fieldset></dl></div>
              <tbody id='EFlau'></tbody>
              <legend id='EFlau'><style id='EFlau'><dir id='EFlau'><q id='EFlau'></q></dir></style></legend>

              <tfoot id='EFlau'></tfoot>

                • 本文介绍了我可以在我的项目中使用 Zend translate、date 和 cache 作为独立类吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我将使用 Zend 框架,但只是 Zend 的一些工具,如翻译、日期和缓存.我可以将它用作独立类吗?我的项目有自己的结构,我不想使用整个 Zend 固件.如果是,我应该在我的项目中包含哪些文件?是否有单独使用每个 Zend fw 工具的文档?

                  I'm going to use Zend framework but just some tool of Zend like translate, date and cache. Can I use it as standalone class? My project has it own structure and I don't want use the whole Zend fw. If yes, which files should I include in my project? Is there a docs for using each Zend fw tool as standalone?

                  推荐答案

                  请记住,要在另一个项目中使用各种 Zend Framework 组件,您只需要在您的 Zend 库的某个位置>include_path.使用一个组件复制整个内容似乎有些矫枉过正,但这只是磁盘空间.除非调用它们,否则将这些文件放在那里不会影响性能.这样,您就不必担心依赖项,例如 Zend_Exception 及其各种特定于组件的子类.

                  And remember, to use various Zend Framework components in another project, you just need to have the Zend library somewhere on your include_path. Copying the whole thing may seem overkill to use one component, but it's only disk space. Having those files there doesn't affect performance unless they are called upon. And this way, you don't have to sweat the dependencies, like Zend_Exception and its various component-specific subclasses.

                  因此,例如,如果您有一个文件夹 myapp/lib 来包含您的外部库,您只需确保您的包含路径包含该 lib 文件夹并复制将 Zend 文件夹作为 myapp/lib/Zend 放入其中.

                  So, for example, if you have a folder myapp/lib to contain your external libraries, you simply make sure that your include path contains that lib folder and copy the Zend folder into it as myapp/lib/Zend.

                  然后要使用像 Zend_Translate 这样的组件,您所要做的就是如下所示:

                  Then to use a component like Zend_Translate, all you have to do is something like the following:

                  require_once 'Zend/Translate.php';
                  $options = array(
                      // your options here
                  );
                  $translate = new Zend_Translate($options);
                  

                  通过某种自动加载机制,您甚至可以避免 require_once 调用.设置自动加载就像将以下内容放在某种通用/引导文件中一样简单:

                  With some kind of autloading mechanism in place, you can avoid even the require_once call. Setting up autoloading is as easy as putting the following in some kind of common/bootstrap file:

                  require_once 'Zend/Loader/Autoloader.php';
                  Zend_Loader_Autoloader::getInstance();
                  

                  然后是任何遵循 PEAR 1-class-1-file 命名约定的类 无需显式添加任何 require/include 语句即可加载.

                  Then any classes that follow the PEAR 1-class-1-file naming convention can be loaded without explicitly adding any require/include statements.

                  如果磁盘空间真的是一个问题,并且你真的不想要整个 Zend 库,那么你可以研究一个打包器,比如 Jani Hartikainen 的打包器.

                  If disk-space really is a concern and you really don't want the whole Zend library, then you could investigate a packageizer, like Jani Hartikainen's Packageizer.

                  这篇关于我可以在我的项目中使用 Zend translate、date 和 cache 作为独立类吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  <i id='VsVIo'><tr id='VsVIo'><dt id='VsVIo'><q id='VsVIo'><span id='VsVIo'><b id='VsVIo'><form id='VsVIo'><ins id='VsVIo'></ins><ul id='VsVIo'></ul><sub id='VsVIo'></sub></form><legend id='VsVIo'></legend><bdo id='VsVIo'><pre id='VsVIo'><center id='VsVIo'></center></pre></bdo></b><th id='VsVIo'></th></span></q></dt></tr></i><div id='VsVIo'><tfoot id='VsVIo'></tfoot><dl id='VsVIo'><fieldset id='VsVIo'></fieldset></dl></div>
                • <small id='VsVIo'></small><noframes id='VsVIo'>

                    <tfoot id='VsVIo'></tfoot>
                      <tbody id='VsVIo'></tbody>
                        • <bdo id='VsVIo'></bdo><ul id='VsVIo'></ul>

                            <legend id='VsVIo'><style id='VsVIo'><dir id='VsVIo'><q id='VsVIo'></q></dir></style></legend>