Set the project associated with this recorder entry.

@param Project $project the project instance
486147
public function setProject(Project $project)
    {
        $this->project = $project;
        if ($this->project != null) {
            $this->project->addBuildListener($this);
        }
    }
1312029
public function transform(ProjectDescriptor $project, Transformation $transformation)
    {
        $artifact = $this->getDestinationPath($transformation);

        $this->checkForSpacesInPath($artifact);

        $this->xml = new \DOMDocument('1.0', 'utf-8');
        $this->xml->formatOutput = true;
        $document_element = new \DOMElement('project');
        $this->xml->appendChild($document_element);

        $document_element->setAttribute('title', $project->getName());
        $document_element->setAttribute('version', Application::VERSION());

        $this->buildPartials($document_element, $project);

        $transformer = $transformation->getTransformer();

        foreach ($project->getFiles() as $file) {
            $this->buildFile($document_element, $file, $transformer);
        }

        $this->finalize($project);
        file_put_contents($artifact, $this->xml->saveXML());
    }
451823
def set_project_id(self, project_id):
    
    self._project_id = project_id
    if self == Context._global_context:
      du.save_project_id(self._project_id)
1053710
public function process(ProjectDescriptor $project)
    {
        foreach ($this->behaviours as $behaviour) {
            $project = $behaviour->process($project);
        }

        return $project;
    }
1289507
public static function storeChild($project, $parent, $child, $tag)
    {
        $ih = IntrospectionHelper::getHelper(get_class($parent));
        $ih->storeElement($project, $parent, $child, $tag);
    }
648639
public function execute(ProjectDescriptor $project)
    {
        $this->setObjectAliasesList($project->getIndexes()->elements->getAll());
        $this->substitute($project);
    }
722253
public function setTask($task)
    {
        $taskCode = filter_var($task, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
        if (strpos($taskCode, '-') !== false) {
            $taskCode = str_replace('-', '', $taskCode);
        }
        $taskCode = $this->project . $taskCode;
        $this->task = $taskCode;
    }
1064246
public function updateProject(Project $project)
    {
        $request = $this->client->createRequest('PUT', sprintf('/api/projects/%s', $project->getUuid()), null, array('insight_project' => $project->toArray()));

        return $this->serializer->deserialize(
            (string) $this->send($request)->getBody(),
            'SensioLabs\Insight\Sdk\Model\Project',
            'xml'
        );
    }
588495
public function setProjectId($value)
    {
        $this->_validateNotNull('ProjectId', $value);
        $this->_validateInt('ProjectId', $value);

        if ($this->data['project_id'] === $value) {
            return;
        }

        $this->data['project_id'] = $value;

        $this->_setModified('project_id');
    }
658052
def add_to_recent(self, project):
        
        if project not in self.recent_projects:
            self.recent_projects.insert(0, project)
            self.recent_projects = self.recent_projects[:10]
585027
def set_project(self, project):
        
        prjroot = self.prjbrws.model.root
        prjitems = prjroot.childItems
        for row, item in enumerate(prjitems):
            prj = item.internal_data()
            if prj == project:
                prjindex = self.prjbrws.model.index(row, 0)
                break
        else:
            raise ValueError("Could not select the given taskfile. No project %s found." % project.name)
        self.prjbrws.set_index(0, prjindex)
1191869
def set_project_pid(project, old_pid, new_pid):
    
    for datastore in _get_datastores():
        datastore.save_project(project)
        datastore.set_project_pid(project, old_pid, new_pid)
1143950
protected function enableProject($enable, $project)
    {
        $project->timestamps = false;

        $project->enabled = $enable;

        $project->save();
    }
431102
private function mutateFilesToFilesystemInterfaces(Project $project, Cache $cache)
    {
        foreach ($this->files as &$file) {
            /** @var CachedFile $cachedFile */
            if ($cachedFile = $cache->getItem($file->getUid())) {
                if ($cachedFile->check($file)) {
                    $file = new FileIgnored(clone $file, $project->destinationDirectory);
                    continue;
                }
            }

            if ($file->isToCopy()) {
                $file = new FileCopier(clone $file, $project->destinationDirectory);
            } else {
                $file = new FileWriter(clone $file, $project->destinationDirectory);
            }
        }
        unset($file);
    }
196108
public function save(ProjectDescriptor $projectDescriptor): void
    {
        $keys = [];
        $cache = $this->getCache();

        foreach ($cache as $key) {
            $keys[] = $key;
        }

        // store the settings for this Project Descriptor
        $cache->setItem(self::KEY_SETTINGS, $projectDescriptor->getSettings());

        // store cache items
        $usedKeys = [self::KEY_SETTINGS];
        foreach ($projectDescriptor->getFiles() as $file) {
            $key = self::FILE_PREFIX . md5($file->getPath());
            $usedKeys[] = $key;
            $cache->setItem($key, $file);
        }

        // remove any keys that are no longer used.
        $invalidatedKeys = array_diff($keys, $usedKeys);
        if ($invalidatedKeys) {
            $cache->removeItems($invalidatedKeys);
        }

        if ($cache instanceof OptimizableInterface) {
            $cache->optimize();
        }
    }
1018103
public void setProjectChanged(boolean b) {
        if (curProject == null) {
            return;
        }

        if (projectChanged == b) {
            return;
        }

        projectChanged = b;
        mainFrameMenu.setSaveMenu(this);

        getRootPane().putClientProperty(WINDOW_MODIFIED, b);

    }
373437
public function setTrace($trace)
    {
        $this->trace = StringHelper::booleanValue($trace);
        if ($this->trace) {
            $this->flags .= ' --trace ';
        } else {
            $this->flags = str_replace(' --trace ', '', $this->flags);
        }
    }