When i'm using xcode with a C header, i see only the first line of documentation for a function:
For example, this is a function in my header.
In my header, the documentation looks like this:
/**
* Perform a ticket-create request and return the result.
*
* All logs uploaded between this ticket and the last ticket created for this device will
* automatically be included with this ticket.
*
* #param p0 The details to include with the ticket.
* #param p1 The contact information to include with the ticket.
*
* #return a structure where r0 contains the ticket id or -1 if there was an error and r1 contains an error if any.
*/
extern struct VcbLogCreateTicket_return VcbLogCreateTicket(char* p0, char* p1);
But when i go to that function in xcode, i only see the first line like so:
How do I get it to show the full documentation, preferably including parameters and return? Is this even an option in xcode?
You can option-click on any symbol to get its full documentation.
Related
I'm running into a problem where the following email aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanom#domaine.com is not valid according to this assertion on the Doctrine Entity using #Assert\Email for the email property.
I don't see any documentation detailing what the checks are for passing or failing this validation.
Curious to know where the code is or where I can find more documentation on what this assertion is doing...
Update, my whole assertions on that Entity property are:
/**
* #ORM\Column(type="string", length=511)
* #Filter\Trim()
* #Filter\StripNewlines()
* #Assert\NotBlank(message="email.error")
* #Assert\Email(message="email.error")
* #Assert\Length(min="6", max="150", minMessage="email.error", maxMessage="email.error")
* #Encrypted
*/
private $email;
Using Symfony 2.3
I believe Symfony\Component\Validator\Constraints\EmailValidator class is what you're looking for. Check source code
Symfony 2.3 Email validator uses the PHP var filter method
$valid = filter_var($value, FILTER_VALIDATE_EMAIL);
Which the internet leads em to believe uses similar to the following (ridiculous) regex (broken into multiple lines for readability)
^(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){255,})(?!(?:(?:\x22?
\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){65,}#)(?:(?:[\x21\x23-\x27\x2A\x2B\
x2D\x2F-\x39\x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\
x5D-\x7F]|(?:\x5C[\x00-\x7F]))*\x22))(?:\.(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\
x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|(?:
\x5C[\x00-\x7F]))*\x22)))*#(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-[a-z0-9]
+)*\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-[a-z0-9]+)*)|(?:\[
(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\]]){7,})(
?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)
))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(
?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?
)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\.(?:(?:25[0-5])
|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\]))$
So make of that what you will.
In short, the local part of the email address is too long.
I'm not sure which part of regex decides that though.
I have a News section in my silverstripe site and I want to use the FulltextSeach functionality of Silverstripe:
FulltextSearchable::enable();
That works fine so far. But I´d like to have only NewsPages in my result. Is there a way to filter the search so that you get only certin pageType as a result for example?
Thanks in advance,
Chris
This is untested code but I've just had a look the source code of sapphire/search/FulltextSearchable.php
in mysite/_config.php you could add:
FulltextSearchable::enable(array());
which should remove the default searched classes which are SiteTree (all pages) and File
Then you can add an object extension in mysite/_config.php:
Object::add_extension('NewsPage', "FulltextSearchable('Title,MenuTitle,Content,MetaTitle,MetaDescription,MetaKeywords')");
Below is the comments from within the FulltextSearchable.php file
/**
* Enable the default configuration of MySQL full-text searching on the given data classes.
* It can be used to limit the searched classes, but not to add your own classes.
* For this purpose, please use {#link Object::add_extension()} directly:
* <code>
* Object::add_extension('MyObject', "FulltextSearchable('MySearchableField,'MyOtherField')");
* </code>
*
* Caution: This is a wrapper method that should only be used in _config.php,
* and only be called once in your code.
*
* #param Array $searchableClasses The extension will be applied to all DataObject subclasses
* listed here. Default: {#link SiteTree} and {#link File}.
*/
We have a page-level docblock like the following:
/**
* Functions for the processing, displaying, and searching of listings
*
* #package ListingFunctions
*
*/
The rest of the file has functions with their own docblocks. But my team and I can't find this comment anywhere in the generated HTML output. Is there some configuration or command-line stuff we need to turn on?
Using phpDocumentor 1.x, that "short description" piece should be the main description heading on the webpage for that given file. It won't appear on those functions in that file... just on the file itself. This is core behavior, that cannot be modified by runtime settings.
Some modules have a <request><direct_front_name>...</direct_front_name></request> in their module config, for example xmlconnect and api. What is this tag for?
What I think it is for:
xmlconnect and api are both used as direct entry points for the site (as opposed normal modules which are reached mostly from within the site). So in combination with the option to use store codes in your store urls you can specify a direct_front_end tag to make the store code not necessary for those modules. This way there is no 404 when calling them without a store code.
(Kind of answered it myself, but couldn't find any information about it online. Might be of use to others. And maybe anyone has something to add.)
You're totally right. And the php DOC clearly tells so :
Mage_Core_Controller_Request_Http::isDirectAccessFrontendName() :
/**
* Check if code declared as direct access frontend name
* this mean what this url can be used without store code
*
* #param string $code
* #return bool
*/
public function isDirectAccessFrontendName($code)
I want to process a script whenever a plugin parameter is changed and the save button is clicked in Joomla. I do not want to run it everytime, but as soon the save button is pressed, the script should execute and then should lie dormant until it is invoked again
I think you could use either of these events (from com_plugins/models/plugin.php )
/**
* #var string The event to trigger after saving the data.
* #since 1.6
*/
protected $event_after_save = 'onExtensionAfterSave';
/**
* #var string The event to trigger after before the data.
* #since 1.6
*/
protected $event_before_save = 'onExtensionBeforeSave';
If you look at the base/core plugins installed with Joomla! in /plugins/ you can find examples of these and other triggers being used.