Searches the registered project for a given name and
returns the corresponding object if successful.
@param string $project_name
@return Project
@throws ProjectNotFoundException
960424
public static final function getRegisteredProject($project_name) {
        if (isset(self::$REGISTERED_PRROJECT_INSTANCES[$project_name])) {
            return self::$REGISTERED_PRROJECT_INSTANCES[$project_name];
        } else {
            throw new ProjectNotFoundException(sprintf("The project \"%s\" NOT registered.", $project_name));
        }
    }
42786
def get_project(self, project_id):
        ''''''
        project_response = self.get_request('projects/%s' % project_id)
        return Project(self, project_response['project'])
485002
def get_project(self, project_id):
        
        try:
            result = self._request('/getproject/',
                                   {'projectid': project_id})
            return TildaProject(**result)
        except NetworkError:
            return []
795687
public function getClientActiveProjects($client_id)
    {
        $result = $this->getClientProjects( $client_id );
        if ( $result->isSuccess() ) {
            $projects = array();
            foreach ($result->data as $project) {
                if ($project->active == "true") {
                    $projects[$project->id] = $project;
                }
            }
            $result->data = $projects;
        }

        return $result;
    }
729521
public function getProjectTasks($project_id)
    {
        $result = $this->getProjectTaskAssignments($project_id);
        if ($result->isSuccess()) {
            $tasks = array();
            foreach ($result->data as $taskAssignment) {
                $taskResult = $this->getTask($taskAssignment->task_id);
                if ($taskResult->isSuccess()) {
                    $tasks[$taskResult->data->id] = $taskResult->data;
                }
            }
            $result->data = $tasks;
        }

        return $result;
    }
658977
protected function fetchProject($projectId, $expectedType)
    {
        $project = $this->projectStore->getById($projectId);

        if (empty($project)) {
            throw new Exception('Project does not exist: ' . $projectId);
        }

        if (is_array($expectedType)
            ? !in_array($project->getType(), $expectedType)
            : $project->getType() !== $expectedType
        ) {
            throw new Exception('Wrong project type: ' . $project->getType());
        }

        return $project;
    }
659813
def get_project(project_id, custom_headers:nil)
      response = get_project_async(project_id, custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
1105899
public static final function registerProject(Project $project) {
        if (isset(self::$REGISTERED_PRROJECT_INSTANCES[$project->getProjectName()])) {
            throw new ConflictProjectNameException(sprintf("The project \"%s\" EXISTS.", $project->getProjectName()));
        }
        self::$REGISTERED_PRROJECT_INSTANCES[$project->getProjectName()] = $project;
    }
598395
public function _get($_name)
    {
        $getMethod = 'get' . ucfirst($_name);
        if(method_exists($this,$getMethod))
            return $this->$getMethod();
        else
            return false;
    }
894303
public static Project newInstance(String name)
    {
        Project project = new Project();
        project.setName(name);
        return project;
    }
58435
def get_project_session(project_name, project_directory, map_type=None):
    
    sqlalchemy_url, sql_engine = init_sqlite_memory()
    gdb_sessionmaker = get_sessionmaker(sqlalchemy_url, sql_engine)
    project_manager = ProjectFile(name=project_name,
                                  project_directory=project_directory,
                                  map_type=map_type)
    return project_manager, gdb_sessionmaker
1139358
public function getProject($id, $hostname = null, $https = true)
    {
        // Search for a project in the user's project list.
        foreach ($this->getProjects() as $project) {
            if ($project->id === $id) {
                return $project;
            }
        }

        // Look for a project directly if the hostname is known.
        if ($hostname !== null) {
            return $this->getProjectDirect($id, $hostname, $https);
        }

        // Use the project locator.
        if ($url = $this->locateProject($id)) {
            return Project::get($url, null, $this->connector->getClient());
        }

        return false;
    }
416046
def create_project(self, name=None, project_id=None, path=None):
        

        if project_id is not None and project_id in self._projects:
            return self._projects[project_id]
        project = Project(name=name, project_id=project_id, path=path)
        self._check_available_disk_space(project)
        self._projects[project.id] = project
        return project
794972
protected static IJavaProject[] getProjectSearchOrder(String projectName) {

		ArrayList<String> projectNames= new ArrayList<>();
		projectNames.add(projectName);

		int nextProject= 0;
		while (nextProject < projectNames.size()) {
			String nextProjectName= projectNames.get(nextProject);
			IJavaProject jproject= getJavaProject(nextProjectName);

			if (jproject != null) {
				try {
					String[] childProjectNames= jproject.getRequiredProjectNames();
					for (int i= 0; i < childProjectNames.length; i++) {
						if (!projectNames.contains(childProjectNames[i])) {
							projectNames.add(childProjectNames[i]);
						}
					}
				} catch (JavaModelException e) {
					JavaPlugin.log(e);
				}
			}
			nextProject+= 1;
		}

		ArrayList<IJavaProject> result= new ArrayList<>();
		for (int i= 0, size= projectNames.size(); i < size; i++) {
			String name= projectNames.get(i);
			IJavaProject project= getJavaProject(name);
			if (project != null)
				result.add(project);
		}

		return result.toArray(new IJavaProject[result.size()]);
	}
514011
def get_project(self, project_id):
        
        return youtrack.Project(self._get("/admin/project/" + urlquote(project_id)), self)
498081
def delete_project(self, project_name):
        
        headers = {}
        params = {}
        resource = "/"

        (resp, header) = self._send("DELETE", project_name, None, resource, params, headers)
        return DeleteProjectResponse(header, resp)
864205
def get_project(self, project_short_name):
        """"""
        project = pbclient.find_project(short_name=project_short_name,
                                        all=self.all)
        if (len(project) == 1):
            return project[0]
        else:
            raise ProjectNotFound(project_short_name)