private function getOrderedInterfaces($className)
    {
        $interfacesArr = $this->prepareClassTreeInterfaces($className);
        $interfaces = array();
        foreach ($interfacesArr as $classInterfaces) {
            foreach ($classInterfaces as $interface) {
                if (array_search($interface, $interfaces) === false) {
                    array_unshift($interfaces, $interface);
                }
            }
        }

        return $interfaces;
    }