Location: PHPKode > projects > Moc10 PHP Library > docs/features.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- Header //-->
<html>

<head>

    <title>
        Moc10 Library v1.9.7 | A Lightweight PHP Library
    </title>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="author" content="Nick Sagona"/>
    <meta name="keywords" content="php, php library, php framework, php code library, moc10 library, moc10media, moc 10 media, moc 10, object oriented programming, oop" />
    <meta name="description" content="Moc10 Library is a lightweight, easily deployable PHP library that integrates a handful of some of the 'basics' that go into many websites, projects and applications." />
    <meta name="robots" content="all" />

    <link rel="stylesheet" type="text/css" href="styles.css" />
    <link rel="shortcut icon" href="moc10media.ico" type="image/ico" />

</head>

<body>
<!-- Content //-->
<div id="content">
    <a name="top"></a>
    <h1>Moc10 Library v1.9.7 | A Lightweight PHP Library</h1>
    <ul id="mainNav">
        <li><a href="./index.html">Overview</a></li>
        <li>Features</li>
        <li><a href="./manual.html">Manual</a></li>
        <li><a href="./api-glossary.html">API Glossary</a></li>
        <li><a href="./api-docs/index.html">API Docs</a></li>
        <li><a href="./faqs.html">FAQs</a></li>
        <li><a href="./development.html">Development</a></li>
        <li><a href="./download.html">Download</a></li>
    </ul>
    <h3>Features</h3>
    <ul>
        <li><a href="./features.html#autoloader">The Autoloader Component</a></li>
        <li><a href="./features.html#cookie">The Cookie Component</a></li>
        <li><a href="./features.html#curl">The Curl Component</a></li>
        <li><a href="./features.html#db">The DB Connection Component</a></li>
        <li><a href="./features.html#dom">The DOM Component</a></li>
        <li><a href="./features.html#feed">The Feed Component</a></li>
        <li><a href="./features.html#file">The File Component</a></li>
        <li><a href="./features.html#form">The Form Component</a></li>
        <li><a href="./features.html#ftp">The FTP Component</a></li>
        <li><a href="./features.html#image">The Image Component</a></li>
        <li><a href="./features.html#lang">The Language Component</a></li>
        <li><a href="./features.html#mail">The Mail Component</a></li>
        <li><a href="./features.html#pdf">The PDF Component</a></li>
        <li><a href="./features.html#record">The Record Component</a></li>
        <li><a href="./features.html#session">The Session Component</a></li>
        <li><a href="./features.html#string">The String Component</a></li>
    </ul>
    <p>
        Below is a feature overview of the 16 main components of the Moc10 Library.
    </p>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="autoloader"></a>
    <h4>The Autoloader Component</h4>
    <p>
        Autoloads all library (and application) classes, removing the need for many of the typical include or require calls.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Load Library &amp; Application Classes into the Autoload Stack</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="cookie"></a>
    <h4>The Cookie Component</h4>
    <p>
        Creates and manages cookies for the user via PHP.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Create, access and destroy cookies</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="curl"></a>
    <h4>The Curl Component</h4>
    <p>
        Allows the simple execution and management of cURL session transactions.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Initialize and manipulate cURL session transactions and related data</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="db"></a>
    <h4>The DB Connection Component</h4>
    <p>
        Creates and maintains a connection to a database. Allows for the execution of queries and access to the results, as well as access to various other helpful database methods and properties. The supported databases are MySQL, PostgreSQL and SQLite.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Execute SQL Queries</li>
        <li>Fetch Query Results</li>
        <li>Escape Values</li>
        <li>Return Last Insert ID</li>
        <li>Return Number of Rows</li>
        <li>Return Number of Fields</li>
        <li>Return Tables in the Database</li>
        <li>Return SQL Version Info</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="dom"></a>
    <h4>The DOM Component</h4>
    <p>
        Allows the creation and rendering of DOM elements and its children.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Create basic DOM elements and nested children with control over their attributes and content</li>
        <li>Create entire DOM documents such HTML, XHTML and XML documents</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="feed"></a>
    <h4>The Feed Component</h4>
    <p>
        Parses and renders various types of RSS feeds for easy manipulation and output.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Create and parse a feed from a URL such and an RSS feed or a YouTube channel feed</li>
        <li>Access to the items of the feed via an associative array</li>
        <li>Ability to render the parsed feed data via a template</li>
        <li>Ability to initialize and output a feed, in basic RSS or Atom formats</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="file"></a>
    <h4>The File Component</h4>
    <p>
        Allows for basic access to and manipulation of files, including file uploads. Includes methods to read, write, copy, move, delete, output and e-mail files, as well as access to helpful file properties.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Read File Data</li>
        <li>Write/Append Data to Files</li>
        <li>Copy &amp; Move Files</li>
        <li>Upload Files</li>
        <li>Read Directories</li>
        <li>Output Files Directly</li>
        <li>Export array data to a CSV file</li>
        <li>Import CSV file data to an array</li>
        <li>Delete Files</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="form"></a>
    <h4>The Form Component</h4>
    <p>
        Allows for the creation, rendering and validation of HTML forms and form elements. It gives control over such aspects of HTML forms such as form attributes and methods, as well as which fields are required, what a particular field's validation setting is, and how to render the form accordingly. It inherits the methods and properties of the DOM Component
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Set Form &amp; Form Element Attributes</li>
        <li>Set Required Fields</li>
        <li>Set Field Validators</li>
        <li>Render Form Utilizing a Template</li>
        <li>Form Validation</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="ftp"></a>
    <h4>The FTP Component</h4>
    <p>
        Creates and maintains a connection to an FTP server using FTP or FTPS (SSL.) Allows for the execution of basic FTP commands to handle and manage files and directories via FTP.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Create and remove directories</li>
        <li>Put, get, rename and delete files</li>
        <li>Change file permissions</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="image"></a>
    <h4>The Image Component</h4>
    <p>
        Allows for access to and advanced manipulation of images, including image uploads, using the GD library. It inherits the methods and properties of the File Component, as well adds image-specific methods and properties to assist in image control and manipulation. Additional properties include width, height, channels and quality. Additional methods are included to resize, scale, crop and write text to an image.
    </p>
    <h5>Feature Summary</h5>
    <span class="note"><strong>Note:</strong> The Image Component inherits all of the functionality of the File Component and extends it with the following features:</span>
    <ol>
        <li>Resize, Scale &amp; Crop Images</li>
        <li>Write Text to Images (System Fonts or True Type Fonts)</li>
        <li>Convert Images</li>
        <li>Return Color Total (Indexed Images Only)</li>
        <li>Return Colors Array in HEX or RGB Format (Recommended for Indexed Images Only)</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="lang"></a>
    <h4>The Language Component</h4>
    <p>
        Allows for multiple language support for 12 languages, as well the extension of language support via the importing of custom XML language files.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Support for 12 languages for the internal messaging of the library.</li>
        <li>Ability to extend the language support by importing custom XML language files</li>
        <li>Ability to generate additional custom language files via Google Translate with a provided API key.</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="mail"></a>
    <h4>The Mail Component</h4>
    <p>
        Allows for the ability to send email messages and content to one or more email addresses in any combination of different ways - text, HTML and with or without file attachments. Multiple files may be attached, and there is support for individual "search and replace" customization per email message (i.e., each person's name, company, etc.)
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Set a single email address or a queue of email addresses</li>
        <li>Support for individual customization per email message</li>
        <li>Attach files (encoded with base64)</li>
        <li>Support for text and HTML formats</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="pdf"></a>
    <h4>The PDF Component</h4>
    <p>
        Allows for the creation of new PDFs, as well as importing an entire PDF or pages from a PDF. It inherits the File Component and also utilizes the Image Component. It provides a variety of methods to allow for advanced manipulation of the newly created PDF, including: adding fonts and text; adding vector lines, rectangles and ellipses; adding and manipulating pages; adding internal document links and external URLs; adding images.
    </p>
    <h5>Feature Summary</h5>
    <span class="note"><strong>Note:</strong> The PDF Component inherits all of the functionality of the File Component and extends it with the following features:</span>
    <ol>
        <li>Create New PDFs</li>
        <li>Add, Copy, Order &amp; Delete Pages</li>
        <li>
            Utilize Multiple Pages of Various Standard or Custom Sizes, Such As:
            <table style="width: 425px;">
                <tr>
                    <td class="top" style="width: 33%;">
                        <ul class="subList">
                            <li>#10 Envelope</li>
                            <li>C5 Envelope</li>
                            <li>DL Envelope</li>
                            <li>Folio</li>
                            <li>Executive</li>
                            <li>Letter</li>
                            <li>Legal</li>
                            <li>Ledger</li>
                            <li>Tabloid</li>
                            <li>A0</li>
                        </ul>
                    </td>
                    <td class="top" style="width: 33%;">
                        <ul class="subList">
                            <li>A1</li>
                            <li>A2</li>
                            <li>A3</li>
                            <li>A4</li>
                            <li>A5</li>
                            <li>A6</li>
                            <li>A7</li>
                            <li>A8</li>
                            <li>A9</li>
                            <li>B0</li>
                        </ul>
                    </td>
                    <td class="top" style="width: 33%;">
                         <ul class="subList">
                             <li>B1</li>
                             <li>B2</li>
                             <li>B3</li>
                             <li>B4</li>
                             <li>B5</li>
                             <li>B6</li>
                             <li>B7</li>
                             <li>B8</li>
                             <li>B9</li>
                             <li>B10</li>
                         </ul>
                    </td>
                </tr>
            </table>
        </li>
        <li>Modify &amp; Append to Existing PDFs</li>
        <li>Import &amp; Concatenate Pages from Existing PDFs</li>
        <li><a name="fonts"></a>
            Standard PDF Font Support
            <table style="width: 425px;">
                <tr>
                    <td class="top" style="width: 33%;">
                        <ul class="subList">
                            <li>Arial</li>
                            <li>Arial,Italic</li>
                            <li>Arial,Bold</li>
                            <li>Arial,BoldItalic</li>
                            <li>Courier</li>
                            <li>CourierNew</li>
                            <li>Courier-Oblique</li>
                            <li>CourierNew,Italic</li>
                            <li>Courier-Bold</li>
                        </ul>
                    </td>
                    <td class="top" style="width: 33%;">
                        <ul class="subList">
                            <li>CourierNew,Bold</li>
                            <li>Courier-BoldOblique</li>
                            <li>CourierNew,BoldItalic</li>
                            <li>Helvetica</li>
                            <li>Helvetica-Oblique</li>
                            <li>Helvetica-Bold</li>
                            <li>Helvetica-BoldOblique</li>
                            <li>Symbol</li>
                            <li>Times-Roman</li>
                        </ul>
                    </td>
                    <td class="top" style="width: 33%;">
                         <ul class="subList">
                             <li>Times-Bold</li>
                             <li>Times-Italic</li>
                             <li>Times-BoldItalic</li>
                             <li>TimesNewRoman</li>
                             <li>TimesNewRoman,Italic</li>
                             <li>TimesNewRoman,Bold</li>
                             <li>TimesNewRoman,BoldItalic</li>
                             <li>ZapfDingbats</li>
                         </ul>
                    </td>
                </tr>
            </table>
        </li>
        <li>Fill and Stroke Color Control</li>
        <li>Stroke Width and Dash Control</li>
        <li>
            Basic Text Control and Output
            <ul class="subList">
                <li>Font</li>
                <li>Size</li>
                <li>Character Spacing</li>
                <li>Word Spacing</li>
                <li>Scaling</li>
                <li>Rotation</li>
                <li>Rendering (Fill, Stroke, Etc.)</li>
            </ul>
        </li>
        <li>
            Basic Vector Graphics Control and Output
            <ul class="subList">
                <li>Rectangle/Square</li>
                <li>Ellipse/Circle</li>
            </ul>
        </li>
        <li>
            Add Images (JPG, PNG &amp; GIF)
        </li>
        <li>Add Internal Links and External URLs</li>
        <li>Save PDFs to the Server</li>
        <li>Output PDFs to the Browser</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="record"></a>
    <h4>The Record Component</h4>
    <p>
        Allows for detailed access to and manipulation of a table in a database. This class utilizes the DB Component and only works when it has been extended by a child class that preferably shares the name of the database table. The purpose is to set the table name and, if applicable, the primary ID in the child class. The child class then inherits the Record Component class and acts as the main interface to the database table. The inherited methods include useful ways to search for and transact with the database table, as well as allow for the saving or deletion of a record from the database table.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Create, Read, Update and Delete Database Records (Basic CRUD functionality.)</li>
        <li>Return Records Via Basic Methods: findById(), findBy() &amp; findAll()</li>
        <li>Return Records Via Advanced Methods: search(), distinct() &amp; join()</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="session"></a>
    <h4>The Session Component</h4>
    <p>
        Creates and maintains a PHP session. Allows for access to and storage of pertinent session data via useful methods and properties. Mobile device detection is included with this component.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Start and Destroy Sessions</li>
        <li>Access and Update Session Data</li>
        <li>Detect Mobile Devices</li>
        <li>Manage Mobile Sessions</li>
        <li>Manage Pagination</li>
        <li>Browser/User Agent Detect</li>
    </ol>
    <div class="divide"></div>
    <span class="right"><a href="./features.html#top">back to top ^</a></span>
    <a name="string"></a>
    <h4>The String Component</h4>
    <p>
        Allows for the creation and manipulation of a string and its properties via a wide variety of methods and properties, including link conversion, SEO-slug creation, string formatting and clean-up, as well as many other useful things.
    </p>
    <h5>Feature Summary</h5>
    <ol>
        <li>Manipulate &amp; Return Basic String Data</li>
        <li>Link Conversion</li>
        <li>Database Preparation</li>
        <li>Word Wrap</li>
        <li>HTML Character Encoding &amp; Decoding</li>
        <li>URL-Friendly Slugs</li>
        <li>Random String Generation</li>
    </ol>
    <div class="divide"></div>
</div>
<!-- Footer //-->
<div id="footer">
    Copyright &copy; 2009-2011, Moc 10 Media, LLC. All rights reserved.
</div>
</body>

</html>
Return current item: Moc10 PHP Library