Examples of PhpModule


Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

     * @param targetPath
     * @param currentFile
     * @return file if file was created, otherwise null.
     */
    public static FileObject createAbsoluteViewFile(String targetPath, FileObject currentFile) {
        PhpModule phpModule = PhpModule.Factory.forFileObject(currentFile);
        YiiModule yiiModule = YiiModuleFactory.create(phpModule);
        FileObject application = yiiModule.getApplication();
        // get absolute view within the application
        if (targetPath.startsWith(APP_PATH_PREFIX)) { // NOI18N
            targetPath = targetPath.replaceFirst(MODULE_PATH_PREFIX, ""); // NOI18N
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

     *
     * @param fo
     * @return
     */
    private static String getPathFromWebroot(FileObject fo) {
        PhpModule phpModule = getPhpModule(fo);
        // return null if use external files #11
        if (phpModule == null) {
            return null;
        }
        String path = fo.getPath();
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

        if (isInModules(view)) {
            String nestedPathDepth = toSubpathDepth(nestedPath);
            String format = String.format(CONTROLLER_RELATIVE_PATH_FORMAT, nestedPathDepth, "", nestedPath, controllerName);
            controller = view.getFileObject(format);
        } else {
            PhpModule phpModule = PhpModule.Factory.forFileObject(view);
            YiiModule yiiModule = YiiModuleFactory.create(phpModule);
            if (yiiModule != null) {
                FileObject controllersDirectory = yiiModule.getControllers();
                if (controllersDirectory == null) {
                    return null;
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

    private static boolean isViewsViewModel(FileObject fileObject, boolean isViews) {
        if (fileObject == null || !FileUtils.isPhpFile(fileObject)) {
            return false;
        }
        PhpModule phpModule = PhpModule.Factory.forFileObject(fileObject);
        if (phpModule == null) {
            phpModule = PhpModule.Factory.inferPhpModule();
        }
        if (phpModule == null) {
            return false;
        }
        FileObject sourceDirectory = phpModule.getSourceDirectory();
        if (sourceDirectory == null) {
            return false;
        }
        String sourcePath = sourceDirectory.getPath();
        String path = fileObject.getPath();
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

     *
     * @param fo FileObject
     * @return views directory FileObject
     */
    public static FileObject getViewsDirectory(FileObject fo) {
        PhpModule pm = PhpModule.Factory.forFileObject(fo);
        return getViewsDirectory(pm);
    }
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

     *
     * @param fo FileObject
     * @return controller directory FileObject
     */
    public static FileObject getControllerDirectory(FileObject fo) {
        PhpModule pm = PhpModule.Factory.forFileObject(fo);
        return getControllerDirectory(pm);
    }
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

     *
     * @param fo FileObject
     * @return view model directory FileObject
     */
    public static FileObject getViewModelDirectory(FileObject fo) {
        PhpModule pm = PhpModule.Factory.forFileObject(fo);
        return getViewModelDirectory(pm);
    }
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

     *
     * @param view
     * @return view file relative path. contain extension.
     */
    private static String getViewPath(FileObject view) {
        PhpModule phpModule = PhpModule.Factory.forFileObject(view);
        if (phpModule == null) {
            phpModule = PhpModule.Factory.inferPhpModule();
        }
        if (phpModule == null) {
            return null;
        }
        FileObject sourceDirectory = phpModule.getSourceDirectory();
        if (sourceDirectory == null) {
            return null;
        }
        String sourcePath = sourceDirectory.getPath();
        String viewPath = view.getPath();
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

     */
    public static boolean isInModules(FileObject fileObject) {
        if (fileObject == null) {
            return false;
        }
        PhpModule phpModule = PhpModule.Factory.forFileObject(fileObject);
        if (phpModule == null) {
            phpModule = PhpModule.Factory.inferPhpModule();
        }
        if (phpModule == null) {
            return false;
        }
        FileObject sourceDirectory = phpModule.getSourceDirectory();
        if (sourceDirectory == null) {
            return false;
        }
        String sourcePath = sourceDirectory.getPath();
        String path = fileObject.getPath();
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

    public MVCNodeFactory() {
    }

    @Override
    public NodeList<?> createNodes(Project p) {
        PhpModule phpModule = PhpModule.Factory.lookupPhpModule(p);
        return new MVCNodeList(phpModule);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.