This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
list($profile->age,$profile->sex,$profile->name)=$input->fetch('age','sex','name'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$profile->age=$input->get_num('age',18); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$input=Input::Get(); | |
if ($input->has('name','age','sex')) | |
{ | |
$profile=Model::Instance('profiles.profile'); | |
$profile->name=$input->name; | |
$profile->age=$input->get_num('age'); | |
$profile->save(); | |
} | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$input=Input::Get(); | |
if ($input->has('name','age','sex')) | |
{ | |
$profile=Model::Instance('profiles.profile'); | |
$profile->name=$input->name; | |
$profile->age=$input->age; | |
$profile->save(); | |
} | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$input=Input::Get(); | |
if ($input->has('name','age','sex')) | |
{ | |
// ... | |
} | |
else | |
throw new InvalidParametersException("Required form variables missing."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$input=Input::Get(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
uses('system.util.serializer'); | |
$site=new CMSSite(); | |
$site->id = 'test'; | |
// ... etc ... | |
$site = Serializer::DeserializeObject($serialized, Serializer::FORMAT_XML, 'cms/serialization'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
uses('system.util.serializer'); | |
$site=new CMSSite(); | |
$site->id = 'test'; | |
// ... etc ... | |
$serialized = Serializer::SerializeObject($site, Serializer::FORMAT_XML); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
uses("system.app.serializable"); | |
/** | |
* Represents a CMS site | |
* | |
* [[ | |
* serializer: { node: 'site', config: 'cms/serializer' } | |
* ]] | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paragraph: | |
model: cms.cms_paragraph | |
attributes: | |
- { name: 'id', type: 'string' } | |
children: | |
- { name: 'value', type: 'html' } |