Create a action

@param string $message
@param string $link
@param string $class
@return Mail
336811
public function action(string $message, string $link, string $class = 'btn btn-primary') : Mail
  {
    $this->body .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"{$class}\">
<tbody>
  <tr>
    <td align=\"left\">
      <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
        <tbody>
          <tr>
            <td>
              <a href=\"{$link}\" target=\"_blank\">{$message}</a>
            </td>
          </tr>
        </tbody>
      </table>
    </td>
  </tr>
</tbody>
</table>
";
    return $this;
  }
1331258
private function createMethodRule(string $class, string $method): RuleInterface
    {
        $rule = (new Rule())
            ->setName($method)
            ->setTarget($this->target(RequestProperties::REQ_ACTION, $method))
            ->setEffect(new Logical([$class, $method]))
            ->setName("$class::$method");

        return $rule;
    }
852503
public function _action(&$class) {
        ob_start();

        $annotation = Annotation::getClass($class);

        $this->_callAnnotation($class, $annotation, 'class', 'Before');

        if (method_exists($class, 'action' . ucfirst($this->request->action))) {
            $this->_callAnnotation($class, $annotation, 'methods', 'Before');
            $action = 'action' . ucfirst($this->request->action);
            $params = Injector::instance()->getArgsMethod($class, $action);

            $reflectionMethod = new \ReflectionMethod($class, $action);
            $output = $reflectionMethod->invokeArgs($class, $params);
            $this->_callAnnotation($class, $annotation, 'methods', 'After');

            $this->addError('Action "' . $this->request->src . '/' . ucfirst($this->request->controller) . '/action' . ucfirst($this->request->action) . '" called successfully', __FILE__, __LINE__, ERROR_INFORMATION);
        }
        else {
            throw new Exception('The requested "' . $this->request->src . '/' . ucfirst($this->request->controller) . '/action' . ucfirst($this->request->action) . '"  doesn\'t exist');
        }

        $this->_callAnnotation($class, $annotation, 'class', 'After');
        $output = ob_get_contents() . $output;
        ob_get_clean();

        return $output;
    }
1327435
protected function createMailDriver()
    {
        $mailer = $this->app->make('orchestra.mail');

        return $this->app->make(MailChannel::class, [$mailer->getMailer()]);
    }
55787
protected function createActor($class, $name)
    {
        $actor = Pool::getInstance()->get($class);
        $actor->initialization($name);
        $this->addChild($actor);
        return $actor;
    }
34474
public static function create(string $href): LinkBuilderInterface
    {
        $self = new self();
        $self->href = $href;
        $self->rels = [];
        $self->attributes = [];

        return $self;
    }
1053560
public function addMessage(Message $message): Email
    {
        if (null === $this->message->getBody()) {
            $this->message->setBody($message->getBody(), $message->getContentType());

            return $this;
        }

        $this->message->addPart($message->getBody(), $message->getContentType());

        return $this;
    }
728116
public function create(string $class, array $map = [], array $params = null)
    {
        try {
            return Builder::create($this, $class, $map, $params);
        } catch (\InvalidArgumentException $e) {
            throw new InvalidArgumentException($e->getMessage());
        }
    }
729256
public static function sendLink($link, $message = '')
    {
        self::initialize();
        $data = compact('link', 'message');
        try {
            $response = self::$fb->post('/me/feed', $data, self::$page_access_token);
        } catch(Facebook\Exceptions\FacebookResponseException $e) {
            throw new \Exception('Graph returned an error: '.$e->getMessage());
        } catch(Facebook\Exceptions\FacebookSDKException $e) {
            throw new \Exception('Facebook SDK returned an error: '.$e->getMessage());
        }
        $graphNode = $response->getGraphNode();

        return $graphNode['id'];
    }
899017
public function click(Link $link)
    {
        if ($link instanceof Form) {
            return $this->submit($link);
        }

        return $this->request($link->getMethod(), $link->getUri());
    }
33816
public function action($action, string $text, $parameters = [], bool $absolute = true)
    {
        return $this->add(Link::toAction($action, $text, $parameters, $absolute));
    }
423517
public static function createFromStdClass(stdClass $class)
	{
		$hash = isset($class->hash) ? $class->hash : null;
		$scope = isset($class->scope) ? $class->scope : null;
		$action = isset($class->action) ? $class->action : null;
		$data = isset($class->data) ? $class->data : null;
		$state = isset($class->state) ? $class->state : null;
		$ip = isset($class->ip) ? $class->ip : null;
		$useragent = isset($class->useragent) ? $class->useragent : null;
		$createdAt = isset($class->created_at) ? $class->created_at : null;

		return new Action($hash, $scope, $action, $data, $state, $ip, $useragent, $createdAt);
	}
39866
public function &createAction(string $type, string $text, string $href = '', bool $ajax = false, string $confirm = ''): Action
    {
        $action = new Action();

        $action->setType($type);
        $action->setText($text);

        if (!empty($href)) {
            $action->setHref($href);
        }

        $action->setAjax($ajax);

        if (!empty($confirm)) {
            $action->setConfirm('confirm');
        }

        $this->addAction($action);

        return $action;
    }
1120347
public function link( string $target, string $link )
	{
		if( Helper::isOsWindows() )
		{
			$mode = $this->isDirectory( $target ) ? 'J' : 'H';
			exec( "mklink /{$mode} \"{$link}\" \"{$target}\"" );
		}
		else
		{
			symlink( $target, $link );
		}
	}
510875
private function create($messageClass, $message)
    {
        $interfaces = array_values(class_implements($messageClass, true));
        return new IncomingLogicalMessage($message, $messageClass, $interfaces);
    }
444363
protected function makeForm($resource, $class, $model)
    {
        $form = $this->container->make($class);

        if (!$this->formRules($form) && $rules = $this->rules($resource)) {
            $form->getValidator()->setRules($rules);
        }

        if ($model) {
            $form->setModel($model);
        }

        $this->publish($resource, 'form.created', [$form]);

        return $form;
    }
1353206
public static Function<Message, MailMessage> toMailMessage() {
		return new Function<Message, MailMessage>() {
			@Override
			public MailMessage apply(final Message input) {
				return MailMessage.fromMessage(input);
			}
		};
	}