Zend Framework Bootstrap Features Where You Can Get It From

I find many functions used in the Bootstrap class in Zend Framework applications as:

_initRoute()
_initLocale()
_initLayout()
.......

but i was looking for his link but i don't like anything

Zend_Application_Bootstrap_BootstrapAbstract
Zend_Application_Bootstrap_Bootstrap

none of them contain any of these functions.

Where can I find a full link to these features?

+3
source share
2 answers

These are mainly resource plugins located at library/Zend/Application/Resource/. You can also create your own.

See My detailed answer to a very similar question that should fit this.

Also see BootstrapAbstract.php:

/**
 * Get class resources (as resource/method pairs)
 *
 * Uses get_class_methods() by default, reflection on prior to 5.2.6,
 * as a bug prevents the usage of get_class_methods() there.
 *
 * @return array
 */
public function getClassResources()
{
    if (null === $this->_classResources) {
        if (version_compare(PHP_VERSION, '5.2.6') === -1) {
            $class        = new ReflectionObject($this);
            $classMethods = $class->getMethods();
            $methodNames  = array();

            foreach ($classMethods as $method) {
                $methodNames[] = $method->getName();
            }
        } else {
            $methodNames = get_class_methods($this);
        }

        $this->_classResources = array();
        foreach ($methodNames as $method) {
            if (5 < strlen($method) && '_init' === substr($method, 0, 5)) {
                $this->_classResources[strtolower(substr($method, 5))] = $method;
            }
        }
    }

    return $this->_classResources;
}
+6
source
+3

Source: https://habr.com/ru/post/1793675/


All Articles