Cria a estrutura de um pacote.

@param string $pack
@param string $author
@param string $email

@throws \Exception
169649
public function create($pack, $author, $email)
    {
        $fs = new Filesystem();

        if (!$this->sourceDir) {
            throw new \Exception('O diretório de código fonte "singular.directory.src" da aplicação não foi definido!');
        }

        $packDir = $this->getPackDir($pack);

        if ($fs->exists($packDir)) {
            throw new \Exception(sprintf('O pacote %s já foi criado!', $pack));
        }

        $this->createDirectories($packDir);
        $this->createPackServiceProvider($pack, $packDir, $author, $email);
    }
431967
protected function add_writer_to_file(\repository_googledocs\rest $client, $fileid, $email) {
        $updateeditor = [
            'emailAddress' => $email,
            'role' => 'writer',
            'type' => 'user'
        ];
        $params = ['fileid' => $fileid, 'sendNotificationEmail' => 'false'];
        $response = $client->call('create_permission', $params, json_encode($updateeditor));
        if (empty($response->id)) {
            $details = 'Cannot add user ' . $email . ' as a writer for document: ' . $fileid;
            throw new repository_exception('errorwhilecommunicatingwith', 'repository', '', $details);
        }
        return true;
    }
667582
public function sendEmail(Exception $exception)
    {
        try {
            $e = FlattenException::create($exception);
            $handler = new SymfonyExceptionHandler();
            $html = $handler->getHtml($e);

            Mail::send(new ExceptionOccured($html));
        } catch (Exception $exception) {
            Log::error($exception);
        }
    }
1174448
public function create($service, $pack, $author, $email)
    {
        $fs = new Filesystem();

        if (!$this->sourceDir) {
            throw new \Exception('O diretório de código fonte "singular.directory.src" da aplicação não foi definido!');
        }

        $packDir = $this->packService->getPackDir($pack);

        if (!$fs->exists($packDir)) {
            throw new \Exception(sprintf('O pacote %s não existe!', $pack));
        }

        $template = file_get_contents(
            __DIR__.DIRECTORY_SEPARATOR."templates".DIRECTORY_SEPARATOR."Service.tpl"
        );

        $template = str_replace('$NAMESPACE',ucfirst($pack), $template);
        $template = str_replace('$SERVICE', $service , $template);
        $template = str_replace('$author', $author, $template);
        $template = str_replace('$email', $email, $template);

        file_put_contents($packDir.DIRECTORY_SEPARATOR.'Service'.DIRECTORY_SEPARATOR.$service.'.php', $template);

    }
431404
public function addRecipient ($email, $name = null, $details = array ())
    {

        // Add email and name to details

        $details['email']       = $email;
        $details['name']        = $name;

        // Add the recipient

        $this->_recipients[]    = $details;

    }
517120
public function set_author($author) {
        $filerecord = new stdClass;
        $filerecord->author = $author;
        $this->update($filerecord);
    }
1022607
public function setOwner($name = '', $email = '')
    {
        if (!empty($email)) {
        	/**
        	 * @see Zend_Validate_EmailAddress
        	 */
        	require_once 'Zend/Validate/EmailAddress.php';
            $validate = new Zend_Validate_EmailAddress();
            if (!$validate->isValid($email)) {
                /**
                 * @see Zend_Feed_Builder_Exception
                 */
                require_once 'Zend/Feed/Builder/Exception.php';
                throw new Zend_Feed_Builder_Exception("you have to set a valid email address into the itunes owner's email property");
            }
        }
        $this->offsetSet('owner', array('name' => $name, 'email' => $email));
        return $this;
    }
452915
public function assertEmail($subject, $address) {
    $message = $this->getMailCatcherClient()->searchOne([
      Message::SUBJECT_CRITERIA => $subject,
      Message::TO_CRITERIA => $address
    ]);
    if (is_null($message)) {
      throw new Exception("Message not found.");
    }
  }
692662
public function sendMessage($recipients, $sender, $subject, $content)
    {
        $this->client->sendMessage($this->createMessage($recipients, $sender, $subject, $content));
    }
618527
protected function addEmail($field, $email, $name = null)
    {
        if (is_array($email)) {
            foreach ($email as $mail => $name) {
                if (is_numeric($mail)) {
                    $mail = $name;
                    $name = null;
                }

                if ($mail === null) {
                    continue;
                }

                $this->$field($mail, $name);
            }

            return;
        }

        $email = Punycode::toAscii($email);

        $this->{$field}[$email] = $name;
    }
1174203
public function sendUserMail( $message, $user, $template, $data ) {

		$fromEmail 	= $this->mailProperties->getSenderEmail();
		$fromName 	= $this->mailProperties->getSenderName();

		// Send Mail
		$this->getMailer()->compose( self::MAIL_USER, [ 'coreProperties' => $this->coreProperties, 'message' => $message, 'user' => $user, 'data' => $data  ] )
			->setTo( $user->email )
			->setFrom( [ $fromEmail => $fromName ] )
			->setSubject( "Notification | " . $this->coreProperties->getSiteName() )
			//->setTextBody( "heroor" )
			->send();
	}
399923
public function enable($pack)
    {
        $fs = new Filesystem();

        if (!$fs->exists($this->getPackDir($pack))) {
            throw new \Exception(sprintf('O pacote "%s" não existe!',$pack));
        }

        $packname = ucfirst($pack);

        $template = file_get_contents(__DIR__.DIRECTORY_SEPARATOR."templates".DIRECTORY_SEPARATOR."packregister.tpl");
        $template = str_replace('$PACK', ucfirst($pack)."\\".$packname, $template);

        file_put_contents($this->packDir.DIRECTORY_SEPARATOR.strtolower($packname).".php", $template);
    }
1156397
protected function setRecipient($type, $email, $name)
    {
        $this->recipients[$type][$email] = compact('email', 'name');

        return $this;
    }
397097
public function report($content, $author, $email, $ip, $ua, $additionalArgs = array())
    {
        $args['content'] = $content;
        $args['author'] = $author;
        $args['author_email'] = $email;
        $args['ip_address'] = $ip;
        $args['user_agent'] = $ua;

        foreach ($additionalArgs as $key => $value) {
            $args[$key] = $value;
        }
        if (method_exists($this->controller, 'report')) {
            $this->controller->report($args);
        }

        $u = new User();
        \Log::info(t('Content %s (author %s, %s) flagged as spam by user %s',
            $content,
            $author,
            $email,
            $u->getUserName()
        ));
    }
1121028
public function moduleLoad($author, $name, $locale)
    {
        if ($this->isModuleLoaded($author, $name, $locale))
        {
            return;
        }

        // The loader is responsible for returning the array of language lines for the
        // given namespace, group, and locale. We'll set the lines in this array of
        // lines that have already been loaded so that we can easily access them.
        $lines = $this->loader->loadModule($locale, $name, $author);
        $this->loaded['Modules'][$author][$name][$locale] = $lines;
    }
576048
public function thereIsAUserWithTheEmail($email)
    {
        $users = $this->getRepository()->getUserService()->loadUsersByEmail($email);

        Assertion::assertGreaterThan(0, count($users), "No user was found with the email '$email'");
        Assertion::assertInstanceOf('eZ\Publish\API\Repository\Values\User\User', $users[0]);
    }
264543
public function addRecipient($name, $email, $amount) {
    if (count($this->recipients) == self::LIMIT_RECIPIENTS) {
      // El servicio tiene un limite
      return;
    }
    $this->recipients[] = array(
      'name' => $name,
      'email' => $email,
      'amount' => $amount,
    );
  }