Set ups the question
@param object $post

@return object
437512
public function setupPost($post)
    {

        $user    = new User($this->db);
        $comment = new Comment($this->db);
        $vote    = new Vote($this->db);

        $post->img      = $user->getGravatar($post->user);
        $post->comments = $comment->getComments("parentId = ?", [$post->id]);
        $post->vote     = $vote->getVote("parentId = ? AND parentType = ?", [$post->id, "post"]);
        $post->markdown = $this->getMD($post->text);

        return $post;
    }
927160
public function setObject(\Smarty $object = null)
    {
        $this->object = $object ? $object : new \Smarty();

        return $this;
    }
735959
public function addPost(ForumThreadPost $post)
    {
        if ($this->posts->contains($post) === false) {
            $post->setThread($this);
            $this->posts->add($post);
        }

        return $this;
    }
859026
function getPost(post) {
  if (!post || !post.body) return {};


  let postQuery = getPostQuery(post.body);
  let postIntro = postQuery.intro || getPostIntro(post.body);

  Object.assign(post, {
    intro: postIntro,
    query: postQuery,
    create_time: formatTime(post.created_at),
    update_time: formatTime(post.updated_at)
  })

  return post;
}
266503
public static function set($object, $key = null) {
        if (!is_object($object)) {
            throw new InvalidObjectException('The object to register must be instantiated');
        }

        if (!$key) {
            $key = get_class($object);
        }

        static::$_registered[$key] = $object;

        return $object;
    }
332096
public function create($user, $post)
    {
        return $this->postPolicy->create($user, $post)
            && $user->can('blog.comment.edit');
    }
448390
public function addPost(Post $post)
    {
        $postName = $post->getName();

        if ($this->isPostRegistered($postName)) {
            throw new \InvalidArgumentException("Duplicate post $postName");
        }

        $this->registerPost($post);
    }
475786
public function setAuthors($post)
	{
		$username = $post->getAuthor()->getUsername();

		if(in_array($username, array_keys($this->config['authors'])))
		{
			if(in_array($username, $this->authorsName))
			{
				$this->authors[$username]->setPost($post);
			}
			else 
			{
				$this->authors[$username] = new Author($username, $this->config['authors'][$username]['name'], $this->config['authors'][$username]['email'], $this->config['authors'][$username]['facebook'], $this->config['authors'][$username]['twitter'], $this->config['authors'][$username]['github']);
				$this->authors[$username]->setPost($post);
				$this->authorsName[] = $username;	
			}
		}
	}
973198
public function setPostal($postal)
	{
		if ( $postal == $this->getPostal() ) { return; }

		$this->_values['postal'] = (string) $postal;
		$this->setModified();
	}
1367625
public static function create_from_question_instance($question, $context = null, $other = null) {

        $params = ['objectid' => $question->id, 'other' => ['categoryid' => $question->category]];

        if (!empty($question->contextid)) {
            $params['contextid'] = $question->contextid;
        }

        $params['context'] = $context;

        if (!empty($other)) {
            $params['other'] = $other;
        }

        $event = self::create($params);
        return $event;
    }
779023
public static function create($post)
    {
        // If numeric, create the post
        if (is_numeric($post)) {
            // Retrieve the transient
            $transientKey = sprintf('WPMVC\Models\Post(%d)', $post);
            $storedData = WP::getTransient($transientKey);
            // If the transient doesn't yet exist, query for it!
            if ($storedData === false) {
                // Retrieve the post object
                $post = WP::getPost(intval($post));
                // Store the transient
                WP::setTransient($transientKey, $post, static::$transientTimeout);
            } else {
                $post = $storedData;
            }
        } elseif (is_array($post)) {
            // Convert array into object
            $post = (object) $post;
        }
        return new static($post);
    }
411244
public function create_metabox( $post ) {

		$this->post = $post;
		$data       = get_post_meta( $post->ID, $this->slug, true );
		if ( empty( $data ) ) {
			$data = [
				$this->slug => [],
			];
		}
		$this->set_data( $data );
		echo $this->render();

	}
1018025
public function setPost(){

		//populate the post array
		$postArray = (isset($_POST)) ? $_POST : array();

		//set the postInputData
		$this->postInputData = $postArray;

		//add this to the inputData
		$this->inputData = $this->Merge($this->inputData, $this->postInputData);

		//set the postInputDataSet to true
		$this->postInputDataSet = true;

		//return this object instance
		return $this;

	}
430796
function setSubject( $newSubject )
    {
        $this->Mail->subject = trim( $newSubject );
        $this->Mail->subjectCharset = $this->usedCharset();
        $this->Subject = trim( $newSubject );
    }
1357783
protected function set_post( $post ) {
		$this->post = $post;
		$this->id   = ( isset( $post->ID ) ) ? $post->ID : false;

		if ( ! empty( $this->taxonomies() ) ) {
			foreach ( $this->taxonomies() as $taxonomy ) {
				$this->{$taxonomy} = $this->get_terms( $taxonomy, array( 'fields' => 'all' ) );
			}
		}
	}
1066647
public function setPayload(string $payload): self
    {
        $this->checkContentType();
        $this->isValidString($payload, 1000);

        $this->payload = $payload;

        return $this;
    }
130095
public function ask($text, $response = '')
    {
        $helper = $this->getHelper('question');
        //
        $question = new Question($this->console->question($text.' '), $response);
        //
        return $helper->ask($this->input, $this->output, $question);
    }